[SimplifyCFG] use pass options and remove the latesimplifycfg pass
authorSanjay Patel <spatel@rotateright.com>
Sat, 28 Oct 2017 18:43:07 +0000 (18:43 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sat, 28 Oct 2017 18:43:07 +0000 (18:43 +0000)
commitb04917315716baeefddf56ebba200a9dd7cc236c
tree265daef25cac77a67ff2cf7459824aef4a7994ae
parent25808c303fa4f0ea4c02a9928b911121c2e37660
[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
25 files changed:
llvm/include/llvm-c/Transforms/Scalar.h
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/LinkAllPasses.h
llvm/include/llvm/Transforms/Scalar.h
llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h
llvm/include/llvm/Transforms/Utils/Local.h
llvm/lib/LTO/LTOCodeGenerator.cpp
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/lib/Target/ARM/ARMTargetMachine.cpp
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
llvm/lib/Transforms/Scalar/Scalar.cpp
llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
llvm/test/CodeGen/AArch64/cmpxchg-idioms.ll
llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
llvm/test/Transforms/LoopVectorize/float-induction.ll
llvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table.ll
llvm/test/Transforms/SimplifyCFG/CoveredLookupTable.ll
llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
llvm/test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll
llvm/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll
llvm/test/Transforms/SimplifyCFG/X86/switch-table-bug.ll
llvm/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
llvm/test/Transforms/SimplifyCFG/multiple-phis.ll
llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll
llvm/test/Transforms/SimplifyCFG/rangereduce.ll