25 #ifndef _JIT_COMPILER2_BACKEND
26 #define _JIT_COMPILER2_BACKEND
40 class StackSlotManager;
43 class MachineBasicBlock;
60 virtual const char* get_name()
const = 0;
67 template <
typename Target>
77 virtual const char* get_name()
const;
96 MapTy::const_iterator it =
map.find(
BI);
97 assert_msg(it !=
map.end(),
"MachineBasicBlock for BeginInst "<< *
BI <<
" not found");
102 InstructionMapTy::const_iterator it =
inst_map.find(I);
114 : backend(backend), current(current), map(map), inst_map(inst_map),
115 schedule(schedule) {}
119 << *I <<
reset_color <<
" not yet handled by the Backend");
125 using InstructionVisitor::visit;
127 virtual void visit(
BeginInst*
I,
bool copyOperands);
128 virtual void visit(
GOTOInst*
I,
bool copyOperands);
129 virtual void visit(
PHIInst*
I,
bool copyOperands);
130 virtual void visit(
CONSTInst*
I,
bool copyOperands);
137 virtual void lowerComplex(
Instruction*
I,
int ruleId) = 0;
void set_op(Instruction *I, MachineOperand *op) const
alloc::map< Instruction *, MachineOperand * >::type InstructionMapTy
void set_current(MachineBasicBlock *MBB)
This Instruction mark the start of a basic block.
Custom new/delete handler mixin.
A basic block of (scheduled) machine instructions.
LoweringVisitorBase(Backend *backend, MachineBasicBlock *current, MapTy &map, InstructionMapTy &inst_map, MachineInstructionSchedule *schedule)
MachineBasicBlock * current
alloc::map< BeginInst *, MachineBasicBlock * >::type MapTy
InstructionMapTy & inst_map
MachineBasicBlock * current
alloc::list< MachineOperand * >::type OperandFile
Backend * get_Backend() const
Proxy to encode explicit and implicit successors.
MachineBasicBlock * get_current() const
jmethodID jint const void jint const jvmtiAddrLocationMap * map
Operands that can be directly used by the machine (register, memory, stackslot)
virtual void visit_default(Instruction *I)
#define assert_msg(COND, EXPR)
MachineOperand * get_op(Instruction *I) const
#define ABORT_MSG(EXPR_SHORT, EXPR_LONG)
JITData * get_JITData() const
MachineInstructionSchedule * schedule