LLVM 18.0.0git
|
Combiner implementation. More...
#include "llvm/CodeGen/GlobalISel/Combiner.h"
Classes | |
class | WorkListMaintainer |
This class acts as the glue the 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 () |
![]() | |
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 91 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 117 of file Combiner.cpp.
References assert(), llvm::GISelWorkList< N >::clear(), CSEInfo, llvm::dbgs(), llvm::GISelWorkList< N >::deferred_insert(), E, llvm::GISelWorkList< N >::empty(), llvm::errs(), llvm::MachineFunctionProperties::FailedISel, llvm::GISelWorkList< N >::finalize(), llvm::MachineFunction::getName(), llvm::MachineFunction::getProperties(), llvm::MachineFunctionProperties::hasProperty(), llvm::isTriviallyDead(), KB, LLVM_DEBUG, llvm::make_early_inc_range(), MBB, MF, MORE, MRI, llvm::GISelWorkList< N >::pop_back_val(), llvm::post_order(), llvm::reverse(), llvm::salvageDebugInfo(), llvm::GIMatchTableExecutor::setupMF(), tryCombineAll(), and llvm::GISelCSEInfo::verify().
|
pure virtual |
Referenced by combineMachineInstrs().
|
protected |
Definition at line 66 of file Combiner.h.
Referenced by Combiner().
|
protected |
Definition at line 64 of file Combiner.h.
|
protected |
Definition at line 72 of file Combiner.h.
Referenced by combineMachineInstrs(), and Combiner().
|
protected |
Definition at line 69 of file Combiner.h.
Referenced by combineMachineInstrs().
|
protected |
Definition at line 67 of file Combiner.h.
Referenced by combineMachineInstrs(), and Combiner().
|
protected |
Definition at line 68 of file Combiner.h.
Referenced by combineMachineInstrs().
|
protected |
Definition at line 65 of file Combiner.h.
|
protected |
Definition at line 71 of file Combiner.h.