summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-01-14 23:25:22 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-01-14 23:25:22 +0000
commit5edfd4d99e44c70130bdef9152522620f4a41add (patch)
treec06dbab78173db809797223962988c9fc952dfd8 /llvm/lib/Transforms
parentca3124f74bbaef34e84b60a44acc262d93b344ed (diff)
downloadbcm5719-llvm-5edfd4d99e44c70130bdef9152522620f4a41add.tar.gz
bcm5719-llvm-5edfd4d99e44c70130bdef9152522620f4a41add.zip
[PM] Fix instcombine's analysis preservation in the new pass manager to
cover domtree and alias analysis. These are the pretty clear analyses that we would always want to survive this pass. To make these survive, we also need to preserve the assumption cache. Added a test that verifies the important bits of this preservation. llvm-svn: 292037
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 27fc34d2317..b2c4baae99b 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -3178,7 +3178,10 @@ PreservedAnalyses InstCombinePass::run(Function &F,
// Mark all the analyses that instcombine updates as preserved.
// FIXME: This should also 'preserve the CFG'.
PreservedAnalyses PA;
+ PA.preserve<AAManager>();
+ PA.preserve<AssumptionAnalysis>();
PA.preserve<DominatorTreeAnalysis>();
+ PA.preserve<GlobalsAA>();
return PA;
}
OpenPOWER on IntegriCloud