diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-06 18:42:36 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-06 18:42:36 +0000 |
commit | 508955156a25a9abc470a29e1760aa176d341cf9 (patch) | |
tree | 8b7b55caabc0fbb16b6025f38e84ebc4fbd79c31 /lib/Transforms/Utils/UnrollLoop.cpp | |
parent | e034393b15bc9257314b0c7adfb778e0c504bed7 (diff) |
Thread LLVMContext through the constant folding APIs, which touches a lot of files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/UnrollLoop.cpp')
-rw-r--r-- | lib/Transforms/Utils/UnrollLoop.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/UnrollLoop.cpp b/lib/Transforms/Utils/UnrollLoop.cpp index caef7ec5c4..6b012f6c4e 100644 --- a/lib/Transforms/Utils/UnrollLoop.cpp +++ b/lib/Transforms/Utils/UnrollLoop.cpp @@ -349,7 +349,8 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM) if (isInstructionTriviallyDead(Inst)) (*BB)->getInstList().erase(Inst); - else if (Constant *C = ConstantFoldInstruction(Inst)) { + else if (Constant *C = ConstantFoldInstruction(Inst, + Header->getContext())) { Inst->replaceAllUsesWith(C); (*BB)->getInstList().erase(Inst); } |