summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-12 22:54:24 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-12 22:54:24 +0000
commit81c03a778449098627684730ad3d8a0533ded13d (patch)
tree4a6bda0d7f9b1f49246abcfb491a6ad5a280745b /llvm/lib/Analysis
parente391d9653f71b59e134a1921ca8655db128111b7 (diff)
downloadbcm5719-llvm-81c03a778449098627684730ad3d8a0533ded13d.tar.gz
bcm5719-llvm-81c03a778449098627684730ad3d8a0533ded13d.zip
[InstSimplify] Don't try to constant fold AllocaInsts since it won't do anything.
Should give a small compile time improvement. llvm-svn: 300125
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index 0e522cb4e49..e12f640394e 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -4627,6 +4627,10 @@ Value *llvm::SimplifyInstruction(Instruction *I, const DataLayout &DL,
Result = SimplifyCastInst(I->getOpcode(), I->getOperand(0), I->getType(),
DL, TLI, DT, AC, I);
break;
+ case Instruction::Alloca:
+ // No simplifications for Alloca and it can't be constant folded.
+ Result = nullptr;
+ break;
}
// In general, it is possible for computeKnownBits to determine all bits in a
OpenPOWER on IntegriCloud