Class InstructHash


  • public class InstructHash
    extends java.lang.Object
    This class is the container for hashing information about a particular instruction, including all the n-grams it is currently involved in within the HashStore.
    • Constructor Summary

      Constructors 
      Constructor Description
      InstructHash​(Instruction inst, Block bl, int ind)
      Build an (unmatched) Instruction, associating it with its position in the basic block
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean allUnknown​(int length)
      If the -length- instructions, starting with this, are all unmatched, return true;
      protected void clearNGrams​(int sz)
      Clear out the n-gram array to an uninitialized list
      protected void clearSort()
      Clear out structures associated with the main sort
      Block getBlock()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • isMatched

        protected boolean isMatched
      • index

        protected int index
      • block

        protected Block block
      • nGrams

        protected Hash[] nGrams
      • hashEntries

        protected java.util.Hashtable<Hash,​HashEntry> hashEntries
    • Constructor Detail

      • InstructHash

        public InstructHash​(Instruction inst,
                            Block bl,
                            int ind)
        Build an (unmatched) Instruction, associating it with its position in the basic block
        Parameters:
        inst - is the underlying instruction
        bl - is the basic-block
        ind - is the index within the block
    • Method Detail

      • getBlock

        public Block getBlock()
        Returns:
        the containing basic block
      • allUnknown

        public boolean allUnknown​(int length)
        If the -length- instructions, starting with this, are all unmatched, return true;
        Parameters:
        length - is number of instructions to check
        Returns:
        true if all checked instructions are unmatched
      • clearSort

        protected void clearSort()
        Clear out structures associated with the main sort
      • clearNGrams

        protected void clearNGrams​(int sz)
        Clear out the n-gram array to an uninitialized list
        Parameters:
        sz - is the size of the uninitialized list