Class BranchEntry

    • Constructor Detail

      • BranchEntry

        public BranchEntry​(BranchEntry.Type type,
                           int registerId,
                           int groupId,
                           int branchLabel)
    • Method Detail

      • getType

        public BranchEntry.Type getType()
        Returns the type of the entry.
        Returns:
        the entry type.
      • setType

        public void setType​(BranchEntry.Type type)
        Sets the type of the entry.
        Parameters:
        type - the type to be set.
      • isIfThen

        public boolean isIfThen()
        Checks whether the entry is a conditional branch.
        Returns:
        true if the entry is a conditional branch; false otherwise.
      • isGoto

        public boolean isGoto()
        Checks whether the entry is an unconditional branch.
        Returns:
        true if the entry is a unconditional branch; false otherwise.
      • isDelaySlot

        public boolean isDelaySlot()
        Checks whether the entry is a delay slot.
        Returns:
        true if the entry is a delay slot; false otherwise.
      • isBasicBlock

        public boolean isBasicBlock()
        Checks if the entry is a basic block.
        Returns:
        true if the entry is a basic block; false otherwise.
      • isBranch

        public boolean isBranch()
        Checks whether the entry is a conditional or an unconditional branch.
        Returns:
        true if the entry is a branch; false otherwise.
      • getRegisterId

        public int getRegisterId()
        Returns the register identifier of the branch entry.
        Returns:
        the register identifier.
      • setRegisterId

        public void setRegisterId​(int registerId)
        Sets the register identifier of the branch entry.
        Parameters:
        registerId - the register identifier to be set.
      • isRegisterFirstUse

        public boolean isRegisterFirstUse()
        Checks whether the register is used for the first time.
        Returns:
        if the register is used for the first time; false otherwise.
      • setRegisterFirstUse

        public void setRegisterFirstUse​(boolean isRegisterFirstUse)
        Specifies whether the register is used for the first time.
        Parameters:
        isRegisterFirstUse - the value to be set.
      • getGroupId

        public int getGroupId()
        Returns the group identifier of the entry.
        Returns:
        the group identifier.
      • setGroupId

        public void setGroupId​(int groupId)
        Sets the group identifier of the entry.
        Parameters:
        groupId - the group identifier to be set.
      • getBranchLabel

        public int getBranchLabel()
        Returns the branch label (index of the target instruction in the branch structure).
        Returns:
        the branch label.
      • setBranchLabel

        public void setBranchLabel​(int branchLabel)
        Sets the branch label (index of the target instruction in the branch structure).
        Parameters:
        branchLabel - the branch label to be set.
      • getBranchTrace

        public BranchTrace getBranchTrace()
        Returns the execution trace of the branch instruction.
        Returns:
        the execution trace.
      • getBlockCoverage

        public java.util.Set<java.lang.Integer> getBlockCoverage()
        Returns the block coverage of the branch instruction.
        Returns:
        the block coverage.
      • setBlockCoverage

        public void setBlockCoverage​(java.util.Set<java.lang.Integer> blockCoverage)
        Sets the block coverage of the branch instruction.
        Parameters:
        blockCoverage - the block coverage to be set.
      • getSlotCoverage

        public java.util.Set<java.lang.Integer> getSlotCoverage()
        Returns the slot coverage of the branch instruction.
        Returns:
        the slot coverage.
      • setSlotCoverage

        public void setSlotCoverage​(java.util.Set<java.lang.Integer> slotCoverage)
        Sets the slot coverage of the branch instruction.
        Parameters:
        slotCoverage - the slot coverage to be set.
      • isControlCodeInBasicBlock

        public boolean isControlCodeInBasicBlock()
      • setControlCodeInBasicBlock

        public void setControlCodeInBasicBlock​(boolean controlCodeInBasicBlock)
      • isControlCodeInDelaySlot

        public boolean isControlCodeInDelaySlot()
      • setControlCodeInDelaySlot

        public void setControlCodeInDelaySlot​(boolean controlCodeInDelaySlot)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public BranchEntry clone()
        Overrides:
        clone in class java.lang.Object