Class BranchProfile

java.lang.Object
com.oracle.truffle.api.nodes.NodeCloneable
com.oracle.truffle.api.utilities.BranchProfile
All Implemented Interfaces:
Cloneable

public final class BranchProfile extends NodeCloneable
Utility class to speculate on branches to be never visited. If the enter() method is invoked first the optimized code is invalidated and the branch where enter() is invoked is enabled for compilation. Otherwise if the enter() method was never invoked the branch will not get compiled. All BranchProfile instances must be held in final fields for compiler optimizations to take effect.
  • Method Details

    • enter

      public void enter()
    • isVisited

      public boolean isVisited()
    • create

      public static BranchProfile create()
    • toString

      public String toString()
      Overrides:
      toString in class Object