diff options
author | Devang Patel <dpatel@apple.com> | 2011-02-14 23:03:23 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-02-14 23:03:23 +0000 |
commit | 30583986553220a2fa299913a16c3b057e32ec80 (patch) | |
tree | 990433f577993e2387b54b1193bfeac850b8f9b8 /llvm/lib/Transforms/Scalar/LoopRotation.cpp | |
parent | eccad4d005a849f1eaa6aacd7726c9e604dba396 (diff) | |
download | bcm5719-llvm-30583986553220a2fa299913a16c3b057e32ec80.tar.gz bcm5719-llvm-30583986553220a2fa299913a16c3b057e32ec80.zip |
Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop.
llvm-svn: 125529
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopRotation.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopRotation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp index 3bc4b1d2f1c..95e15784df2 100644 --- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp +++ b/llvm/lib/Transforms/Scalar/LoopRotation.cpp @@ -14,6 +14,7 @@ #define DEBUG_TYPE "loop-rotate" #include "llvm/Transforms/Scalar.h" #include "llvm/Function.h" +#include "llvm/IntrinsicInst.h" #include "llvm/Analysis/CodeMetrics.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/InstructionSimplify.h" @@ -231,7 +232,7 @@ bool LoopRotate::rotateLoop(Loop *L) { // memory (without proving that the loop doesn't write). if (L->hasLoopInvariantOperands(Inst) && !Inst->mayReadFromMemory() && !Inst->mayWriteToMemory() && - !isa<TerminatorInst>(Inst)) { + !isa<TerminatorInst>(Inst) && !isa<DbgInfoIntrinsic>(Inst)) { Inst->moveBefore(LoopEntryBranch); continue; } |