LLVM 20.0.0git
|
Combiner implementation. More...
#include "llvm/CodeGen/GlobalISel/Combiner.h"
Classes | |
class | WorkListMaintainer |
This class acts as the glue that joins the CombinerHelper to the overall Combine algorithm. More... | |
Public Member Functions | |
Combiner (MachineFunction &MF, CombinerInfo &CInfo, const TargetPassConfig *TPC, GISelKnownBits *KB, GISelCSEInfo *CSEInfo=nullptr) | |
If CSEInfo is not null, then the Combiner will use CSEInfo as the observer and also create a CSEMIRBuilder. | |
virtual | ~Combiner () |
virtual bool | tryCombineAll (MachineInstr &I) const =0 |
bool | combineMachineInstrs () |
Public Member Functions inherited from llvm::GIMatchTableExecutor | |
virtual | ~GIMatchTableExecutor ()=default |
virtual void | setupGeneratedPerFunctionState (MachineFunction &MF)=0 |
virtual void | setupMF (MachineFunction &mf, GISelKnownBits *kb, CodeGenCoverage *covinfo=nullptr, ProfileSummaryInfo *psi=nullptr, BlockFrequencyInfo *bfi=nullptr) |
Setup per-MF executor state. | |
Protected Attributes | |
CombinerInfo & | CInfo |
GISelChangeObserver & | Observer |
MachineIRBuilder & | B |
MachineFunction & | MF |
MachineRegisterInfo & | MRI |
GISelKnownBits * | KB |
const TargetPassConfig * | TPC |
GISelCSEInfo * | CSEInfo |
Combiner implementation.
This is per-function, so passes need to recreate one of these each time they enter a new function.
TODO: Is it worth making this module-wide?
Definition at line 34 of file Combiner.h.
Combiner::Combiner | ( | MachineFunction & | MF, |
CombinerInfo & | CInfo, | ||
const TargetPassConfig * | TPC, | ||
GISelKnownBits * | KB, | ||
GISelCSEInfo * | CSEInfo = nullptr |
||
) |
If CSEInfo is not null, then the Combiner will use CSEInfo as the observer and also create a CSEMIRBuilder.
Pass nullptr if CSE is not needed.
Definition at line 224 of file Combiner.cpp.
References B, CSEInfo, MF, llvm::MachineIRBuilder::setChangeObserver(), llvm::MachineIRBuilder::setCSEInfo(), and llvm::MachineIRBuilder::setMF().
|
virtualdefault |
bool Combiner::combineMachineInstrs | ( | ) |
Definition at line 255 of file Combiner.cpp.
References assert(), CInfo, llvm::GISelWorkList< N >::clear(), CSEInfo, llvm::dbgs(), llvm::CombinerInfo::DCE, llvm::GISelWorkList< N >::deferred_insert(), llvm::GISelWorkList< N >::empty(), llvm::CombinerInfo::EnableFullDCE, llvm::errs(), llvm::MachineFunctionProperties::FailedISel, llvm::GISelWorkList< N >::finalize(), llvm::MachineFunction::getName(), llvm::MachineFunction::getProperties(), llvm::MachineFunctionProperties::hasProperty(), KB, LLVM_DEBUG, llvm::make_early_inc_range(), llvm::CombinerInfo::MaxIterations, MBB, MF, MORE, MRI, llvm::CombinerInfo::ObserverLvl, llvm::GISelWorkList< N >::pop_back_val(), llvm::post_order(), llvm::reverse(), llvm::GIMatchTableExecutor::setupMF(), tryCombineAll(), and llvm::GISelCSEInfo::verify().
|
pure virtual |
Referenced by combineMachineInstrs().
|
protected |
Definition at line 72 of file Combiner.h.
Referenced by Combiner().
|
protected |
Definition at line 70 of file Combiner.h.
Referenced by combineMachineInstrs().
|
protected |
Definition at line 78 of file Combiner.h.
Referenced by combineMachineInstrs(), and Combiner().
|
protected |
Definition at line 75 of file Combiner.h.
Referenced by combineMachineInstrs().
|
protected |
Definition at line 73 of file Combiner.h.
Referenced by combineMachineInstrs(), and Combiner().
|
protected |
Definition at line 74 of file Combiner.h.
Referenced by llvm::Combiner::WorkListMaintainerImpl< Lvl >::addUsersToWorkList(), llvm::Combiner::WorkListMaintainerImpl< Lvl >::appliedCombine(), combineMachineInstrs(), and llvm::Combiner::WorkListMaintainer::create().
|
protected |
Definition at line 71 of file Combiner.h.
|
protected |
Definition at line 77 of file Combiner.h.