LLVM  10.0.0svn
Public Member Functions | Public Attributes | List of all members
llvm::CombinerInfo Class Referenceabstract

#include "llvm/CodeGen/GlobalISel/CombinerInfo.h"

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

Public Member Functions

 CombinerInfo (bool AllowIllegalOps, bool ShouldLegalizeIllegal, LegalizerInfo *LInfo, bool OptEnabled, bool OptSize, bool MinSize)
 
virtual ~CombinerInfo ()=default
 
virtual bool combine (GISelChangeObserver &Observer, MachineInstr &MI, MachineIRBuilder &B) const =0
 Attempt to combine instructions using MI as the root. More...
 

Public Attributes

bool IllegalOpsAllowed
 If IllegalOpsAllowed is false, the CombinerHelper will make use of the legalizerInfo to check for legality before each transformation. More...
 
bool LegalizeIllegalOps
 If LegalizeIllegalOps is true, the Combiner will also legalize the illegal ops that are created. More...
 
const LegalizerInfoLInfo
 
bool EnableOpt
 Whether optimizations should be enabled. More...
 
bool EnableOptSize
 Whether we're optimizing for size. More...
 
bool EnableMinSize
 Whether we're optimizing for minsize (-Oz). More...
 

Detailed Description

Definition at line 27 of file CombinerInfo.h.

Constructor & Destructor Documentation

◆ CombinerInfo()

llvm::CombinerInfo::CombinerInfo ( bool  AllowIllegalOps,
bool  ShouldLegalizeIllegal,
LegalizerInfo LInfo,
bool  OptEnabled,
bool  OptSize,
bool  MinSize 
)
inline

Definition at line 29 of file CombinerInfo.h.

References assert(), LegalizeIllegalOps, and ~CombinerInfo().

◆ ~CombinerInfo()

virtual llvm::CombinerInfo::~CombinerInfo ( )
virtualdefault

Referenced by CombinerInfo().

Member Function Documentation

◆ combine()

virtual bool llvm::CombinerInfo::combine ( GISelChangeObserver Observer,
MachineInstr MI,
MachineIRBuilder B 
) const
pure virtual

Attempt to combine instructions using MI as the root.

Use Observer to report the creation, modification, and erasure of instructions. GISelChangeObserver will automatically report certain kinds of operations. These operations are:

However, it is important to report instruction modification and this is not automatic.

Referenced by llvm::Combiner::combineMachineInstrs().

Member Data Documentation

◆ EnableMinSize

bool llvm::CombinerInfo::EnableMinSize

Whether we're optimizing for minsize (-Oz).

Definition at line 55 of file CombinerInfo.h.

◆ EnableOpt

bool llvm::CombinerInfo::EnableOpt

Whether optimizations should be enabled.

This is to distinguish between uses of the combiner unconditionally and only when optimizations are specifically enabled/

Definition at line 51 of file CombinerInfo.h.

◆ EnableOptSize

bool llvm::CombinerInfo::EnableOptSize

Whether we're optimizing for size.

Definition at line 53 of file CombinerInfo.h.

◆ IllegalOpsAllowed

bool llvm::CombinerInfo::IllegalOpsAllowed

If IllegalOpsAllowed is false, the CombinerHelper will make use of the legalizerInfo to check for legality before each transformation.

Definition at line 41 of file CombinerInfo.h.

◆ LegalizeIllegalOps

bool llvm::CombinerInfo::LegalizeIllegalOps

If LegalizeIllegalOps is true, the Combiner will also legalize the illegal ops that are created.

Definition at line 45 of file CombinerInfo.h.

Referenced by CombinerInfo().

◆ LInfo

const LegalizerInfo* llvm::CombinerInfo::LInfo

Definition at line 46 of file CombinerInfo.h.


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