summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h')
-rw-r--r--llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h b/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h
index 54b51c405ad..ef47fa8e684 100644
--- a/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h
+++ b/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h
@@ -17,26 +17,25 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"
+#include "llvm/Transforms/Utils/Local.h"
namespace llvm {
-/// \brief A pass to simplify and canonicalize the CFG of a function.
+/// A pass to simplify and canonicalize the CFG of a function.
///
-/// This pass iteratively simplifies the entire CFG of a function, removing
-/// unnecessary control flows and bringing it into the canonical form expected
-/// by the rest of the mid-level optimizer.
+/// This pass iteratively simplifies the entire CFG of a function. It may change
+/// or remove control flow to put the CFG into a canonical form expected by
+/// other passes of the mid-level optimizer. Depending on the specified options,
+/// it may further optimize control-flow to create non-canonical forms.
class SimplifyCFGPass : public PassInfoMixin<SimplifyCFGPass> {
- int BonusInstThreshold;
- bool LateSimplifyCFG;
+ SimplifyCFGOptions Options;
public:
- /// \brief Construct a pass with the default thresholds
- /// and switch optimizations.
+ /// Construct a pass with default options.
SimplifyCFGPass();
- /// \brief Construct a pass with a specific bonus threshold
- /// and optional switch optimizations.
- SimplifyCFGPass(int BonusInstThreshold, bool LateSimplifyCFG);
+ /// Construct a pass with optional optimizations.
+ SimplifyCFGPass(const SimplifyCFGOptions &PassOptions);
/// \brief Run the pass over the function.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
OpenPOWER on IntegriCloud