Package iota
Class NLirInstruction
java.lang.Object
iota.NLirInstruction
- Direct Known Subclasses:
NLirArithmetic
,NLirCall
,NLirCopy
,NLirIConst
,NLirInc
,NLirJump
,NLirLoad
,NLirPhiFunction
,NLirRead
,NLirStore
,NLirWrite
An abstract low-level intermediate representation (LIR) of an HIR instruction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionEnclosing basic block.int
Instruction id.Maps LIR mnemonic to the corresponding Marvin mnemonic.Instruction mnemonic.Input registers (if any).Output register (if any). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NLirInstruction
(NBasicBlock block, int id, String mnemonic) Constructs an NLirInstruction object. -
Method Summary
-
Field Details
-
lir2Marvin
Maps LIR mnemonic to the corresponding Marvin mnemonic. For example, maps "push" to "pushr". -
block
Enclosing basic block. -
id
public int idInstruction id. -
mnemonic
Instruction mnemonic. -
reads
Input registers (if any). -
write
Output register (if any).
-
-
Constructor Details
-
NLirInstruction
Constructs an NLirInstruction object.- Parameters:
block
- enclosing block.id
- instruction id.mnemonic
- instruction mnemonic.
-
-
Method Details
-
id
Returns the id of this instruction as a string.- Returns:
- Returns the id of this instruction as a string.
-
toMarvin
public void toMarvin()Converts this instruction to the corresponding Marvin instruction. -
toString
Returns a string representation of this instruction.
-