class SimplifyCFGPass

Declaration

class SimplifyCFGPass : public PassInfoMixin { /* full declaration omitted */ };

Description

A pass to simplify and canonicalize the CFG of a function. 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.

Declared at: llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h:29

Inherits from: PassInfoMixin

Method Overview

  • public SimplifyCFGPass()
  • public SimplifyCFGPass(const llvm::SimplifyCFGOptions & PassOptions)
  • public llvm::PreservedAnalyses run(llvm::Function & F, llvm::FunctionAnalysisManager & AM)

Methods

SimplifyCFGPass()

Description

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.

Declared at: llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h:37

SimplifyCFGPass(
    const llvm::SimplifyCFGOptions& PassOptions)

Description

Construct a pass with optional optimizations.

Declared at: llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h:46

Parameters

const llvm::SimplifyCFGOptions& PassOptions

llvm::PreservedAnalyses run(
    llvm::Function& F,
    llvm::FunctionAnalysisManager& AM)

Description

Run the pass over the function.

Declared at: llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h:49

Parameters

llvm::Function& F
llvm::FunctionAnalysisManager& AM