CACAO
|
CodeGenPass TODO: more info. More...
Public Types | |
typedef alloc::map < MachineBasicBlock *, std::size_t, MBBCompare > ::type | BasicBlockMap |
Public Member Functions | |
CodeGenPass () | |
virtual bool | run (JITData &JD) |
Run the Pass. More... | |
virtual PassUsage & | get_PassUsage (PassUsage &PU) const |
Set the requirements for the pass. More... | |
std::size_t | get_block_size (MachineBasicBlock *MBB) const |
BasicBlockMap::const_iterator | begin () const |
BasicBlockMap::const_iterator | end () const |
![]() | |
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 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 | verify () const |
Verify the Result. More... | |
virtual | ~Pass () |
Destructor. More... | |
Private Types | |
typedef std::vector < MachineInstruction * > | MInstListTy |
typedef alloc::map < MachineInstruction *, std::size_t >::type | InstructionPositionMap |
typedef alloc::map < MachineInstruction *, std::size_t >::type | InstructionSizeMap |
Private Member Functions | |
template<class ForwardIt > | |
void | resolve_replacement_points (ForwardIt first, ForwardIt last, JITData &JD) |
Create the final rplpoint structures for the current method. More... | |
void | finish (JITData &JD) |
finish code generation More... | |
Private Attributes | |
InstructionPositionMap | instruction_positions |
Map a MachineInstruction to a offset in the current CodeMemory. More... | |
InstructionSizeMap | instruction_sizes |
Map a MachineInstruction to its size in the code memory (number of emitted bytes) More... | |
BasicBlockMap | bbmap |
Additional Inherited Members | |
![]() | |
template<class T > | |
static PassInfo::IDTy | ID () |
This template will return a unique ID for each type that it is called with. More... | |
![]() | |
static void * | operator new (std::size_t size) throw (std::bad_alloc) |
normal new More... | |
static void * | operator new (std::size_t size, void *ptr) throw () |
placement new More... | |
static void * | operator new (std::size_t size, const std::nothrow_t &nt) throw () |
nothrow new More... | |
static void | operator delete (void *pMemory) throw () |
normal delete More... | |
static void | operator delete (void *pMemory, void *ptr) throw () |
placement delete More... | |
static void | operator delete (void *pMemory, const std::nothrow_t &) throw () |
nothrow delete More... | |
static void * | operator new[] (std::size_t size) throw (std::bad_alloc) |
normal new[] More... | |
static void * | operator new[] (std::size_t size, void *ptr) throw () |
placement new[] More... | |
static void * | operator new[] (std::size_t size, const std::nothrow_t &nt) throw () |
nothrow new[] More... | |
static void | operator delete[] (void *pMemory) throw () |
normal delete[] More... | |
static void | operator delete[] (void *pMemory, void *ptr) throw () |
placement delete[] More... | |
static void | operator delete[] (void *pMemory, const std::nothrow_t &) throw () |
nothrow delete[] More... | |
CodeGenPass TODO: more info.
Definition at line 49 of file CodeGenPass.hpp.
typedef alloc::map<MachineBasicBlock*,std::size_t,MBBCompare>::type cacao::jit::compiler2::CodeGenPass::BasicBlockMap |
Definition at line 51 of file CodeGenPass.hpp.
|
private |
Definition at line 59 of file CodeGenPass.hpp.
|
private |
Definition at line 60 of file CodeGenPass.hpp.
|
private |
Definition at line 58 of file CodeGenPass.hpp.
|
inline |
Definition at line 93 of file CodeGenPass.hpp.
|
inline |
Definition at line 97 of file CodeGenPass.hpp.
|
inline |
Definition at line 98 of file CodeGenPass.hpp.
finish code generation
Finishes the code generation. A new memory, large enough for both data and code, is allocated and data and code are copied together to their final layout, unresolved jumps are resolved, ...
Definition at line 250 of file CodeGenPass.cpp.
std::size_t cacao::jit::compiler2::CodeGenPass::get_block_size | ( | MachineBasicBlock * | MBB | ) | const |
Definition at line 123 of file CodeGenPass.cpp.
Set the requirements for the pass.
Reimplemented from cacao::jit::compiler2::Pass.
Definition at line 456 of file CodeGenPass.cpp.
|
private |
Create the final rplpoint structures for the current method.
Create a rplpoint structure for each MachineReplacementPointInst in the range first
to last
and store them in the codeinfo of JD
.
first | Forward iterator that points to the first MachineReplacementPointInst* in the range. |
last | Forward iterator that marks the end of the range. |
JD | The JITData of the currently compiled method. |
Definition at line 166 of file CodeGenPass.cpp.
|
virtual |
Run the Pass.
This method implements the compiler pass.
Implements cacao::jit::compiler2::Pass.
Definition at line 64 of file CodeGenPass.cpp.
|
private |
Definition at line 91 of file CodeGenPass.hpp.
|
private |
Map a MachineInstruction to a offset in the current CodeMemory.
This map stores for each MachineInstruction the offset of the native code that was written to the CodeSegment by MachineInstruction::emit().
Definition at line 66 of file CodeGenPass.hpp.
|
private |
Map a MachineInstruction to its size in the code memory (number of emitted bytes)
Definition at line 69 of file CodeGenPass.hpp.