Class Reassociate

  • All Implemented Interfaces:
    IRTransform

    public class Reassociate
    extends Object
    implements IRTransform
    Reorders commutative operations so constants group together for folding, e.g. (x + 5) + 10 -> x + 15.
    • Constructor Detail

      • Reassociate

        public Reassociate()
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: IRTransform
        Gets the name of this transformation.
        Specified by:
        getName in interface IRTransform
        Returns:
        the transformation name
      • run

        public boolean run​(IRMethod method)
        Description copied from interface: IRTransform
        Runs the transformation on the specified method.
        Specified by:
        run in interface IRTransform
        Parameters:
        method - the method to transform
        Returns:
        true if the method was modified