CACAO
|
Pass superclass All compiler passes should inheritate this class. More...
Public Member Functions | |
Pass () | |
void | set_PassRunner (PassRunner *pr) |
template<class _PassClass > | |
_PassClass * | get_Pass () const |
Get the result of a previous compiler pass. More... | |
template<class _PassClass > | |
_PassClass * | get_Pass_if_available () const |
Get the result of a previous compiler pass. More... | |
virtual PassUsage & | get_PassUsage (PassUsage &PU) const |
Set the requirements for the pass. More... | |
virtual bool | is_enabled () const |
Allows concrete passes to enable/disable themselves the way they like. More... | |
virtual void | initialize () |
Initialize the Pass. More... | |
virtual void | finalize () |
Finalize the Pass. More... | |
virtual bool | run (JITData &JD)=0 |
Run the Pass. More... | |
virtual bool | verify () const |
Verify the Result. More... | |
virtual | ~Pass () |
Destructor. More... | |
Static Public Member Functions | |
template<class T > | |
static PassInfo::IDTy | ID () |
This template will return a unique ID for each type that it is called with. More... | |
Private Member Functions | |
bool | allowed_to_use_result (const PassInfo::IDTy &id) const |
Private Attributes | |
PassRunner * | pm |
Static Private Attributes | |
static PassInfo::IDTy | id_counter = 0 |
Pass superclass All compiler passes should inheritate this class.
TODO: more info
|
inlinevirtual |
|
private |
|
inlinevirtual |
Finalize the Pass.
This method is called by the PassManager after the pass is no longer used. It should be used to clean up stuff done in initialize().
|
inline |
Get the result of a previous compiler pass.
Can only be used if ResultType is added to required in get_PassUsage().
|
inline |
Get the result of a previous compiler pass.
Can only be used if ResultType is added to required in get_PassUsage().
Set the requirements for the pass.
Reimplemented in cacao::jit::compiler2::DominatorPass, cacao::jit::compiler2::SSAConstructionPass, cacao::jit::compiler2::GlobalValueNumberingPass, cacao::jit::compiler2::LinearScanAllocatorPass, cacao::jit::compiler2::CodeGenPass, cacao::jit::compiler2::LoopPassBase< _T >, cacao::jit::compiler2::ConstantPropagationPass, cacao::jit::compiler2::NullCheckEliminationPass, cacao::jit::compiler2::GlobalSchedulePrinterPass< _T >, cacao::jit::compiler2::ListSchedulingPass, cacao::jit::compiler2::BasicBlockPrinterPass, cacao::jit::compiler2::LivetimeAnalysisPass, cacao::jit::compiler2::SourceStateAttachmentPass, cacao::jit::compiler2::ScheduleLatePass, cacao::jit::compiler2::ScheduleEarlyPass, cacao::jit::compiler2::DeadCodeEliminationPass, cacao::jit::compiler2::ScheduleClickPass, cacao::jit::compiler2::BasicBlockSchedulingPass, cacao::jit::compiler2::MachineInstructionPrinterPass, cacao::jit::compiler2::MachineInstructionSchedulingPass, cacao::jit::compiler2::ICMDPrinterPass, cacao::jit::compiler2::CFGConstructionPass, cacao::jit::compiler2::CFGMetaPass, cacao::jit::compiler2::DisassemblerPass, cacao::jit::compiler2::DomTreePrinterPass, cacao::jit::compiler2::InstructionMetaPass, cacao::jit::compiler2::LoopTreePrinterPass, cacao::jit::compiler2::ObjectFileWriterPass, cacao::jit::compiler2::SSAPrinterPass, cacao::jit::compiler2::VerifierPass, cacao::jit::compiler2::ExamplePass, cacao::jit::compiler2::StackAnalysisPass, and cacao::jit::compiler2::RegisterAllocatorPass.
|
inlinestatic |
|
inlinevirtual |
Initialize the Pass.
This method is called by the PassManager before the pass is started. It should be used to initialize e.g. data structures. A Pass object might be reused so the construtor can not be used in some cases.
Reimplemented in cacao::jit::compiler2::LinearScanAllocatorPass, cacao::jit::compiler2::LivetimeAnalysisPass, and cacao::jit::compiler2::BasicBlockSchedulingPass.
|
inlinevirtual |
Allows concrete passes to enable/disable themselves the way they like.
Reimplemented in cacao::jit::compiler2::GlobalValueNumberingPass, cacao::jit::compiler2::ConstantPropagationPass, cacao::jit::compiler2::GlobalSchedulePrinterPass< _T >, cacao::jit::compiler2::BasicBlockPrinterPass, cacao::jit::compiler2::DeadCodeEliminationPass, cacao::jit::compiler2::MachineInstructionPrinterPass, cacao::jit::compiler2::ICMDPrinterPass, cacao::jit::compiler2::DisassemblerPass, cacao::jit::compiler2::DomTreePrinterPass, cacao::jit::compiler2::LoopTreePrinterPass, cacao::jit::compiler2::ObjectFileWriterPass, cacao::jit::compiler2::SSAPrinterPass, and cacao::jit::compiler2::ExamplePass.
|
pure virtual |
Run the Pass.
This method implements the compiler pass.
Implemented in cacao::jit::compiler2::DominatorPass, cacao::jit::compiler2::SSAConstructionPass, cacao::jit::compiler2::GlobalValueNumberingPass, cacao::jit::compiler2::LinearScanAllocatorPass, cacao::jit::compiler2::CodeGenPass, cacao::jit::compiler2::LoopPassBase< _T >, cacao::jit::compiler2::ConstantPropagationPass, cacao::jit::compiler2::NullCheckEliminationPass, cacao::jit::compiler2::GlobalSchedulePrinterPass< _T >, cacao::jit::compiler2::ListSchedulingPass, cacao::jit::compiler2::BasicBlockPrinterPass, cacao::jit::compiler2::LivetimeAnalysisPass, cacao::jit::compiler2::SourceStateAttachmentPass, cacao::jit::compiler2::ScheduleLatePass, cacao::jit::compiler2::ScheduleEarlyPass, cacao::jit::compiler2::DeadCodeEliminationPass, cacao::jit::compiler2::ScheduleClickPass, cacao::jit::compiler2::BasicBlockSchedulingPass, cacao::jit::compiler2::MachineInstructionPrinterPass, cacao::jit::compiler2::ICMDPrinterPass, cacao::jit::compiler2::MachineInstructionSchedulingPass, cacao::jit::compiler2::ParserPass, cacao::jit::compiler2::CFGConstructionPass, cacao::jit::compiler2::CFGMetaPass, cacao::jit::compiler2::DisassemblerPass, cacao::jit::compiler2::DomTreePrinterPass, cacao::jit::compiler2::InstructionMetaPass, cacao::jit::compiler2::LoopTreePrinterPass, cacao::jit::compiler2::ObjectFileWriterPass, cacao::jit::compiler2::SSAPrinterPass, cacao::jit::compiler2::VerifierPass, cacao::jit::compiler2::ExamplePass, cacao::jit::compiler2::StackAnalysisPass, and cacao::jit::compiler2::RegisterAllocatorPass.
|
inline |
|
inlinevirtual |
Verify the Result.
This method is used to verify the result of the pass. It has the same motivation than the assert() statement. It should be only used for debugging purposes and might not be called in release builds.
Reimplemented in cacao::jit::compiler2::SSAConstructionPass, cacao::jit::compiler2::LinearScanAllocatorPass, cacao::jit::compiler2::ListSchedulingPass, cacao::jit::compiler2::LivetimeAnalysisPass, cacao::jit::compiler2::BasicBlockSchedulingPass, cacao::jit::compiler2::ScheduleClickPass, and cacao::jit::compiler2::MachineInstructionSchedulingPass.
|
staticprivate |
|
private |