public final class BranchEntry extends SharedObject<BranchEntry>
BranchEntry
represents a node of the internal representation of a branch structure.Modifier and Type | Class and Description |
---|---|
static class |
BranchEntry.Type |
Constructor and Description |
---|
BranchEntry(BranchEntry.Type type) |
BranchEntry(BranchEntry.Type type,
int registerId,
int groupId,
int branchLabel) |
Modifier and Type | Method and Description |
---|---|
BranchEntry |
clone() |
java.util.Set<java.lang.Integer> |
getBlockCoverage()
Returns the block coverage of the branch instruction.
|
int |
getBranchLabel()
Returns the branch label (index of the target instruction in the branch structure).
|
BranchTrace |
getBranchTrace()
Returns the execution trace of the branch instruction.
|
int |
getGroupId()
Returns the group identifier of the entry.
|
int |
getRegisterId()
Returns the register identifier of the branch entry.
|
java.util.Set<java.lang.Integer> |
getSlotCoverage()
Returns the slot coverage of the branch instruction.
|
BranchEntry.Type |
getType()
Returns the type of the entry.
|
boolean |
isBasicBlock()
Checks if the entry is a basic block.
|
boolean |
isBranch()
Checks whether the entry is a conditional or an unconditional branch.
|
boolean |
isControlCodeInBasicBlock() |
boolean |
isControlCodeInDelaySlot() |
boolean |
isDelaySlot()
Checks whether the entry is a delay slot.
|
boolean |
isGoto()
Checks whether the entry is an unconditional branch.
|
boolean |
isIfThen()
Checks whether the entry is a conditional branch.
|
boolean |
isRegisterFirstUse()
Checks whether the register is used for the first time.
|
BranchEntry |
newCopy()
Creates a new full copy of the object.
|
void |
setBlockCoverage(java.util.Set<java.lang.Integer> blockCoverage)
Sets the block coverage of the branch instruction.
|
void |
setBranchLabel(int branchLabel)
Sets the branch label (index of the target instruction in the branch structure).
|
void |
setControlCodeInBasicBlock(boolean controlCodeInBasicBlock) |
void |
setControlCodeInDelaySlot(boolean controlCodeInDelaySlot) |
void |
setGroupId(int groupId)
Sets the group identifier of the entry.
|
void |
setRegisterFirstUse(boolean isRegisterFirstUse)
Specifies whether the register is used for the first time.
|
void |
setRegisterId(int registerId)
Sets the register identifier of the branch entry.
|
void |
setSlotCoverage(java.util.Set<java.lang.Integer> slotCoverage)
Sets the slot coverage of the branch instruction.
|
void |
setType(BranchEntry.Type type)
Sets the type of the entry.
|
java.lang.String |
toString() |
copyAll, freeSharedCopies, getCopy, publishSharedCopy, sharedCopy, sharedCopyAll
public BranchEntry(BranchEntry.Type type, int registerId, int groupId, int branchLabel)
public BranchEntry(BranchEntry.Type type)
public BranchEntry.Type getType()
public void setType(BranchEntry.Type type)
type
- the type to be set.public boolean isIfThen()
true
if the entry is a conditional branch; false
otherwise.public boolean isGoto()
true
if the entry is a unconditional branch; false
otherwise.public boolean isDelaySlot()
true
if the entry is a delay slot; false
otherwise.public boolean isBasicBlock()
true
if the entry is a basic block; false
otherwise.public boolean isBranch()
true
if the entry is a branch; false
otherwise.public int getRegisterId()
public void setRegisterId(int registerId)
registerId
- the register identifier to be set.public boolean isRegisterFirstUse()
false
otherwise.public void setRegisterFirstUse(boolean isRegisterFirstUse)
isRegisterFirstUse
- the value to be set.public int getGroupId()
public void setGroupId(int groupId)
groupId
- the group identifier to be set.public int getBranchLabel()
public void setBranchLabel(int branchLabel)
branchLabel
- the branch label to be set.public BranchTrace getBranchTrace()
public java.util.Set<java.lang.Integer> getBlockCoverage()
public void setBlockCoverage(java.util.Set<java.lang.Integer> blockCoverage)
blockCoverage
- the block coverage to be set.public java.util.Set<java.lang.Integer> getSlotCoverage()
public void setSlotCoverage(java.util.Set<java.lang.Integer> slotCoverage)
slotCoverage
- the slot coverage to be set.public boolean isControlCodeInBasicBlock()
public void setControlCodeInBasicBlock(boolean controlCodeInBasicBlock)
public boolean isControlCodeInDelaySlot()
public void setControlCodeInDelaySlot(boolean controlCodeInDelaySlot)
public java.lang.String toString()
toString
in class java.lang.Object
public BranchEntry clone()
clone
in class java.lang.Object
public BranchEntry newCopy()
SharedObject
SharedObject.SharedObject(SharedObject)
copy constructor in order to publish a shared copy.newCopy
in class SharedObject<BranchEntry>