Don't assign rank numbers to debug intrinsic "calls".
authorDale Johannesen <dalej@apple.com>
Fri, 6 Mar 2009 01:41:59 +0000 (01:41 +0000)
committerDale Johannesen <dalej@apple.com>
Fri, 6 Mar 2009 01:41:59 +0000 (01:41 +0000)
This is needed so debug info doesn't change codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66235 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/Reassociate.cpp

index c33e3206dca0eba6774ebdca855999aef54673bf..cf5887e6e210f730d7d29a8555c28055e7e6560b 100644 (file)
@@ -26,6 +26,7 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/Function.h"
 #include "llvm/Instructions.h"
+#include "llvm/IntrinsicInst.h"
 #include "llvm/Pass.h"
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Support/CFG.h"
@@ -120,7 +121,8 @@ static bool isUnmovableInstruction(Instruction *I) {
       I->getOpcode() == Instruction::Load ||
       I->getOpcode() == Instruction::Malloc ||
       I->getOpcode() == Instruction::Invoke ||
-      I->getOpcode() == Instruction::Call ||
+      (I->getOpcode() == Instruction::Call &&
+       !isa<DbgInfoIntrinsic>(I)) ||
       I->getOpcode() == Instruction::UDiv || 
       I->getOpcode() == Instruction::SDiv ||
       I->getOpcode() == Instruction::FDiv ||