forked from OSchip/llvm-project
parent
fe8d866fc7
commit
45c1505bf6
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue