summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid L. Jones <dlj@google.com>2017-11-06 00:32:01 +0000
committerDavid L. Jones <dlj@google.com>2017-11-06 00:32:01 +0000
commitc8200b76884d6c8166cbe114131009ebde31b6f6 (patch)
treea7e4a16b669ebfceb0383415b74544bf06a4a0ea /include
parentd864a8df8f60949a7bfbb33cdbf9f175e48c1fbd (diff)
[PassManager, SimplifyCFG] Revert r316908 and r316869.
These cause Clang to crash with a segfault. See PR35210 for details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Transforms/Scalar/SimplifyCFG.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/llvm/Transforms/Scalar/SimplifyCFG.h b/include/llvm/Transforms/Scalar/SimplifyCFG.h
index ed6b1b1853b..e955673283e 100644
--- a/include/llvm/Transforms/Scalar/SimplifyCFG.h
+++ b/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 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.
+ /// 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.
SimplifyCFGPass()
: SimplifyCFGPass(SimplifyCFGOptions()
- .forwardSwitchCondToPhi(false)
- .convertSwitchToLookupTable(false)
- .needCanonicalLoops(true)) {}
-
+ .forwardSwitchCondToPhi(true)
+ .convertSwitchToLookupTable(true)
+ .needCanonicalLoops(false)) {}
/// Construct a pass with optional optimizations.
SimplifyCFGPass(const SimplifyCFGOptions &PassOptions);