summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LoopRotation.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-02-14 23:03:23 +0000
committerDevang Patel <dpatel@apple.com>2011-02-14 23:03:23 +0000
commit3fc178ffdad0c3359f8e4bad084556a3054e1ed2 (patch)
tree0cdf5d84bd389e9b2101d78f372388606aa362cb /lib/Transforms/Scalar/LoopRotation.cpp
parent5d618ef7f1ad005fc6912f3e9a08c044b082e47f (diff)
downloadllvm-3fc178ffdad0c3359f8e4bad084556a3054e1ed2.tar.gz
llvm-3fc178ffdad0c3359f8e4bad084556a3054e1ed2.tar.bz2
llvm-3fc178ffdad0c3359f8e4bad084556a3054e1ed2.tar.xz
Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopRotation.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopRotation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp
index 3bc4b1d2f1..95e15784df 100644
--- a/lib/Transforms/Scalar/LoopRotation.cpp
+++ b/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;
}