summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMTargetMachine.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-10-28 18:43:07 +0000
committerSanjay Patel <spatel@rotateright.com>2017-10-28 18:43:07 +0000
commitb04917315716baeefddf56ebba200a9dd7cc236c (patch)
tree265daef25cac77a67ff2cf7459824aef4a7994ae /llvm/lib/Target/ARM/ARMTargetMachine.cpp
parent25808c303fa4f0ea4c02a9928b911121c2e37660 (diff)
downloadbcm5719-llvm-b04917315716baeefddf56ebba200a9dd7cc236c.tar.gz
bcm5719-llvm-b04917315716baeefddf56ebba200a9dd7cc236c.zip
[SimplifyCFG] use pass options and remove the latesimplifycfg pass
This is no-functional-change-intended. This is repackaging the functionality of D30333 (defer switch-to-lookup-tables) and D35411 (defer folding unconditional branches) with pass parameters rather than a named "latesimplifycfg" pass. Now that we have individual options to control the functionality, we could decouple when these fire (but that's an independent patch if desired). The next planned step would be to add another option bit to disable the sinking transform mentioned in D38566. This should also make it clear that the new pass manager needs to be updated to limit simplifycfg in the same way as the old pass manager. Differential Revision: https://reviews.llvm.org/D38631 llvm-svn: 316835
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMTargetMachine.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
index 39b8df401aa..1d1bb5d1de4 100644
--- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
@@ -384,10 +384,11 @@ void ARMPassConfig::addIRPasses() {
// determine whether it succeeded. We can exploit existing control-flow in
// ldrex/strex loops to simplify this, but it needs tidying up.
if (TM->getOptLevel() != CodeGenOpt::None && EnableAtomicTidy)
- addPass(createCFGSimplificationPass(-1, [this](const Function &F) {
- const auto &ST = this->TM->getSubtarget<ARMSubtarget>(F);
- return ST.hasAnyDataBarrier() && !ST.isThumb1Only();
- }));
+ addPass(createCFGSimplificationPass(
+ 1, false, false, true, [this](const Function &F) {
+ const auto &ST = this->TM->getSubtarget<ARMSubtarget>(F);
+ return ST.hasAnyDataBarrier() && !ST.isThumb1Only();
+ }));
TargetPassConfig::addIRPasses();
OpenPOWER on IntegriCloud