aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-03-15 22:23:03 +0000
committerDevang Patel <dpatel@apple.com>2010-03-15 22:23:03 +0000
commitacdcabcab4dcbfb7d5c37458c366af5d674084b4 (patch)
treee146c918618921ff6b05361b18d06f994c923bee
parent5535ffd1ccdb4e6c7f3cdc6d72b7e49b0034645c (diff)
downloadexternal_llvm-acdcabcab4dcbfb7d5c37458c366af5d674084b4.zip
external_llvm-acdcabcab4dcbfb7d5c37458c366af5d674084b4.tar.gz
external_llvm-acdcabcab4dcbfb7d5c37458c366af5d674084b4.tar.bz2
Skip debug info intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98584 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 838a3e7..de93e9f 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -43,6 +43,7 @@
#include "llvm/BasicBlock.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
+#include "llvm/IntrinsicInst.h"
#include "llvm/LLVMContext.h"
#include "llvm/Type.h"
#include "llvm/Analysis/Dominators.h"
@@ -556,6 +557,9 @@ void IndVarSimplify::SinkUnusedInvariants(Loop *L) {
// dominates the exit block.
if (I->mayHaveSideEffects() || I->mayReadFromMemory())
continue;
+ // Skip debug info intrinsics.
+ if (isa<DbgInfoIntrinsic>(I))
+ continue;
// Don't sink static AllocaInsts out of the entry block, which would
// turn them into dynamic allocas!
if (AllocaInst *AI = dyn_cast<AllocaInst>(I))