|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.backend.Instruction
scale.backend.trips2.TripsInstruction
public abstract class TripsInstruction
This class represents a Trips instruction.
$Id: TripsInstruction.java,v 1.22 2007-10-31 23:47:51 bmaher Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
| Field Summary | |
|---|---|
protected boolean |
definesPredicate
True if the instruction defines a predicate. |
protected int |
numPredicates
The number of registers the instruction is predicated on. |
protected boolean |
predicatedOnTrue
Whether the instruction is predicated on true or false. |
protected int[] |
predicates
The registers the instruction is predicated on. |
| Constructor Summary | |
|---|---|
TripsInstruction()
Create a new unpredicated Trips instruction. |
|
TripsInstruction(int rp,
boolean predicatedOnTrue)
Create a new predicated Trips instruction. |
|
| Method Summary | |
|---|---|
boolean |
definesPredicate()
Return true if the instruction defines a predicated. |
protected java.lang.String |
formatOpcode(Assembler asm,
int opcode)
Return a string representation of the opcode for the assembler. |
protected java.lang.String |
formatOpcode(int opcode)
Return a string representation of the opcode. |
protected java.lang.String |
formatOpcode(java.lang.String opcode)
Return a string representation of the opcode. |
protected java.lang.String |
formatRa(Assembler asm,
int ra)
Return a string representation of the ra register for the assembler. |
int |
getBBID()
Get the basic block number of the instruction. |
int |
getLoopNumber()
Return the loop number of the instruction. |
int |
getPredicate(int i)
Return the i-th predicate for the instruction. |
int[] |
getPredicates()
Return the predicates for the instruction. |
int[] |
getSrcRegisters()
This routine returns the source registers for an instruction. |
boolean |
independent(Instruction inst,
RegisterSet registers)
Return true if this instruction is independent of the specified instruction. |
boolean |
isPredicated()
Return true if the instruction is predicated. |
boolean |
isPredicatedOnTrue()
Return true if the instruction is predicated on true. |
void |
nullify(RegisterSet rs)
Mark the instruction so that it is not used. |
int |
numPredicates()
Return the number of predicates for the instruction. |
void |
remapRegisters(int[] map)
Map the registers used in the instruction to the specified registers. |
void |
remapSrcRegister(int oldReg,
int newReg)
Map the registers used in the instruction as sources to the specified register. |
void |
removePredicates()
Remove the predicates from this instruction. |
void |
setBBID(int bbid)
Set the basic block number of the instruction. |
protected void |
setDefinesPredicate()
Set if the instruction defines a predicate. |
protected void |
setLoopNumber(int loopNumber)
Set the loop number of the instruction. |
void |
setPredicate(int rp)
Set the predicate for the instruction. |
void |
setPredicate(int rp,
boolean predicatedOnTrue)
Set the predicate for the instruction. |
void |
setPredicatedOnTrue(boolean predicatedOnTrue)
Set the condition for the predicate. |
void |
setPredicates(int[] predicates)
Set the predicates for the instruction. |
void |
setPredicates(int[] predicates,
boolean predicatedOnTrue)
Set the predicates for the instruction. |
void |
specifyRegisterUsage(RegisterAllocator rs,
int index,
int strength)
Specify the registers used by this instruction. |
boolean |
uses(int register,
RegisterSet registers)
Return true if the instruction uses the register. |
| Methods inherited from class scale.backend.Instruction |
|---|
assembler, canBeDeleted, clone, copy, defs, ehash, getCopyDest, getCopySrc, getDestRegister, getExecutionCycles, getFunctionalUnit, getNext, getOpcode, getTag, instructionSize, isBranch, isCopy, isLabel, isLoad, isMandatory, isMarker, isPhi, isPrefetch, isSpillInstruction, isSpillLoadPoint, isSpillStorePoint, isStore, markSpillInstruction, mods, nullified, remapDestRegister, setMandatory, setNext, setsSpecialReg, setTag, specifyNotSpillLoadPoint, specifySpillStorePoint |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int[] predicates
protected int numPredicates
protected boolean predicatedOnTrue
protected boolean definesPredicate
| Constructor Detail |
|---|
public TripsInstruction()
public TripsInstruction(int rp,
boolean predicatedOnTrue)
| Method Detail |
|---|
public final int numPredicates()
numPredicates in class Instructionpublic final int getPredicate(int i)
getPredicate in class Instructionpublic int[] getPredicates()
getPredicates in class Instructionpublic void setPredicate(int rp)
setPredicate in class Instruction
public void setPredicate(int rp,
boolean predicatedOnTrue)
setPredicate in class Instructionpublic void setPredicates(int[] predicates)
setPredicates in class Instruction
public void setPredicates(int[] predicates,
boolean predicatedOnTrue)
public void removePredicates()
removePredicates in class Instructionpublic void setPredicatedOnTrue(boolean predicatedOnTrue)
setPredicatedOnTrue in class Instructionpublic boolean isPredicatedOnTrue()
isPredicatedOnTrue in class Instructionpublic boolean isPredicated()
isPredicated in class Instructionpublic boolean definesPredicate()
protected void setDefinesPredicate()
public void remapRegisters(int[] map)
remapRegisters in class Instructionmap - maps from the virtual register to real register
public void remapSrcRegister(int oldReg,
int newReg)
remapSrcRegister in class InstructionoldReg - is the previous source registernewReg - is the new source register
public void specifyRegisterUsage(RegisterAllocator rs,
int index,
int strength)
specifyRegisterUsage in class Instructionrs - is the register set in useindex - is an index associated with the instructionstrength - is the importance of the instructionRegisterAllocator.useRegister(int,int,int),
RegisterAllocator.defRegister(int,int)
public boolean uses(int register,
RegisterSet registers)
uses in class Instructionpublic void nullify(RegisterSet rs)
nullify in class Instructionpublic int[] getSrcRegisters()
getSrcRegisters in class Instruction
public boolean independent(Instruction inst,
RegisterSet registers)
independent in class Instructioninst - is the specified instruction
protected java.lang.String formatRa(Assembler asm,
int ra)
protected java.lang.String formatOpcode(Assembler asm,
int opcode)
protected java.lang.String formatOpcode(int opcode)
protected java.lang.String formatOpcode(java.lang.String opcode)
public int getLoopNumber()
getLoopNumber in class Instructionprotected void setLoopNumber(int loopNumber)
setLoopNumber in class Instructionpublic int getBBID()
getBBID in class Instructionpublic void setBBID(int bbid)
setBBID in class Instruction
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||