diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-11-15 16:33:11 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-11-15 16:33:11 +0000 |
commit | 3e29890a7f5b4a9efaecb5884fb29ee87c8571fb (patch) | |
tree | 9d4a3e2d9e8eeaab7abf4f79111f01560f0a0e2f /llvm/include | |
parent | d1becd082a233d6aab18d774b33a422b016bf559 (diff) | |
download | bcm5719-llvm-3e29890a7f5b4a9efaecb5884fb29ee87c8571fb.tar.gz bcm5719-llvm-3e29890a7f5b4a9efaecb5884fb29ee87c8571fb.zip |
[(new) Pass Manager] instantiate SimplifyCFG with the same options as the old PM
This is a recommit of r316869 which was speculatively reverted with r317444 and
subsequently shown to not be the cause of PR35210. That crash should be fixed
after r318237.
Original commit message:
The old PM sets the options of what used to be known as "latesimplifycfg" on the
instantiation after the vectorizers have run, so that's what we'redoing here.
FWIW, there's a later SimplifyCFGPass instantiation in both PMs where we do not
set the "late" options. I'm not sure if that's intentional or not.
Differential Revision: https://reviews.llvm.org/D39407
llvm-svn: 318299
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h b/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h index e955673283e..ed6b1b1853b 100644 --- a/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h +++ b/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h @@ -31,16 +31,16 @@ class SimplifyCFGPass : public PassInfoMixin<SimplifyCFGPass> { SimplifyCFGOptions Options; public: - /// The default constructor sets the pass options to create optimal IR, - /// rather than canonical IR. That is, by default we do transformations that - /// are likely to improve performance but make analysis more difficult. - /// FIXME: This is inverted from what most instantiations of the pass should - /// be. + /// The default constructor sets the pass options to create canonical IR, + /// rather than optimal IR. That is, by default we bypass transformations that + /// are likely to improve performance but make analysis for other passes more + /// difficult. SimplifyCFGPass() : SimplifyCFGPass(SimplifyCFGOptions() - .forwardSwitchCondToPhi(true) - .convertSwitchToLookupTable(true) - .needCanonicalLoops(false)) {} + .forwardSwitchCondToPhi(false) + .convertSwitchToLookupTable(false) + .needCanonicalLoops(true)) {} + /// Construct a pass with optional optimizations. SimplifyCFGPass(const SimplifyCFGOptions &PassOptions); |