CACAO
|
Instruction super class. More...
Protected Member Functions | |
Instruction () | |
void | append_op (Value *v) |
void | replace_op (Value *v_old, Value *v_new) |
OStream & | print_operands (OStream &OS) |
![]() | |
void | append_user (Instruction *I) |
OStream & | print_users (OStream &OS) const |
void | user_remove (Instruction *I) |
void | set_type (Type::TypeID t) |
Protected Attributes | |
const InstID | opcode |
Method * | method |
const int | id |
BeginInst * | begin |
Static Private Member Functions | |
static void | reset () |
Reset static infos (run by Compiler) More... | |
Private Attributes | |
OperandListTy | op_list |
DepListTy | dep_list |
DepListTy | reverse_dep_list |
Static Private Attributes | |
static int | id_counter = 0 |
Friends | |
class | Value |
MachineCode * | compile (methodinfo *) |
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... | |
Instruction super class.
This is the base class for all instruction. The functions 'toXInstruction()' can be used to cast Instructions. If casting is not possible these functions return NULL. Therefor it can be used to check for a specific Instruction, e.g.: if (CmdInstruction* ti = i.toCmdInstruction() { // 'i' is a CmpInstruction ... }
Definition at line 73 of file Instruction.hpp.
typedef DepListTy::const_iterator cacao::jit::compiler2::Instruction::const_dep_iterator |
Definition at line 81 of file Instruction.hpp.
typedef OperandListTy::const_iterator cacao::jit::compiler2::Instruction::const_op_iterator |
Definition at line 80 of file Instruction.hpp.
typedef DepListTy::iterator cacao::jit::compiler2::Instruction::dep_iterator |
Definition at line 79 of file Instruction.hpp.
Definition at line 76 of file Instruction.hpp.
typedef OperandListTy::iterator cacao::jit::compiler2::Instruction::op_iterator |
Definition at line 78 of file Instruction.hpp.
Definition at line 75 of file Instruction.hpp.
Definition at line 83 of file Instruction.hpp.
|
inlineexplicitprotected |
Definition at line 111 of file Instruction.hpp.
|
inlineexplicit |
Definition at line 127 of file Instruction.hpp.
|
virtual |
Definition at line 48 of file Instruction.cpp.
|
pure virtual |
Visitor.
Implemented in cacao::jit::compiler2::ContainerInst, cacao::jit::compiler2::PHIInst, cacao::jit::compiler2::GETEXCEPTIONInst, cacao::jit::compiler2::MOVEInst, cacao::jit::compiler2::COPYInst, cacao::jit::compiler2::THROWInst, cacao::jit::compiler2::RETURNInst, cacao::jit::compiler2::LOOKUPSWITCHInst, cacao::jit::compiler2::TABLESWITCHInst, cacao::jit::compiler2::IF_CMPInst, cacao::jit::compiler2::IFInst, cacao::jit::compiler2::INVOKEINTERFACEInst, cacao::jit::compiler2::INVOKESTATICInst, cacao::jit::compiler2::INVOKESPECIALInst, cacao::jit::compiler2::INVOKEVIRTUALInst, cacao::jit::compiler2::BUILTINInst, cacao::jit::compiler2::JSRInst, cacao::jit::compiler2::GOTOInst, cacao::jit::compiler2::INSTANCEOFInst, cacao::jit::compiler2::CHECKCASTInst, cacao::jit::compiler2::MULTIANEWARRAYInst, cacao::jit::compiler2::ANEWARRAYInst, cacao::jit::compiler2::NEWARRAYInst, cacao::jit::compiler2::NEWInst, cacao::jit::compiler2::STOREInst, cacao::jit::compiler2::LOADInst, cacao::jit::compiler2::RETInst, cacao::jit::compiler2::ARRAYBOUNDSCHECKInst, cacao::jit::compiler2::ALOADInst, cacao::jit::compiler2::ASTOREInst, cacao::jit::compiler2::AREFInst, cacao::jit::compiler2::INCInst, cacao::jit::compiler2::GETSTATICInst, cacao::jit::compiler2::PUTSTATICInst, cacao::jit::compiler2::PUTFIELDInst, cacao::jit::compiler2::GETFIELDInst, cacao::jit::compiler2::CONSTInst, cacao::jit::compiler2::CMPInst, cacao::jit::compiler2::XORInst, cacao::jit::compiler2::ORInst, cacao::jit::compiler2::ANDInst, cacao::jit::compiler2::USHRInst, cacao::jit::compiler2::SHLInst, cacao::jit::compiler2::REMInst, cacao::jit::compiler2::DIVInst, cacao::jit::compiler2::MULInst, cacao::jit::compiler2::SUBInst, cacao::jit::compiler2::ADDInst, cacao::jit::compiler2::CASTInst, cacao::jit::compiler2::NEGInst, cacao::jit::compiler2::ARRAYLENGTHInst, cacao::jit::compiler2::CHECKNULLInst, cacao::jit::compiler2::POPInst, cacao::jit::compiler2::NOPInst, cacao::jit::compiler2::EndInst, cacao::jit::compiler2::BeginInst, and cacao::jit::compiler2::NoInst.
|
inline |
Definition at line 155 of file Instruction.hpp.
Definition at line 114 of file Instruction.hpp.
|
inline |
Definition at line 173 of file Instruction.hpp.
|
inline |
Definition at line 170 of file Instruction.hpp.
|
inline |
Definition at line 171 of file Instruction.hpp.
|
inline |
Definition at line 172 of file Instruction.hpp.
|
inline |
Definition at line 174 of file Instruction.hpp.
|
inlinevirtual |
Get the corresponding BeginInst.
BeginInst are used to mark control flow joins (aka the start of a basic block).
Reimplemented in cacao::jit::compiler2::ContainerInst, cacao::jit::compiler2::PHIInst, cacao::jit::compiler2::INVOKESTATICInst, cacao::jit::compiler2::ALOADInst, cacao::jit::compiler2::ASTOREInst, cacao::jit::compiler2::GETSTATICInst, cacao::jit::compiler2::PUTSTATICInst, and cacao::jit::compiler2::BeginInst.
Definition at line 186 of file Instruction.hpp.
|
inline |
return a unique identifier for this instruction
Definition at line 133 of file Instruction.hpp.
|
inline |
Definition at line 137 of file Instruction.hpp.
|
inline |
Definition at line 214 of file Instruction.hpp.
|
inline |
return the opcode of the instruction
Definition at line 134 of file Instruction.hpp.
|
inline |
Definition at line 144 of file Instruction.hpp.
|
inline |
Definition at line 147 of file Instruction.hpp.
|
inlinevirtual |
True the instruction has side effects.
Reimplemented in cacao::jit::compiler2::INVOKESTATICInst, cacao::jit::compiler2::ASTOREInst, cacao::jit::compiler2::GETSTATICInst, and cacao::jit::compiler2::PUTSTATICInst.
Definition at line 202 of file Instruction.hpp.
|
inlinevirtual |
True if the instruction is an arithmetic instruction.
Reimplemented in cacao::jit::compiler2::DIVInst, cacao::jit::compiler2::MULInst, cacao::jit::compiler2::SUBInst, cacao::jit::compiler2::ADDInst, and cacao::jit::compiler2::NEGInst.
Definition at line 204 of file Instruction.hpp.
|
inlinevirtual |
True if the operands of the instruction are commutable.
Reimplemented in cacao::jit::compiler2::XORInst, cacao::jit::compiler2::ORInst, cacao::jit::compiler2::ANDInst, cacao::jit::compiler2::MULInst, and cacao::jit::compiler2::ADDInst.
Definition at line 206 of file Instruction.hpp.
|
inlinevirtual |
True if the instruction has no fixed control dependencies.
Reimplemented in cacao::jit::compiler2::ContainerInst, cacao::jit::compiler2::PHIInst, cacao::jit::compiler2::INVOKESTATICInst, cacao::jit::compiler2::ALOADInst, cacao::jit::compiler2::ASTOREInst, cacao::jit::compiler2::GETSTATICInst, cacao::jit::compiler2::PUTSTATICInst, cacao::jit::compiler2::EndInst, cacao::jit::compiler2::BeginInst, and cacao::jit::compiler2::LoadInst.
Definition at line 200 of file Instruction.hpp.
|
inlinevirtual |
True if the instruction has a homogeneous signature.
(i.e. all operands and the result have the same type)
Reimplemented in cacao::jit::compiler2::ARRAYBOUNDSCHECKInst, cacao::jit::compiler2::ALOADInst, cacao::jit::compiler2::ASTOREInst, cacao::jit::compiler2::AREFInst, cacao::jit::compiler2::CMPInst, cacao::jit::compiler2::CASTInst, and cacao::jit::compiler2::ARRAYLENGTHInst.
Definition at line 198 of file Instruction.hpp.
|
inline |
Definition at line 142 of file Instruction.hpp.
|
inline |
Definition at line 139 of file Instruction.hpp.
|
inline |
Definition at line 140 of file Instruction.hpp.
|
inline |
Definition at line 141 of file Instruction.hpp.
|
inline |
Definition at line 143 of file Instruction.hpp.
Reimplemented from cacao::jit::compiler2::Value.
Reimplemented in cacao::jit::compiler2::CONSTInst.
Definition at line 43 of file Instruction.cpp.
Definition at line 75 of file Instruction.cpp.
|
inline |
Definition at line 175 of file Instruction.hpp.
|
inline |
Definition at line 176 of file Instruction.hpp.
|
inline |
Definition at line 177 of file Instruction.hpp.
|
inline |
Definition at line 161 of file Instruction.hpp.
Definition at line 66 of file Instruction.cpp.
|
inlinestaticprivate |
Reset static infos (run by Compiler)
Definition at line 100 of file Instruction.hpp.
|
inlinevirtual |
Definition at line 187 of file Instruction.hpp.
Definition at line 136 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::ADDInst.
Definition at line 42 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::ALOADInst.
Definition at line 61 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::ANDInst.
Definition at line 49 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::ANEWARRAYInst.
Definition at line 67 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::AREFInst.
Definition at line 59 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::ARRAYBOUNDSCHECKInst.
Definition at line 39 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::ARRAYLENGTHInst.
Definition at line 38 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::ASTOREInst.
Definition at line 60 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::BeginInst.
Definition at line 89 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::BinaryInst.
Definition at line 34 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::BUILTINInst.
Definition at line 73 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::CASTInst.
Definition at line 41 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::CHECKCASTInst.
Definition at line 69 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::CHECKNULLInst.
Definition at line 37 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::CMPInst.
Definition at line 52 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::CONSTInst.
Definition at line 53 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::ContainerInst.
Definition at line 88 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::COPYInst.
Definition at line 84 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::DIVInst.
Definition at line 45 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::EndInst.
Definition at line 90 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::GETEXCEPTIONInst.
Definition at line 86 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::GETFIELDInst.
Definition at line 54 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::GETSTATICInst.
Definition at line 57 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::GOTOInst.
Definition at line 71 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::IF_CMPInst.
Definition at line 79 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::IFInst.
Definition at line 78 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::INCInst.
Definition at line 58 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::INSTANCEOFInst.
Definition at line 70 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented from cacao::jit::compiler2::Value.
Definition at line 209 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::INVOKEINTERFACEInst.
Definition at line 77 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::INVOKESPECIALInst.
Definition at line 75 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::INVOKESTATICInst.
Definition at line 76 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::INVOKEVIRTUALInst.
Definition at line 74 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::JSRInst.
Definition at line 72 of file Instruction.hpp.
|
inlinevirtual |
Definition at line 32 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::LOADInst.
Definition at line 63 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::LOOKUPSWITCHInst.
Definition at line 81 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::MOVEInst.
Definition at line 85 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::MULInst.
Definition at line 44 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::MULTIANEWARRAYInst.
Definition at line 68 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::NEGInst.
Definition at line 40 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::NEWARRAYInst.
Definition at line 66 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::NEWInst.
Definition at line 65 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::NOPInst.
Definition at line 35 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::ORInst.
Definition at line 50 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::PHIInst.
Definition at line 87 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::POPInst.
Definition at line 36 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::PUTFIELDInst.
Definition at line 55 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::PUTSTATICInst.
Definition at line 56 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::REMInst.
Definition at line 46 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::RETInst.
Definition at line 62 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::RETURNInst.
Definition at line 82 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::SHLInst.
Definition at line 47 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::STOREInst.
Definition at line 64 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::SUBInst.
Definition at line 43 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::TABLESWITCHInst.
Definition at line 80 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::THROWInst.
Definition at line 83 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::UnaryInst.
Definition at line 33 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::USHRInst.
Definition at line 48 of file Instruction.hpp.
|
inlinevirtual |
Reimplemented in cacao::jit::compiler2::XORInst.
Definition at line 51 of file Instruction.hpp.
|
virtual |
check if the instruction is in a correct state
Reimplemented in cacao::jit::compiler2::LOOKUPSWITCHInst, and cacao::jit::compiler2::TABLESWITCHInst.
Definition at line 82 of file Instruction.cpp.
|
friend |
prolog start jit_compile
prolog end jit_compile
prolog start jit_compile_intern
prolog end jit_compile_intern
epilog start jit_compile
epilog end jit_compile
Definition at line 123 of file Compiler.cpp.
|
friend |
Definition at line 230 of file Instruction.hpp.
|
protected |
Definition at line 109 of file Instruction.hpp.
|
private |
Definition at line 92 of file Instruction.hpp.
|
protected |
Definition at line 108 of file Instruction.hpp.
|
staticprivate |
Definition at line 95 of file Instruction.hpp.
|
protected |
Definition at line 107 of file Instruction.hpp.
|
private |
Definition at line 91 of file Instruction.hpp.
|
protected |
Definition at line 106 of file Instruction.hpp.
|
private |
Definition at line 93 of file Instruction.hpp.