LLVM  11.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::SimplifyCFGOptions Struct Reference

A set of parameters used to control the transforms in the SimplifyCFG pass. More...

#include "llvm/Transforms/Utils/Local.h"

Collaboration diagram for llvm::SimplifyCFGOptions:
Collaboration graph
[legend]

Public Member Functions

 SimplifyCFGOptions (unsigned BonusThreshold=1, bool ForwardSwitchCond=false, bool SwitchToLookup=false, bool CanonicalLoops=true, bool SinkCommon=false, AssumptionCache *AssumpCache=nullptr, bool SimplifyCondBranch=true, bool FoldTwoEntryPHINode=true)
 
SimplifyCFGOptionsbonusInstThreshold (int I)
 
SimplifyCFGOptionsforwardSwitchCondToPhi (bool B)
 
SimplifyCFGOptionsconvertSwitchToLookupTable (bool B)
 
SimplifyCFGOptionsneedCanonicalLoops (bool B)
 
SimplifyCFGOptionssinkCommonInsts (bool B)
 
SimplifyCFGOptionssetAssumptionCache (AssumptionCache *Cache)
 
SimplifyCFGOptionssetSimplifyCondBranch (bool B)
 
SimplifyCFGOptionssetFoldTwoEntryPHINode (bool B)
 

Public Attributes

int BonusInstThreshold
 
bool ForwardSwitchCondToPhi
 
bool ConvertSwitchToLookupTable
 
bool NeedCanonicalLoop
 
bool SinkCommonInsts
 
bool SimplifyCondBranch
 
bool FoldTwoEntryPHINode
 
AssumptionCacheAC
 

Detailed Description

A set of parameters used to control the transforms in the SimplifyCFG pass.

Options may change depending on the position in the optimization pipeline. For example, canonical form that includes switches and branches may later be replaced by lookup tables and selects.

Definition at line 63 of file Local.h.

Constructor & Destructor Documentation

◆ SimplifyCFGOptions()

llvm::SimplifyCFGOptions::SimplifyCFGOptions ( unsigned  BonusThreshold = 1,
bool  ForwardSwitchCond = false,
bool  SwitchToLookup = false,
bool  CanonicalLoops = true,
bool  SinkCommon = false,
AssumptionCache AssumpCache = nullptr,
bool  SimplifyCondBranch = true,
bool  FoldTwoEntryPHINode = true 
)
inline

Definition at line 74 of file Local.h.

Member Function Documentation

◆ bonusInstThreshold()

SimplifyCFGOptions& llvm::SimplifyCFGOptions::bonusInstThreshold ( int  I)
inline

Definition at line 91 of file Local.h.

References I.

Referenced by checkParametrizedPassName().

◆ convertSwitchToLookupTable()

SimplifyCFGOptions& llvm::SimplifyCFGOptions::convertSwitchToLookupTable ( bool  B)
inline

Definition at line 99 of file Local.h.

References B.

Referenced by checkParametrizedPassName().

◆ forwardSwitchCondToPhi()

SimplifyCFGOptions& llvm::SimplifyCFGOptions::forwardSwitchCondToPhi ( bool  B)
inline

Definition at line 95 of file Local.h.

References B.

Referenced by checkParametrizedPassName().

◆ needCanonicalLoops()

SimplifyCFGOptions& llvm::SimplifyCFGOptions::needCanonicalLoops ( bool  B)
inline

Definition at line 103 of file Local.h.

References B.

Referenced by checkParametrizedPassName().

◆ setAssumptionCache()

SimplifyCFGOptions& llvm::SimplifyCFGOptions::setAssumptionCache ( AssumptionCache Cache)
inline

Definition at line 111 of file Local.h.

◆ setFoldTwoEntryPHINode()

SimplifyCFGOptions& llvm::SimplifyCFGOptions::setFoldTwoEntryPHINode ( bool  B)
inline

◆ setSimplifyCondBranch()

SimplifyCFGOptions& llvm::SimplifyCFGOptions::setSimplifyCondBranch ( bool  B)
inline

Definition at line 115 of file Local.h.

References B.

Referenced by llvm::SimplifyCFGPass::run().

◆ sinkCommonInsts()

SimplifyCFGOptions& llvm::SimplifyCFGOptions::sinkCommonInsts ( bool  B)
inline

Definition at line 107 of file Local.h.

References B.

Referenced by checkParametrizedPassName().

Member Data Documentation

◆ AC

AssumptionCache* llvm::SimplifyCFGOptions::AC

◆ BonusInstThreshold

int llvm::SimplifyCFGOptions::BonusInstThreshold

◆ ConvertSwitchToLookupTable

bool llvm::SimplifyCFGOptions::ConvertSwitchToLookupTable

Definition at line 66 of file Local.h.

Referenced by llvm::SimplifyCFGPass::run(), and llvm::SimplifyCFGPass::SimplifyCFGPass().

◆ FoldTwoEntryPHINode

bool llvm::SimplifyCFGOptions::FoldTwoEntryPHINode

Definition at line 70 of file Local.h.

◆ ForwardSwitchCondToPhi

bool llvm::SimplifyCFGOptions::ForwardSwitchCondToPhi

Definition at line 65 of file Local.h.

Referenced by llvm::SimplifyCFGPass::run(), and llvm::SimplifyCFGPass::SimplifyCFGPass().

◆ NeedCanonicalLoop

bool llvm::SimplifyCFGOptions::NeedCanonicalLoop

Definition at line 67 of file Local.h.

Referenced by llvm::SimplifyCFGPass::run(), and llvm::SimplifyCFGPass::SimplifyCFGPass().

◆ SimplifyCondBranch

bool llvm::SimplifyCFGOptions::SimplifyCondBranch

Definition at line 69 of file Local.h.

◆ SinkCommonInsts

bool llvm::SimplifyCFGOptions::SinkCommonInsts

Definition at line 68 of file Local.h.

Referenced by llvm::SimplifyCFGPass::run(), and llvm::SimplifyCFGPass::SimplifyCFGPass().


The documentation for this struct was generated from the following file: