Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 1 | //===- Reassociate.cpp - Reassociate binary expressions -------------------===// |
John Criswell | 482202a | 2003-10-20 19:43:21 +0000 | [diff] [blame^] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by the LLVM research group and is distributed under |
| 6 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 9 | // |
| 10 | // This pass reassociates commutative expressions in an order that is designed |
Chris Lattner | 3666378 | 2003-05-02 19:26:34 +0000 | [diff] [blame] | 11 | // to promote better constant propagation, GCSE, LICM, PRE... |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 12 | // |
| 13 | // For example: 4 + (x + 5) -> x + (4 + 5) |
| 14 | // |
| 15 | // Note that this pass works best if left shifts have been promoted to explicit |
| 16 | // multiplies before this pass executes. |
| 17 | // |
| 18 | // In the implementation of this algorithm, constants are assigned rank = 0, |
| 19 | // function arguments are rank = 1, and other values are assigned ranks |
| 20 | // corresponding to the reverse post order traversal of current function |
| 21 | // (starting at 2), which effectively gives values in deep loops higher rank |
| 22 | // than values not in loops. |
| 23 | // |
| 24 | //===----------------------------------------------------------------------===// |
| 25 | |
| 26 | #include "llvm/Transforms/Scalar.h" |
| 27 | #include "llvm/Function.h" |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 28 | #include "llvm/iOperators.h" |
| 29 | #include "llvm/Type.h" |
| 30 | #include "llvm/Pass.h" |
| 31 | #include "llvm/Constant.h" |
| 32 | #include "llvm/Support/CFG.h" |
Chris Lattner | 8abcd56 | 2003-08-01 22:15:03 +0000 | [diff] [blame] | 33 | #include "Support/Debug.h" |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 34 | #include "Support/PostOrderIterator.h" |
Chris Lattner | bf3a099 | 2002-10-01 22:38:41 +0000 | [diff] [blame] | 35 | #include "Support/Statistic.h" |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 36 | |
| 37 | namespace { |
Chris Lattner | bf3a099 | 2002-10-01 22:38:41 +0000 | [diff] [blame] | 38 | Statistic<> NumLinear ("reassociate","Number of insts linearized"); |
| 39 | Statistic<> NumChanged("reassociate","Number of insts reassociated"); |
| 40 | Statistic<> NumSwapped("reassociate","Number of insts with operands swapped"); |
| 41 | |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 42 | class Reassociate : public FunctionPass { |
Chris Lattner | 10073a9 | 2002-07-25 06:17:51 +0000 | [diff] [blame] | 43 | std::map<BasicBlock*, unsigned> RankMap; |
Chris Lattner | 8ac196d | 2003-08-13 16:16:26 +0000 | [diff] [blame] | 44 | std::map<Value*, unsigned> ValueRankMap; |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 45 | public: |
Chris Lattner | 113f4f4 | 2002-06-25 16:13:24 +0000 | [diff] [blame] | 46 | bool runOnFunction(Function &F); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 47 | |
| 48 | virtual void getAnalysisUsage(AnalysisUsage &AU) const { |
Chris Lattner | 820d971 | 2002-10-21 20:00:28 +0000 | [diff] [blame] | 49 | AU.setPreservesCFG(); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 50 | } |
| 51 | private: |
Chris Lattner | 113f4f4 | 2002-06-25 16:13:24 +0000 | [diff] [blame] | 52 | void BuildRankMap(Function &F); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 53 | unsigned getRank(Value *V); |
| 54 | bool ReassociateExpr(BinaryOperator *I); |
| 55 | bool ReassociateBB(BasicBlock *BB); |
| 56 | }; |
Chris Lattner | b28b680 | 2002-07-23 18:06:35 +0000 | [diff] [blame] | 57 | |
Chris Lattner | c8b7092 | 2002-07-26 21:12:46 +0000 | [diff] [blame] | 58 | RegisterOpt<Reassociate> X("reassociate", "Reassociate expressions"); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | Pass *createReassociatePass() { return new Reassociate(); } |
| 62 | |
Chris Lattner | 113f4f4 | 2002-06-25 16:13:24 +0000 | [diff] [blame] | 63 | void Reassociate::BuildRankMap(Function &F) { |
Chris Lattner | 58c7eb6 | 2003-08-12 20:14:27 +0000 | [diff] [blame] | 64 | unsigned i = 2; |
Chris Lattner | 8ac196d | 2003-08-13 16:16:26 +0000 | [diff] [blame] | 65 | |
| 66 | // Assign distinct ranks to function arguments |
| 67 | for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) |
| 68 | ValueRankMap[I] = ++i; |
| 69 | |
Chris Lattner | 113f4f4 | 2002-06-25 16:13:24 +0000 | [diff] [blame] | 70 | ReversePostOrderTraversal<Function*> RPOT(&F); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 71 | for (ReversePostOrderTraversal<Function*>::rpo_iterator I = RPOT.begin(), |
| 72 | E = RPOT.end(); I != E; ++I) |
Chris Lattner | 58c7eb6 | 2003-08-12 20:14:27 +0000 | [diff] [blame] | 73 | RankMap[*I] = ++i << 16; |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | unsigned Reassociate::getRank(Value *V) { |
Chris Lattner | 8ac196d | 2003-08-13 16:16:26 +0000 | [diff] [blame] | 77 | if (isa<Argument>(V)) return ValueRankMap[V]; // Function argument... |
| 78 | |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 79 | if (Instruction *I = dyn_cast<Instruction>(V)) { |
Chris Lattner | 58c7eb6 | 2003-08-12 20:14:27 +0000 | [diff] [blame] | 80 | // If this is an expression, return the 1+MAX(rank(LHS), rank(RHS)) so that |
| 81 | // we can reassociate expressions for code motion! Since we do not recurse |
| 82 | // for PHI nodes, we cannot have infinite recursion here, because there |
| 83 | // cannot be loops in the value graph that do not go through PHI nodes. |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 84 | // |
Chris Lattner | b94550e | 2003-10-19 21:34:28 +0000 | [diff] [blame] | 85 | if (I->getOpcode() == Instruction::PHI || |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 86 | I->getOpcode() == Instruction::Alloca || |
| 87 | I->getOpcode() == Instruction::Malloc || isa<TerminatorInst>(I) || |
Chris Lattner | 4869f37 | 2003-02-24 20:48:32 +0000 | [diff] [blame] | 88 | I->mayWriteToMemory()) // Cannot move inst if it writes to memory! |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 89 | return RankMap[I->getParent()]; |
| 90 | |
Chris Lattner | 8ac196d | 2003-08-13 16:16:26 +0000 | [diff] [blame] | 91 | unsigned &CachedRank = ValueRankMap[I]; |
Chris Lattner | 3aa7767 | 2002-12-15 03:56:00 +0000 | [diff] [blame] | 92 | if (CachedRank) return CachedRank; // Rank already known? |
| 93 | |
| 94 | // If not, compute it! |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 95 | unsigned Rank = 0, MaxRank = RankMap[I->getParent()]; |
| 96 | for (unsigned i = 0, e = I->getNumOperands(); |
| 97 | i != e && Rank != MaxRank; ++i) |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 98 | Rank = std::max(Rank, getRank(I->getOperand(i))); |
| 99 | |
Chris Lattner | 58c7eb6 | 2003-08-12 20:14:27 +0000 | [diff] [blame] | 100 | DEBUG(std::cerr << "Calculated Rank[" << V->getName() << "] = " |
| 101 | << Rank+1 << "\n"); |
| 102 | |
| 103 | return CachedRank = Rank+1; |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | // Otherwise it's a global or constant, rank 0. |
| 107 | return 0; |
| 108 | } |
| 109 | |
| 110 | |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 111 | bool Reassociate::ReassociateExpr(BinaryOperator *I) { |
| 112 | Value *LHS = I->getOperand(0); |
| 113 | Value *RHS = I->getOperand(1); |
| 114 | unsigned LHSRank = getRank(LHS); |
| 115 | unsigned RHSRank = getRank(RHS); |
| 116 | |
| 117 | bool Changed = false; |
| 118 | |
| 119 | // Make sure the LHS of the operand always has the greater rank... |
| 120 | if (LHSRank < RHSRank) { |
Chris Lattner | 8fdf75c | 2002-10-31 17:12:59 +0000 | [diff] [blame] | 121 | bool Success = !I->swapOperands(); |
| 122 | assert(Success && "swapOperands failed"); |
| 123 | |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 124 | std::swap(LHS, RHS); |
| 125 | std::swap(LHSRank, RHSRank); |
| 126 | Changed = true; |
Chris Lattner | 0b18c1d | 2002-05-10 15:38:35 +0000 | [diff] [blame] | 127 | ++NumSwapped; |
Chris Lattner | f96c8be | 2002-12-15 03:49:50 +0000 | [diff] [blame] | 128 | DEBUG(std::cerr << "Transposed: " << I |
| 129 | /* << " Result BB: " << I->getParent()*/); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | // If the LHS is the same operator as the current one is, and if we are the |
| 133 | // only expression using it... |
| 134 | // |
| 135 | if (BinaryOperator *LHSI = dyn_cast<BinaryOperator>(LHS)) |
Chris Lattner | f95d9b9 | 2003-10-15 16:48:29 +0000 | [diff] [blame] | 136 | if (LHSI->getOpcode() == I->getOpcode() && LHSI->hasOneUse()) { |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 137 | // If the rank of our current RHS is less than the rank of the LHS's LHS, |
| 138 | // then we reassociate the two instructions... |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 139 | |
Chris Lattner | 98b3ecd | 2003-08-12 21:45:24 +0000 | [diff] [blame] | 140 | unsigned TakeOp = 0; |
| 141 | if (BinaryOperator *IOp = dyn_cast<BinaryOperator>(LHSI->getOperand(0))) |
| 142 | if (IOp->getOpcode() == LHSI->getOpcode()) |
| 143 | TakeOp = 1; // Hoist out non-tree portion |
| 144 | |
| 145 | if (RHSRank < getRank(LHSI->getOperand(TakeOp))) { |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 146 | // Convert ((a + 12) + 10) into (a + (12 + 10)) |
| 147 | I->setOperand(0, LHSI->getOperand(TakeOp)); |
Chris Lattner | f96c8be | 2002-12-15 03:49:50 +0000 | [diff] [blame] | 148 | LHSI->setOperand(TakeOp, RHS); |
| 149 | I->setOperand(1, LHSI); |
Chris Lattner | 8fdf75c | 2002-10-31 17:12:59 +0000 | [diff] [blame] | 150 | |
| 151 | // Move the LHS expression forward, to ensure that it is dominated by |
| 152 | // its operands. |
Chris Lattner | f96c8be | 2002-12-15 03:49:50 +0000 | [diff] [blame] | 153 | LHSI->getParent()->getInstList().remove(LHSI); |
| 154 | I->getParent()->getInstList().insert(I, LHSI); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 155 | |
Chris Lattner | 0b18c1d | 2002-05-10 15:38:35 +0000 | [diff] [blame] | 156 | ++NumChanged; |
Chris Lattner | f96c8be | 2002-12-15 03:49:50 +0000 | [diff] [blame] | 157 | DEBUG(std::cerr << "Reassociated: " << I/* << " Result BB: " |
| 158 | << I->getParent()*/); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 159 | |
| 160 | // Since we modified the RHS instruction, make sure that we recheck it. |
Chris Lattner | f96c8be | 2002-12-15 03:49:50 +0000 | [diff] [blame] | 161 | ReassociateExpr(LHSI); |
Chris Lattner | 58c7eb6 | 2003-08-12 20:14:27 +0000 | [diff] [blame] | 162 | ReassociateExpr(I); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 163 | return true; |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | return Changed; |
| 168 | } |
| 169 | |
| 170 | |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 171 | // NegateValue - Insert instructions before the instruction pointed to by BI, |
| 172 | // that computes the negative version of the value specified. The negative |
| 173 | // version of the value is returned, and BI is left pointing at the instruction |
| 174 | // that should be processed next by the reassociation pass. |
| 175 | // |
Chris Lattner | 8fdf75c | 2002-10-31 17:12:59 +0000 | [diff] [blame] | 176 | static Value *NegateValue(Value *V, BasicBlock::iterator &BI) { |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 177 | // We are trying to expose opportunity for reassociation. One of the things |
| 178 | // that we want to do to achieve this is to push a negation as deep into an |
| 179 | // expression chain as possible, to expose the add instructions. In practice, |
| 180 | // this means that we turn this: |
| 181 | // X = -(A+12+C+D) into X = -A + -12 + -C + -D = -12 + -A + -C + -D |
| 182 | // so that later, a: Y = 12+X could get reassociated with the -12 to eliminate |
| 183 | // the constants. We assume that instcombine will clean up the mess later if |
Misha Brukman | 7eb05a1 | 2003-08-18 14:43:39 +0000 | [diff] [blame] | 184 | // we introduce tons of unnecessary negation instructions... |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 185 | // |
| 186 | if (Instruction *I = dyn_cast<Instruction>(V)) |
Chris Lattner | f95d9b9 | 2003-10-15 16:48:29 +0000 | [diff] [blame] | 187 | if (I->getOpcode() == Instruction::Add && I->hasOneUse()) { |
Chris Lattner | 8fdf75c | 2002-10-31 17:12:59 +0000 | [diff] [blame] | 188 | Value *RHS = NegateValue(I->getOperand(1), BI); |
| 189 | Value *LHS = NegateValue(I->getOperand(0), BI); |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 190 | |
| 191 | // We must actually insert a new add instruction here, because the neg |
| 192 | // instructions do not dominate the old add instruction in general. By |
| 193 | // adding it now, we are assured that the neg instructions we just |
| 194 | // inserted dominate the instruction we are about to insert after them. |
| 195 | // |
Chris Lattner | 28a8d24 | 2002-09-10 17:04:02 +0000 | [diff] [blame] | 196 | return BinaryOperator::create(Instruction::Add, LHS, RHS, |
| 197 | I->getName()+".neg", |
| 198 | cast<Instruction>(RHS)->getNext()); |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 199 | } |
| 200 | |
| 201 | // Insert a 'neg' instruction that subtracts the value from zero to get the |
| 202 | // negation. |
| 203 | // |
Chris Lattner | 8fdf75c | 2002-10-31 17:12:59 +0000 | [diff] [blame] | 204 | return BI = BinaryOperator::createNeg(V, V->getName() + ".neg", BI); |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 208 | bool Reassociate::ReassociateBB(BasicBlock *BB) { |
| 209 | bool Changed = false; |
| 210 | for (BasicBlock::iterator BI = BB->begin(); BI != BB->end(); ++BI) { |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 211 | |
Chris Lattner | f96c8be | 2002-12-15 03:49:50 +0000 | [diff] [blame] | 212 | DEBUG(std::cerr << "Processing: " << *BI); |
Chris Lattner | 8fdf75c | 2002-10-31 17:12:59 +0000 | [diff] [blame] | 213 | if (BI->getOpcode() == Instruction::Sub && !BinaryOperator::isNeg(BI)) { |
| 214 | // Convert a subtract into an add and a neg instruction... so that sub |
| 215 | // instructions can be commuted with other add instructions... |
| 216 | // |
| 217 | // Calculate the negative value of Operand 1 of the sub instruction... |
| 218 | // and set it as the RHS of the add instruction we just made... |
| 219 | // |
| 220 | std::string Name = BI->getName(); |
| 221 | BI->setName(""); |
| 222 | Instruction *New = |
| 223 | BinaryOperator::create(Instruction::Add, BI->getOperand(0), |
| 224 | BI->getOperand(1), Name, BI); |
| 225 | |
| 226 | // Everyone now refers to the add instruction... |
| 227 | BI->replaceAllUsesWith(New); |
| 228 | |
| 229 | // Put the new add in the place of the subtract... deleting the subtract |
| 230 | BB->getInstList().erase(BI); |
| 231 | |
| 232 | BI = New; |
| 233 | New->setOperand(1, NegateValue(New->getOperand(1), BI)); |
| 234 | |
| 235 | Changed = true; |
Chris Lattner | f96c8be | 2002-12-15 03:49:50 +0000 | [diff] [blame] | 236 | DEBUG(std::cerr << "Negated: " << New /*<< " Result BB: " << BB*/); |
Chris Lattner | 8fdf75c | 2002-10-31 17:12:59 +0000 | [diff] [blame] | 237 | } |
| 238 | |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 239 | // If this instruction is a commutative binary operator, and the ranks of |
| 240 | // the two operands are sorted incorrectly, fix it now. |
| 241 | // |
Chris Lattner | 8fdf75c | 2002-10-31 17:12:59 +0000 | [diff] [blame] | 242 | if (BI->isAssociative()) { |
Chris Lattner | 889f620 | 2003-04-23 16:37:45 +0000 | [diff] [blame] | 243 | BinaryOperator *I = cast<BinaryOperator>(BI); |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 244 | if (!I->use_empty()) { |
| 245 | // Make sure that we don't have a tree-shaped computation. If we do, |
| 246 | // linearize it. Convert (A+B)+(C+D) into ((A+B)+C)+D |
| 247 | // |
| 248 | Instruction *LHSI = dyn_cast<Instruction>(I->getOperand(0)); |
| 249 | Instruction *RHSI = dyn_cast<Instruction>(I->getOperand(1)); |
| 250 | if (LHSI && (int)LHSI->getOpcode() == I->getOpcode() && |
| 251 | RHSI && (int)RHSI->getOpcode() == I->getOpcode() && |
Chris Lattner | f95d9b9 | 2003-10-15 16:48:29 +0000 | [diff] [blame] | 252 | RHSI->hasOneUse()) { |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 253 | // Insert a new temporary instruction... (A+B)+C |
| 254 | BinaryOperator *Tmp = BinaryOperator::create(I->getOpcode(), LHSI, |
| 255 | RHSI->getOperand(0), |
Chris Lattner | 28a8d24 | 2002-09-10 17:04:02 +0000 | [diff] [blame] | 256 | RHSI->getName()+".ra", |
| 257 | BI); |
| 258 | BI = Tmp; |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 259 | I->setOperand(0, Tmp); |
| 260 | I->setOperand(1, RHSI->getOperand(1)); |
| 261 | |
| 262 | // Process the temporary instruction for reassociation now. |
| 263 | I = Tmp; |
| 264 | ++NumLinear; |
| 265 | Changed = true; |
Chris Lattner | f96c8be | 2002-12-15 03:49:50 +0000 | [diff] [blame] | 266 | DEBUG(std::cerr << "Linearized: " << I/* << " Result BB: " << BB*/); |
Chris Lattner | 7bc532d | 2002-05-16 04:37:07 +0000 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | // Make sure that this expression is correctly reassociated with respect |
| 270 | // to it's used values... |
| 271 | // |
| 272 | Changed |= ReassociateExpr(I); |
| 273 | } |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 274 | } |
| 275 | } |
| 276 | |
| 277 | return Changed; |
| 278 | } |
| 279 | |
| 280 | |
Chris Lattner | 113f4f4 | 2002-06-25 16:13:24 +0000 | [diff] [blame] | 281 | bool Reassociate::runOnFunction(Function &F) { |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 282 | // Recalculate the rank map for F |
| 283 | BuildRankMap(F); |
| 284 | |
| 285 | bool Changed = false; |
Chris Lattner | 113f4f4 | 2002-06-25 16:13:24 +0000 | [diff] [blame] | 286 | for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI) |
| 287 | Changed |= ReassociateBB(FI); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 288 | |
| 289 | // We are done with the rank map... |
| 290 | RankMap.clear(); |
Chris Lattner | 8ac196d | 2003-08-13 16:16:26 +0000 | [diff] [blame] | 291 | ValueRankMap.clear(); |
Chris Lattner | c0f5800 | 2002-05-08 22:19:27 +0000 | [diff] [blame] | 292 | return Changed; |
| 293 | } |