diff options
author | Devang Patel <dpatel@apple.com> | 2010-03-15 22:23:03 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-03-15 22:23:03 +0000 |
commit | 7b9f6b1b21bc0b06f3c72beae51e9db631319503 (patch) | |
tree | e146c918618921ff6b05361b18d06f994c923bee | |
parent | d6e59084d07500f68548652b8197325809a0c0c2 (diff) |
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.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 838a3e7487..de93e9f621 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)) |