< prev index next >

test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java

Print this page

  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package compiler.lib.ir_framework;
  25 
  26 import compiler.lib.ir_framework.driver.irmatching.mapping.*;
  27 import compiler.lib.ir_framework.driver.irmatching.parser.VMInfo;
  28 import compiler.lib.ir_framework.shared.CheckedTestFrameworkException;
  29 import compiler.lib.ir_framework.shared.TestFormat;
  30 import compiler.lib.ir_framework.shared.TestFormatException;

  31 import jdk.test.lib.Platform;
  32 import jdk.test.whitebox.WhiteBox;
  33 
  34 import java.util.HashMap;
  35 import java.util.Map;
  36 
  37 /**
  38  * This class specifies IR node placeholder strings (also referred to as just "IR nodes") with mappings to regexes
  39  * depending on the selected compile phases. The mappings are stored in {@link #IR_NODE_MAPPINGS}. Each IR node
  40  * placeholder string is mapped to a {@link IRNodeMapEntry} instance defined in
  41  * {@link compiler.lib.ir_framework.driver.irmatching.mapping}.
  42  *
  43  * <p>
  44  * IR node placeholder strings can be used in {@link IR#failOn()} and/or {@link IR#counts()} attributes to define IR
  45  * constraints. They usually represent a single C2 IR node or a group of them.
  46  *
  47  * <p>
  48  * Each IR node placeholder string is accompanied by a static block that defines an IR node placeholder to regex(es)
  49  * mapping. The IR framework will automatically replace each IR node placeholder string in a user defined test with a
  50  * regex depending on the selected compile phases in {@link IR#phase} and the provided mapping.

 135     /**
 136      * Map every vectorNode to a type string.
 137      */
 138     private static final Map<String, String> VECTOR_NODE_TYPE = new HashMap<>();
 139 
 140     /*
 141      * Start of IR placeholder string definitions followed by a static block defining the regex-for-compile-phase mapping.
 142      * An IR node placeholder string must start with PREFIX for normal IR nodes or COMPOSITE_PREFIX for composite IR
 143      * nodes, or VECTOR_PREFIX for vector nodes (see class description above).
 144      *
 145      * An IR node definition looks like this:
 146      *
 147      * public static final String IR_NODE = [PREFIX|COMPOSITE_PREFIX|VECTOR_PREFIX] + "IR_NODE" + POSTFIX;
 148      * static {
 149      *    // Define IR_NODE to regex-for-compile-phase mapping. Create a new IRNodeMapEntry object and add it to
 150      *    // IR_NODE_MAPPINGS. This can be done by using the helper methods defined after all IR node placeholder string
 151      *    // definitions.
 152      * }
 153      */
 154 






 155     public static final String ABS_D = PREFIX + "ABS_D" + POSTFIX;
 156     static {
 157         beforeMatchingNameRegex(ABS_D, "AbsD");
 158     }
 159 
 160     public static final String ABS_F = PREFIX + "ABS_F" + POSTFIX;
 161     static {
 162         beforeMatchingNameRegex(ABS_F, "AbsF");
 163     }
 164 
 165     public static final String ABS_I = PREFIX + "ABS_I" + POSTFIX;
 166     static {
 167         beforeMatchingNameRegex(ABS_I, "AbsI");
 168     }
 169 
 170     public static final String ABS_L = PREFIX + "ABS_L" + POSTFIX;
 171     static {
 172         beforeMatchingNameRegex(ABS_L, "AbsL");
 173     }
 174 

 820         String regex = START + "g1StoreN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 821         machOnly(G1_STORE_N_WITH_BARRIER_FLAG, regex);
 822     }
 823 
 824     public static final String G1_STORE_P = PREFIX + "G1_STORE_P" + POSTFIX;
 825     static {
 826         machOnlyNameRegex(G1_STORE_P, "g1StoreP");
 827     }
 828 
 829     public static final String G1_STORE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_STORE_P_WITH_BARRIER_FLAG" + POSTFIX;
 830     static {
 831         String regex = START + "g1StoreP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 832         machOnly(G1_STORE_P_WITH_BARRIER_FLAG, regex);
 833     }
 834 
 835     public static final String IF = PREFIX + "IF" + POSTFIX;
 836     static {
 837         beforeMatchingNameRegex(IF, "If\\b");
 838     }
 839 





 840     // Does not work for VM builds without JVMCI like x86_32 (a rule containing this regex will be skipped without having JVMCI built).
 841     public static final String INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP = PREFIX + "INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP" + POSTFIX;
 842     static {
 843         trapNodes(INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP, "intrinsic_or_type_checked_inlining");
 844     }
 845 
 846     public static final String INTRINSIC_TRAP = PREFIX + "INTRINSIC_TRAP" + POSTFIX;
 847     static {
 848         trapNodes(INTRINSIC_TRAP, "intrinsic");
 849     }
 850 
 851     // Is only supported on riscv64.
 852     public static final String IS_FINITE_D = PREFIX + "IS_FINITE_D" + POSTFIX;
 853     static {
 854         beforeMatchingNameRegex(IS_FINITE_D, "IsFiniteD");
 855     }
 856 
 857     // Is only supported on riscv64.
 858     public static final String IS_FINITE_F = PREFIX + "IS_FINITE_F" + POSTFIX;
 859     static {

1981         vectorNode(SUB_VL, "SubVL", TYPE_LONG);
1982     }
1983 
1984     public static final String SUB_VHF = VECTOR_PREFIX + "SUB_VHF" + POSTFIX;
1985     static {
1986         vectorNode(SUB_VHF, "SubVHF", TYPE_SHORT);
1987     }
1988 
1989     public static final String SUB_VF = VECTOR_PREFIX + "SUB_VF" + POSTFIX;
1990     static {
1991         vectorNode(SUB_VF, "SubVF", TYPE_FLOAT);
1992     }
1993 
1994     public static final String SUB_VD = VECTOR_PREFIX + "SUB_VD" + POSTFIX;
1995     static {
1996         vectorNode(SUB_VD, "SubVD", TYPE_DOUBLE);
1997     }
1998 
1999     public static final String SUBTYPE_CHECK = PREFIX + "SUBTYPE_CHECK" + POSTFIX;
2000     static {
2001         beforeMatchingNameRegex(SUBTYPE_CHECK, "SubTypeCheck");

2002     }
2003 
2004     public static final String TRAP = PREFIX + "TRAP" + POSTFIX;
2005     static {
2006         trapNodes(TRAP, "reason");
2007     }
2008 
2009     public static final String DIV_HF = PREFIX + "DIV_HF" + POSTFIX;
2010     static {
2011         beforeMatchingNameRegex(DIV_HF, "DivHF");
2012     }
2013 
2014     public static final String UDIV_I = PREFIX + "UDIV_I" + POSTFIX;
2015     static {
2016         beforeMatchingNameRegex(UDIV_I, "UDivI");
2017     }
2018 
2019     public static final String UDIV_L = PREFIX + "UDIV_L" + POSTFIX;
2020     static {
2021         beforeMatchingNameRegex(UDIV_L, "UDivL");

2713 
2714     public static final String MOD_D = PREFIX + "MOD_D" + POSTFIX;
2715     static {
2716         String regex = START + "ModD" + MID + END;
2717         macroNodes(MOD_D, regex);
2718     }
2719 
2720     public static final String BLACKHOLE = PREFIX + "BLACKHOLE" + POSTFIX;
2721     static {
2722         fromBeforeRemoveUselessToFinalCode(BLACKHOLE, "Blackhole");
2723     }
2724 
2725     /*
2726      * Utility methods to set up IR_NODE_MAPPINGS.
2727      */
2728 
2729     /**
2730      * Apply {@code regex} on all machine independent ideal graph phases up to and including
2731      * {@link CompilePhase#BEFORE_MATCHING}.
2732      */
2733     private static void beforeMatching(String irNodePlaceholder, String regex) {
2734         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2735     }
2736 
2737     /**
2738      * Apply {@code irNodeRegex} as regex for the IR node name on all machine independent ideal graph phases up to and
2739      * including {@link CompilePhase#BEFORE_MATCHING}.
2740      */
2741     private static void beforeMatchingNameRegex(String irNodePlaceholder, String irNodeRegex) {
2742         String regex = START + irNodeRegex + MID + END;
2743         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2744     }
2745 
2746     /**
2747      * Apply {@code irNodeRegex} as regex for the IR vector node name on all machine independent ideal graph phases up to and
2748      * including {@link CompilePhase#BEFORE_MATCHING}. Since this is a vector node, we can also check the vector element
2749      * type {@code typeString} and the vector size (number of elements), {@see VECTOR_SIZE}.
2750      */
2751     private static void vectorNode(String irNodePlaceholder, String irNodeRegex, String typeString) {
2752         TestFramework.check(isVectorIRNode(irNodePlaceholder), "vectorNode: failed prefix check for irNodePlaceholder "
2753                                                                + irNodePlaceholder + " -> did you use VECTOR_PREFIX?");

2758     }
2759 
2760     /**
2761      * Apply {@code regex} on all ideal graph phases up to and including {@link CompilePhase#BEFORE_MACRO_EXPANSION}.
2762      */
2763     private static void macroNodes(String irNodePlaceholder, String regex) {
2764         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.BEFORE_MACRO_EXPANSION, regex,
2765                                                                           CompilePhase.BEFORE_STRINGOPTS,
2766                                                                           CompilePhase.BEFORE_MACRO_EXPANSION));
2767     }
2768 
2769     private static void callOfNodes(String irNodePlaceholder, String callRegex) {
2770         String regex = START + callRegex + MID + IS_REPLACED + " " +  END;
2771         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2772     }
2773 
2774     /**
2775      * Apply {@code regex} on all machine dependant ideal graph phases (i.e. on the mach graph) starting from
2776      * {@link CompilePhase#MATCHING}.
2777      */
2778     private static void optoOnly(String irNodePlaceholder, String regex) {
2779         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.OPTO_ASSEMBLY, regex));
2780     }
2781 
2782     private static void machOnly(String irNodePlaceholder, String regex) {
2783         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex));
2784     }
2785 
2786     private static void machOnlyNameRegex(String irNodePlaceholder, String irNodeRegex) {
2787         String regex = START + irNodeRegex + MID + END;
2788         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex));
2789     }
2790 
2791     /**
2792      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#AFTER_CLOOPS}.
2793      */
2794     private static void fromAfterCountedLoops(String irNodePlaceholder, String regex) {
2795         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
2796                                                                           CompilePhase.AFTER_CLOOPS,
2797                                                                           CompilePhase.FINAL_CODE));
2798     }

  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package compiler.lib.ir_framework;
  25 
  26 import compiler.lib.ir_framework.driver.irmatching.mapping.*;
  27 import compiler.lib.ir_framework.driver.irmatching.parser.VMInfo;
  28 import compiler.lib.ir_framework.shared.CheckedTestFrameworkException;
  29 import compiler.lib.ir_framework.shared.TestFormat;
  30 import compiler.lib.ir_framework.shared.TestFormatException;
  31 import compiler.valhalla.inlinetypes.InlineTypeIRNode;
  32 import jdk.test.lib.Platform;
  33 import jdk.test.whitebox.WhiteBox;
  34 
  35 import java.util.HashMap;
  36 import java.util.Map;
  37 
  38 /**
  39  * This class specifies IR node placeholder strings (also referred to as just "IR nodes") with mappings to regexes
  40  * depending on the selected compile phases. The mappings are stored in {@link #IR_NODE_MAPPINGS}. Each IR node
  41  * placeholder string is mapped to a {@link IRNodeMapEntry} instance defined in
  42  * {@link compiler.lib.ir_framework.driver.irmatching.mapping}.
  43  *
  44  * <p>
  45  * IR node placeholder strings can be used in {@link IR#failOn()} and/or {@link IR#counts()} attributes to define IR
  46  * constraints. They usually represent a single C2 IR node or a group of them.
  47  *
  48  * <p>
  49  * Each IR node placeholder string is accompanied by a static block that defines an IR node placeholder to regex(es)
  50  * mapping. The IR framework will automatically replace each IR node placeholder string in a user defined test with a
  51  * regex depending on the selected compile phases in {@link IR#phase} and the provided mapping.

 136     /**
 137      * Map every vectorNode to a type string.
 138      */
 139     private static final Map<String, String> VECTOR_NODE_TYPE = new HashMap<>();
 140 
 141     /*
 142      * Start of IR placeholder string definitions followed by a static block defining the regex-for-compile-phase mapping.
 143      * An IR node placeholder string must start with PREFIX for normal IR nodes or COMPOSITE_PREFIX for composite IR
 144      * nodes, or VECTOR_PREFIX for vector nodes (see class description above).
 145      *
 146      * An IR node definition looks like this:
 147      *
 148      * public static final String IR_NODE = [PREFIX|COMPOSITE_PREFIX|VECTOR_PREFIX] + "IR_NODE" + POSTFIX;
 149      * static {
 150      *    // Define IR_NODE to regex-for-compile-phase mapping. Create a new IRNodeMapEntry object and add it to
 151      *    // IR_NODE_MAPPINGS. This can be done by using the helper methods defined after all IR node placeholder string
 152      *    // definitions.
 153      * }
 154      */
 155 
 156     // Valhalla: Make sure that all Valhalla specific IR nodes are also properly initialized. Doing it here also
 157     //           ensures that the Flag VM is able to pick up the correct compile phases.
 158     static {
 159         InlineTypeIRNode.forceStaticInitialization();
 160     }
 161 
 162     public static final String ABS_D = PREFIX + "ABS_D" + POSTFIX;
 163     static {
 164         beforeMatchingNameRegex(ABS_D, "AbsD");
 165     }
 166 
 167     public static final String ABS_F = PREFIX + "ABS_F" + POSTFIX;
 168     static {
 169         beforeMatchingNameRegex(ABS_F, "AbsF");
 170     }
 171 
 172     public static final String ABS_I = PREFIX + "ABS_I" + POSTFIX;
 173     static {
 174         beforeMatchingNameRegex(ABS_I, "AbsI");
 175     }
 176 
 177     public static final String ABS_L = PREFIX + "ABS_L" + POSTFIX;
 178     static {
 179         beforeMatchingNameRegex(ABS_L, "AbsL");
 180     }
 181 

 827         String regex = START + "g1StoreN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 828         machOnly(G1_STORE_N_WITH_BARRIER_FLAG, regex);
 829     }
 830 
 831     public static final String G1_STORE_P = PREFIX + "G1_STORE_P" + POSTFIX;
 832     static {
 833         machOnlyNameRegex(G1_STORE_P, "g1StoreP");
 834     }
 835 
 836     public static final String G1_STORE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_STORE_P_WITH_BARRIER_FLAG" + POSTFIX;
 837     static {
 838         String regex = START + "g1StoreP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 839         machOnly(G1_STORE_P_WITH_BARRIER_FLAG, regex);
 840     }
 841 
 842     public static final String IF = PREFIX + "IF" + POSTFIX;
 843     static {
 844         beforeMatchingNameRegex(IF, "If\\b");
 845     }
 846 
 847     public static final String INLINE_TYPE = PREFIX + "INLINE_TYPE" + POSTFIX;
 848     static {
 849         beforeMatchingNameRegex(INLINE_TYPE, "InlineType");
 850     }
 851 
 852     // Does not work for VM builds without JVMCI like x86_32 (a rule containing this regex will be skipped without having JVMCI built).
 853     public static final String INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP = PREFIX + "INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP" + POSTFIX;
 854     static {
 855         trapNodes(INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP, "intrinsic_or_type_checked_inlining");
 856     }
 857 
 858     public static final String INTRINSIC_TRAP = PREFIX + "INTRINSIC_TRAP" + POSTFIX;
 859     static {
 860         trapNodes(INTRINSIC_TRAP, "intrinsic");
 861     }
 862 
 863     // Is only supported on riscv64.
 864     public static final String IS_FINITE_D = PREFIX + "IS_FINITE_D" + POSTFIX;
 865     static {
 866         beforeMatchingNameRegex(IS_FINITE_D, "IsFiniteD");
 867     }
 868 
 869     // Is only supported on riscv64.
 870     public static final String IS_FINITE_F = PREFIX + "IS_FINITE_F" + POSTFIX;
 871     static {

1993         vectorNode(SUB_VL, "SubVL", TYPE_LONG);
1994     }
1995 
1996     public static final String SUB_VHF = VECTOR_PREFIX + "SUB_VHF" + POSTFIX;
1997     static {
1998         vectorNode(SUB_VHF, "SubVHF", TYPE_SHORT);
1999     }
2000 
2001     public static final String SUB_VF = VECTOR_PREFIX + "SUB_VF" + POSTFIX;
2002     static {
2003         vectorNode(SUB_VF, "SubVF", TYPE_FLOAT);
2004     }
2005 
2006     public static final String SUB_VD = VECTOR_PREFIX + "SUB_VD" + POSTFIX;
2007     static {
2008         vectorNode(SUB_VD, "SubVD", TYPE_DOUBLE);
2009     }
2010 
2011     public static final String SUBTYPE_CHECK = PREFIX + "SUBTYPE_CHECK" + POSTFIX;
2012     static {
2013         String regex = START + "SubTypeCheck" + MID + END;
2014         macroNodes(SUBTYPE_CHECK, regex);
2015     }
2016 
2017     public static final String TRAP = PREFIX + "TRAP" + POSTFIX;
2018     static {
2019         trapNodes(TRAP, "reason");
2020     }
2021 
2022     public static final String DIV_HF = PREFIX + "DIV_HF" + POSTFIX;
2023     static {
2024         beforeMatchingNameRegex(DIV_HF, "DivHF");
2025     }
2026 
2027     public static final String UDIV_I = PREFIX + "UDIV_I" + POSTFIX;
2028     static {
2029         beforeMatchingNameRegex(UDIV_I, "UDivI");
2030     }
2031 
2032     public static final String UDIV_L = PREFIX + "UDIV_L" + POSTFIX;
2033     static {
2034         beforeMatchingNameRegex(UDIV_L, "UDivL");

2726 
2727     public static final String MOD_D = PREFIX + "MOD_D" + POSTFIX;
2728     static {
2729         String regex = START + "ModD" + MID + END;
2730         macroNodes(MOD_D, regex);
2731     }
2732 
2733     public static final String BLACKHOLE = PREFIX + "BLACKHOLE" + POSTFIX;
2734     static {
2735         fromBeforeRemoveUselessToFinalCode(BLACKHOLE, "Blackhole");
2736     }
2737 
2738     /*
2739      * Utility methods to set up IR_NODE_MAPPINGS.
2740      */
2741 
2742     /**
2743      * Apply {@code regex} on all machine independent ideal graph phases up to and including
2744      * {@link CompilePhase#BEFORE_MATCHING}.
2745      */
2746     public static void beforeMatching(String irNodePlaceholder, String regex) {
2747         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2748     }
2749 
2750     /**
2751      * Apply {@code irNodeRegex} as regex for the IR node name on all machine independent ideal graph phases up to and
2752      * including {@link CompilePhase#BEFORE_MATCHING}.
2753      */
2754     private static void beforeMatchingNameRegex(String irNodePlaceholder, String irNodeRegex) {
2755         String regex = START + irNodeRegex + MID + END;
2756         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2757     }
2758 
2759     /**
2760      * Apply {@code irNodeRegex} as regex for the IR vector node name on all machine independent ideal graph phases up to and
2761      * including {@link CompilePhase#BEFORE_MATCHING}. Since this is a vector node, we can also check the vector element
2762      * type {@code typeString} and the vector size (number of elements), {@see VECTOR_SIZE}.
2763      */
2764     private static void vectorNode(String irNodePlaceholder, String irNodeRegex, String typeString) {
2765         TestFramework.check(isVectorIRNode(irNodePlaceholder), "vectorNode: failed prefix check for irNodePlaceholder "
2766                                                                + irNodePlaceholder + " -> did you use VECTOR_PREFIX?");

2771     }
2772 
2773     /**
2774      * Apply {@code regex} on all ideal graph phases up to and including {@link CompilePhase#BEFORE_MACRO_EXPANSION}.
2775      */
2776     private static void macroNodes(String irNodePlaceholder, String regex) {
2777         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.BEFORE_MACRO_EXPANSION, regex,
2778                                                                           CompilePhase.BEFORE_STRINGOPTS,
2779                                                                           CompilePhase.BEFORE_MACRO_EXPANSION));
2780     }
2781 
2782     private static void callOfNodes(String irNodePlaceholder, String callRegex) {
2783         String regex = START + callRegex + MID + IS_REPLACED + " " +  END;
2784         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2785     }
2786 
2787     /**
2788      * Apply {@code regex} on all machine dependant ideal graph phases (i.e. on the mach graph) starting from
2789      * {@link CompilePhase#MATCHING}.
2790      */
2791     public static void optoOnly(String irNodePlaceholder, String regex) {
2792         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.OPTO_ASSEMBLY, regex));
2793     }
2794 
2795     private static void machOnly(String irNodePlaceholder, String regex) {
2796         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex));
2797     }
2798 
2799     private static void machOnlyNameRegex(String irNodePlaceholder, String irNodeRegex) {
2800         String regex = START + irNodeRegex + MID + END;
2801         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex));
2802     }
2803 
2804     /**
2805      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#AFTER_CLOOPS}.
2806      */
2807     private static void fromAfterCountedLoops(String irNodePlaceholder, String regex) {
2808         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
2809                                                                           CompilePhase.AFTER_CLOOPS,
2810                                                                           CompilePhase.FINAL_CODE));
2811     }
< prev index next >