Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 1 | //===- FunctionResolution.cpp - Resolve declarations to implementations ---===// |
| 2 | // |
| 3 | // Loop over the functions that are in the module and look for functions that |
| 4 | // have the same name. More often than not, there will be things like: |
| 5 | // |
| 6 | // declare void %foo(...) |
| 7 | // void %foo(int, int) { ... } |
| 8 | // |
| 9 | // because of the way things are declared in C. If this is the case, patch |
| 10 | // things up. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Chris Lattner | 5afe2f2 | 2002-07-23 22:04:02 +0000 | [diff] [blame] | 14 | #include "llvm/Transforms/IPO.h" |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 15 | #include "llvm/Module.h" |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 16 | #include "llvm/SymbolTable.h" |
| 17 | #include "llvm/DerivedTypes.h" |
| 18 | #include "llvm/Pass.h" |
| 19 | #include "llvm/iOther.h" |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 20 | #include "llvm/Constants.h" |
Chris Lattner | cbf0839 | 2003-08-13 22:15:04 +0000 | [diff] [blame] | 21 | #include "llvm/Assembly/Writer.h" |
Chris Lattner | bf3a099 | 2002-10-01 22:38:41 +0000 | [diff] [blame] | 22 | #include "Support/Statistic.h" |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 23 | #include <algorithm> |
| 24 | |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 25 | namespace { |
Chris Lattner | bf3a099 | 2002-10-01 22:38:41 +0000 | [diff] [blame] | 26 | Statistic<>NumResolved("funcresolve", "Number of varargs functions resolved"); |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 27 | Statistic<> NumGlobals("funcresolve", "Number of global variables resolved"); |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 28 | |
| 29 | struct FunctionResolvingPass : public Pass { |
Chris Lattner | 113f4f4 | 2002-06-25 16:13:24 +0000 | [diff] [blame] | 30 | bool run(Module &M); |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 31 | }; |
Chris Lattner | a2c0985 | 2002-07-26 21:12:44 +0000 | [diff] [blame] | 32 | RegisterOpt<FunctionResolvingPass> X("funcresolve", "Resolve Functions"); |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | Pass *createFunctionResolvingPass() { |
| 36 | return new FunctionResolvingPass(); |
| 37 | } |
| 38 | |
Chris Lattner | b2d9f7d | 2003-01-30 18:22:32 +0000 | [diff] [blame] | 39 | static bool ResolveFunctions(Module &M, std::vector<GlobalValue*> &Globals, |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 40 | Function *Concrete) { |
| 41 | bool Changed = false; |
| 42 | for (unsigned i = 0; i != Globals.size(); ++i) |
| 43 | if (Globals[i] != Concrete) { |
| 44 | Function *Old = cast<Function>(Globals[i]); |
| 45 | const FunctionType *OldMT = Old->getFunctionType(); |
| 46 | const FunctionType *ConcreteMT = Concrete->getFunctionType(); |
| 47 | |
Chris Lattner | 9810b94 | 2003-04-28 01:23:29 +0000 | [diff] [blame] | 48 | if (OldMT->getParamTypes().size() > ConcreteMT->getParamTypes().size() && |
Chris Lattner | 50cbb90 | 2003-03-03 19:57:46 +0000 | [diff] [blame] | 49 | !ConcreteMT->isVarArg()) |
Chris Lattner | dbb05b0 | 2003-02-27 20:55:48 +0000 | [diff] [blame] | 50 | if (!Old->use_empty()) { |
| 51 | std::cerr << "WARNING: Linking function '" << Old->getName() |
| 52 | << "' is causing arguments to be dropped.\n"; |
| 53 | std::cerr << "WARNING: Prototype: "; |
| 54 | WriteAsOperand(std::cerr, Old); |
| 55 | std::cerr << " resolved to "; |
| 56 | WriteAsOperand(std::cerr, Concrete); |
| 57 | std::cerr << "\n"; |
| 58 | } |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 59 | |
| 60 | // Check to make sure that if there are specified types, that they |
| 61 | // match... |
| 62 | // |
Chris Lattner | dbb05b0 | 2003-02-27 20:55:48 +0000 | [diff] [blame] | 63 | unsigned NumArguments = std::min(OldMT->getParamTypes().size(), |
| 64 | ConcreteMT->getParamTypes().size()); |
| 65 | |
Chris Lattner | 50cbb90 | 2003-03-03 19:57:46 +0000 | [diff] [blame] | 66 | if (!Old->use_empty() && !Concrete->use_empty()) |
| 67 | for (unsigned i = 0; i < NumArguments; ++i) |
Chris Lattner | 6fc0ee9 | 2003-08-23 20:03:05 +0000 | [diff] [blame^] | 68 | if (OldMT->getParamTypes()[i] != ConcreteMT->getParamTypes()[i]) |
Chris Lattner | 015d98e | 2003-08-20 23:50:38 +0000 | [diff] [blame] | 69 | if (OldMT->getParamTypes()[i]->getPrimitiveID() != |
Chris Lattner | 6fc0ee9 | 2003-08-23 20:03:05 +0000 | [diff] [blame^] | 70 | ConcreteMT->getParamTypes()[i]->getPrimitiveID()) { |
| 71 | std::cerr << "WARNING: Function [" << Old->getName() |
| 72 | << "]: Parameter types conflict for: '" << OldMT |
| 73 | << "' and '" << ConcreteMT << "'\n"; |
Chris Lattner | 015d98e | 2003-08-20 23:50:38 +0000 | [diff] [blame] | 74 | return Changed; |
Chris Lattner | 6fc0ee9 | 2003-08-23 20:03:05 +0000 | [diff] [blame^] | 75 | } |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 76 | |
Chris Lattner | 9810b94 | 2003-04-28 01:23:29 +0000 | [diff] [blame] | 77 | // Attempt to convert all of the uses of the old function to the concrete |
| 78 | // form of the function. If there is a use of the fn that we don't |
| 79 | // understand here we punt to avoid making a bad transformation. |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 80 | // |
Chris Lattner | 9810b94 | 2003-04-28 01:23:29 +0000 | [diff] [blame] | 81 | // At this point, we know that the return values are the same for our two |
| 82 | // functions and that the Old function has no varargs fns specified. In |
| 83 | // otherwords it's just <retty> (...) |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 84 | // |
Chris Lattner | e934022 | 2003-07-23 22:03:18 +0000 | [diff] [blame] | 85 | if (!Old->use_empty()) { // Avoid making the CPR unless we really need it |
| 86 | Value *Replacement = Concrete; |
| 87 | if (Concrete->getType() != Old->getType()) |
| 88 | Replacement = ConstantExpr::getCast(ConstantPointerRef::get(Concrete), |
| 89 | Old->getType()); |
| 90 | NumResolved += Old->use_size(); |
| 91 | Old->replaceAllUsesWith(Replacement); |
| 92 | } |
Chris Lattner | 0804368 | 2003-05-31 21:08:45 +0000 | [diff] [blame] | 93 | |
| 94 | // Since there are no uses of Old anymore, remove it from the module. |
| 95 | M.getFunctionList().erase(Old); |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 96 | } |
| 97 | return Changed; |
| 98 | } |
| 99 | |
| 100 | |
Chris Lattner | b2d9f7d | 2003-01-30 18:22:32 +0000 | [diff] [blame] | 101 | static bool ResolveGlobalVariables(Module &M, |
| 102 | std::vector<GlobalValue*> &Globals, |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 103 | GlobalVariable *Concrete) { |
| 104 | bool Changed = false; |
| 105 | assert(isa<ArrayType>(Concrete->getType()->getElementType()) && |
| 106 | "Concrete version should be an array type!"); |
| 107 | |
| 108 | // Get the type of the things that may be resolved to us... |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 109 | const ArrayType *CATy =cast<ArrayType>(Concrete->getType()->getElementType()); |
| 110 | const Type *AETy = CATy->getElementType(); |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 111 | |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 112 | Constant *CCPR = ConstantPointerRef::get(Concrete); |
| 113 | |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 114 | for (unsigned i = 0; i != Globals.size(); ++i) |
| 115 | if (Globals[i] != Concrete) { |
| 116 | GlobalVariable *Old = cast<GlobalVariable>(Globals[i]); |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 117 | const ArrayType *OATy = cast<ArrayType>(Old->getType()->getElementType()); |
| 118 | if (OATy->getElementType() != AETy || OATy->getNumElements() != 0) { |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 119 | std::cerr << "WARNING: Two global variables exist with the same name " |
| 120 | << "that cannot be resolved!\n"; |
| 121 | return false; |
| 122 | } |
| 123 | |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 124 | Old->replaceAllUsesWith(ConstantExpr::getCast(CCPR, Old->getType())); |
| 125 | |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 126 | // Since there are no uses of Old anymore, remove it from the module. |
| 127 | M.getGlobalList().erase(Old); |
| 128 | |
| 129 | ++NumGlobals; |
| 130 | Changed = true; |
| 131 | } |
| 132 | return Changed; |
| 133 | } |
| 134 | |
| 135 | static bool ProcessGlobalsWithSameName(Module &M, |
Chris Lattner | b2d9f7d | 2003-01-30 18:22:32 +0000 | [diff] [blame] | 136 | std::vector<GlobalValue*> &Globals) { |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 137 | assert(!Globals.empty() && "Globals list shouldn't be empty here!"); |
| 138 | |
| 139 | bool isFunction = isa<Function>(Globals[0]); // Is this group all functions? |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 140 | GlobalValue *Concrete = 0; // The most concrete implementation to resolve to |
| 141 | |
| 142 | assert((isFunction ^ isa<GlobalVariable>(Globals[0])) && |
| 143 | "Should either be function or gvar!"); |
| 144 | |
| 145 | for (unsigned i = 0; i != Globals.size(); ) { |
| 146 | if (isa<Function>(Globals[i]) != isFunction) { |
| 147 | std::cerr << "WARNING: Found function and global variable with the " |
| 148 | << "same name: '" << Globals[i]->getName() << "'.\n"; |
| 149 | return false; // Don't know how to handle this, bail out! |
| 150 | } |
| 151 | |
Chris Lattner | 52b8fc0 | 2002-11-10 03:36:55 +0000 | [diff] [blame] | 152 | if (isFunction) { |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 153 | // For functions, we look to merge functions definitions of "int (...)" |
| 154 | // to 'int (int)' or 'int ()' or whatever else is not completely generic. |
| 155 | // |
| 156 | Function *F = cast<Function>(Globals[i]); |
Chris Lattner | 5997c3d | 2002-11-08 00:38:20 +0000 | [diff] [blame] | 157 | if (!F->isExternal()) { |
Chris Lattner | 52b8fc0 | 2002-11-10 03:36:55 +0000 | [diff] [blame] | 158 | if (Concrete && !Concrete->isExternal()) |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 159 | return false; // Found two different functions types. Can't choose! |
| 160 | |
| 161 | Concrete = Globals[i]; |
Chris Lattner | 52b8fc0 | 2002-11-10 03:36:55 +0000 | [diff] [blame] | 162 | } else if (Concrete) { |
| 163 | if (Concrete->isExternal()) // If we have multiple external symbols...x |
| 164 | if (F->getFunctionType()->getNumParams() > |
| 165 | cast<Function>(Concrete)->getFunctionType()->getNumParams()) |
| 166 | Concrete = F; // We are more concrete than "Concrete"! |
| 167 | |
| 168 | } else { |
| 169 | Concrete = F; |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 170 | } |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 171 | } else { |
| 172 | // For global variables, we have to merge C definitions int A[][4] with |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 173 | // int[6][4]. A[][4] is represented as A[0][4] by the CFE. |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 174 | GlobalVariable *GV = cast<GlobalVariable>(Globals[i]); |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 175 | if (!isa<ArrayType>(GV->getType()->getElementType())) { |
| 176 | Concrete = 0; |
| 177 | break; // Non array's cannot be compatible with other types. |
| 178 | } else if (Concrete == 0) { |
| 179 | Concrete = GV; |
| 180 | } else { |
| 181 | // Must have different types... allow merging A[0][4] w/ A[6][4] if |
| 182 | // A[0][4] is external. |
| 183 | const ArrayType *NAT = cast<ArrayType>(GV->getType()->getElementType()); |
| 184 | const ArrayType *CAT = |
| 185 | cast<ArrayType>(Concrete->getType()->getElementType()); |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 186 | |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 187 | if (NAT->getElementType() != CAT->getElementType()) { |
| 188 | Concrete = 0; // Non-compatible types |
| 189 | break; |
| 190 | } else if (NAT->getNumElements() == 0 && GV->isExternal()) { |
| 191 | // Concrete remains the same |
| 192 | } else if (CAT->getNumElements() == 0 && Concrete->isExternal()) { |
| 193 | Concrete = GV; // Concrete becomes GV |
| 194 | } else { |
| 195 | Concrete = 0; // Cannot merge these types... |
| 196 | break; |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 197 | } |
| 198 | } |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 199 | } |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 200 | ++i; |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 201 | } |
| 202 | |
| 203 | if (Globals.size() > 1) { // Found a multiply defined global... |
Chris Lattner | 2b13296 | 2003-05-31 21:57:06 +0000 | [diff] [blame] | 204 | // If there are no external declarations, and there is at most one |
| 205 | // externally visible instance of the global, then there is nothing to do. |
| 206 | // |
| 207 | bool HasExternal = false; |
| 208 | unsigned NumInstancesWithExternalLinkage = 0; |
| 209 | |
| 210 | for (unsigned i = 0, e = Globals.size(); i != e; ++i) { |
| 211 | if (Globals[i]->isExternal()) |
| 212 | HasExternal = true; |
| 213 | else if (!Globals[i]->hasInternalLinkage()) |
| 214 | NumInstancesWithExternalLinkage++; |
| 215 | } |
| 216 | |
| 217 | if (!HasExternal && NumInstancesWithExternalLinkage <= 1) |
| 218 | return false; // Nothing to do? Must have multiple internal definitions. |
| 219 | |
| 220 | |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 221 | // We should find exactly one concrete function definition, which is |
| 222 | // probably the implementation. Change all of the function definitions and |
| 223 | // uses to use it instead. |
| 224 | // |
| 225 | if (!Concrete) { |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 226 | std::cerr << "WARNING: Found global types that are not compatible:\n"; |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 227 | for (unsigned i = 0; i < Globals.size(); ++i) { |
Chris Lattner | b2d9f7d | 2003-01-30 18:22:32 +0000 | [diff] [blame] | 228 | std::cerr << "\t" << Globals[i]->getType()->getDescription() << " %" |
| 229 | << Globals[i]->getName() << "\n"; |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 230 | } |
Chris Lattner | b2d9f7d | 2003-01-30 18:22:32 +0000 | [diff] [blame] | 231 | std::cerr << " No linkage of globals named '" << Globals[0]->getName() |
| 232 | << "' performed!\n"; |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 233 | return false; |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 234 | } |
| 235 | |
| 236 | if (isFunction) |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 237 | return ResolveFunctions(M, Globals, cast<Function>(Concrete)); |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 238 | else |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 239 | return ResolveGlobalVariables(M, Globals, |
| 240 | cast<GlobalVariable>(Concrete)); |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 241 | } |
Chris Lattner | defe5c7 | 2003-04-19 00:15:27 +0000 | [diff] [blame] | 242 | return false; |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 243 | } |
| 244 | |
Chris Lattner | 113f4f4 | 2002-06-25 16:13:24 +0000 | [diff] [blame] | 245 | bool FunctionResolvingPass::run(Module &M) { |
Chris Lattner | 98cf1f5 | 2002-11-20 18:36:02 +0000 | [diff] [blame] | 246 | SymbolTable &ST = M.getSymbolTable(); |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 247 | |
Chris Lattner | b2d9f7d | 2003-01-30 18:22:32 +0000 | [diff] [blame] | 248 | std::map<std::string, std::vector<GlobalValue*> > Globals; |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 249 | |
| 250 | // Loop over the entries in the symbol table. If an entry is a func pointer, |
| 251 | // then add it to the Functions map. We do a two pass algorithm here to avoid |
| 252 | // problems with iterators getting invalidated if we did a one pass scheme. |
| 253 | // |
Chris Lattner | 98cf1f5 | 2002-11-20 18:36:02 +0000 | [diff] [blame] | 254 | for (SymbolTable::iterator I = ST.begin(), E = ST.end(); I != E; ++I) |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 255 | if (const PointerType *PT = dyn_cast<PointerType>(I->first)) { |
| 256 | SymbolTable::VarMap &Plane = I->second; |
| 257 | for (SymbolTable::type_iterator PI = Plane.begin(), PE = Plane.end(); |
| 258 | PI != PE; ++PI) { |
| 259 | GlobalValue *GV = cast<GlobalValue>(PI->second); |
| 260 | assert(PI->first == GV->getName() && |
| 261 | "Global name and symbol table do not agree!"); |
Chris Lattner | 0804368 | 2003-05-31 21:08:45 +0000 | [diff] [blame] | 262 | Globals[PI->first].push_back(GV); |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 263 | } |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 264 | } |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 265 | |
| 266 | bool Changed = false; |
| 267 | |
| 268 | // Now we have a list of all functions with a particular name. If there is |
| 269 | // more than one entry in a list, merge the functions together. |
| 270 | // |
Chris Lattner | b2d9f7d | 2003-01-30 18:22:32 +0000 | [diff] [blame] | 271 | for (std::map<std::string, std::vector<GlobalValue*> >::iterator |
| 272 | I = Globals.begin(), E = Globals.end(); I != E; ++I) |
Chris Lattner | 013eca00 | 2002-10-09 21:10:06 +0000 | [diff] [blame] | 273 | Changed |= ProcessGlobalsWithSameName(M, I->second); |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 274 | |
Chris Lattner | 52b8fc0 | 2002-11-10 03:36:55 +0000 | [diff] [blame] | 275 | // Now loop over all of the globals, checking to see if any are trivially |
| 276 | // dead. If so, remove them now. |
| 277 | |
| 278 | for (Module::iterator I = M.begin(), E = M.end(); I != E; ) |
| 279 | if (I->isExternal() && I->use_empty()) { |
| 280 | Function *F = I; |
| 281 | ++I; |
| 282 | M.getFunctionList().erase(F); |
| 283 | ++NumResolved; |
| 284 | Changed = true; |
| 285 | } else { |
| 286 | ++I; |
| 287 | } |
| 288 | |
| 289 | for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ) |
| 290 | if (I->isExternal() && I->use_empty()) { |
| 291 | GlobalVariable *GV = I; |
| 292 | ++I; |
| 293 | M.getGlobalList().erase(GV); |
| 294 | ++NumGlobals; |
| 295 | Changed = true; |
| 296 | } else { |
| 297 | ++I; |
| 298 | } |
| 299 | |
Chris Lattner | 5aa9e3e | 2002-05-24 20:42:13 +0000 | [diff] [blame] | 300 | return Changed; |
| 301 | } |