CACAO
|
Linear Scan Allocator. More...
Data Structures | |
struct | StartComparator |
Public Types | |
typedef alloc::list < MachineInstruction * >::type | MoveListTy |
typedef alloc::priority_queue < LivetimeInterval, alloc::deque< LivetimeInterval > ::type, StartComparator > ::type | UnhandledSetTy |
typedef alloc::list < LivetimeInterval >::type | InactiveSetTy |
typedef alloc::list < LivetimeInterval >::type | ActiveSetTy |
typedef alloc::list < LivetimeInterval >::type | HandledSetTy |
Public Member Functions | |
LinearScanAllocatorPass () | |
virtual void | initialize () |
Initialize the Pass. More... | |
virtual bool | run (JITData &JD) |
Run the Pass. More... | |
virtual PassUsage & | get_PassUsage (PassUsage &PA) const |
Set the requirements for the pass. More... | |
virtual bool | verify () const |
Verify the Result. More... | |
![]() | |
Pass () | |
void | set_PassManager (PassManager *PM) |
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 void | finalize () |
Finalize the Pass. More... | |
virtual | ~Pass () |
Destructor. More... | |
Static Public Attributes | |
static char | ID = 0 |
Private Member Functions | |
bool | try_allocate_free (LivetimeInterval ¤t, UseDef pos) |
bool | allocate_blocked (LivetimeInterval ¤t) |
bool | allocate_unhandled () |
bool | resolve () |
bool | reg_alloc_resolve_block (MIIterator first, MIIterator last) |
bool | order_and_insert_move (EdgeMoveMapTy::value_type &entry, BBtoLTI_Map &bb2lti_map) |
Private Attributes | |
UnhandledSetTy | unhandled |
ActiveSetTy | active |
InactiveSetTy | inactive |
HandledSetTy | handled |
LivetimeAnalysisPass * | LA |
MachineInstructionSchedule * | MIS |
Backend * | backend |
JITData * | jd |
Additional Inherited Members | |
![]() | |
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... | |
Linear Scan Allocator.
It supports interval splitting, register hints and fixed intervals and makes use of livetime holes.
Based on the approach from "Optimized Interval Splitting in a Linear Scan Register Allocator" by Wimmer and Moessenboeck [12] with the adoptions from "Linear scan register allocation on SSA form" by Wimmer and Franz [11]. See also Wimmer's Masters Thesis [13].
Definition at line 83 of file LinearScanAllocatorPass.hpp.
typedef alloc::list<LivetimeInterval>::type cacao::jit::compiler2::LinearScanAllocatorPass::ActiveSetTy |
Definition at line 93 of file LinearScanAllocatorPass.hpp.
typedef alloc::list<LivetimeInterval>::type cacao::jit::compiler2::LinearScanAllocatorPass::HandledSetTy |
Definition at line 94 of file LinearScanAllocatorPass.hpp.
typedef alloc::list<LivetimeInterval>::type cacao::jit::compiler2::LinearScanAllocatorPass::InactiveSetTy |
Definition at line 92 of file LinearScanAllocatorPass.hpp.
typedef alloc::list<MachineInstruction*>::type cacao::jit::compiler2::LinearScanAllocatorPass::MoveListTy |
Definition at line 89 of file LinearScanAllocatorPass.hpp.
typedef alloc::priority_queue<LivetimeInterval,alloc::deque<LivetimeInterval>::type, StartComparator>::type cacao::jit::compiler2::LinearScanAllocatorPass::UnhandledSetTy |
Definition at line 91 of file LinearScanAllocatorPass.hpp.
|
inline |
Definition at line 117 of file LinearScanAllocatorPass.hpp.
|
inlineprivate |
Definition at line 481 of file LinearScanAllocatorPass.cpp.
|
private |
Definition at line 548 of file LinearScanAllocatorPass.cpp.
Set the requirements for the pass.
Reimplemented from cacao::jit::compiler2::Pass.
Definition at line 1250 of file LinearScanAllocatorPass.cpp.
|
virtual |
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 from cacao::jit::compiler2::Pass.
Definition at line 539 of file LinearScanAllocatorPass.cpp.
|
private |
Definition at line 1081 of file LinearScanAllocatorPass.cpp.
|
private |
calculate state sets
calculate intervals
Definition at line 1149 of file LinearScanAllocatorPass.cpp.
|
private |
Definition at line 1194 of file LinearScanAllocatorPass.cpp.
|
virtual |
Run the Pass.
This method implements the compiler pass.
Implements cacao::jit::compiler2::Pass.
Definition at line 659 of file LinearScanAllocatorPass.cpp.
|
inlineprivate |
Definition at line 193 of file LinearScanAllocatorPass.cpp.
|
virtual |
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 from cacao::jit::compiler2::Pass.
Definition at line 1233 of file LinearScanAllocatorPass.cpp.
|
private |
Definition at line 98 of file LinearScanAllocatorPass.hpp.
|
private |
Definition at line 104 of file LinearScanAllocatorPass.hpp.
|
private |
Definition at line 100 of file LinearScanAllocatorPass.hpp.
|
static |
Definition at line 116 of file LinearScanAllocatorPass.hpp.
|
private |
Definition at line 99 of file LinearScanAllocatorPass.hpp.
|
private |
Definition at line 105 of file LinearScanAllocatorPass.hpp.
|
private |
Definition at line 102 of file LinearScanAllocatorPass.hpp.
|
private |
Definition at line 103 of file LinearScanAllocatorPass.hpp.
|
private |
Definition at line 97 of file LinearScanAllocatorPass.hpp.