1 /* 2 * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 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.network.testvm.java.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. 52 * 53 * <p> 54 * Each mapping must define a default compile phase which is applied when the user does not explicitly set the 55 * {@link IR#phase()} attribute or when directly using {@link CompilePhase#DEFAULT}. In this case, the IR framework 56 * falls back on the default compile phase of any {@link IRNodeMapEntry}. 57 * 58 * <p> 59 * The IR framework reports a {@link TestFormatException} if: 60 * <ul> 61 * <li><p> A user test specifies a compile phase for which no mapping is defined in this class.</li> 62 * <li><p> An IR node placeholder string is either missing a mapping or does not provide a regex for a specified 63 * compile phase in {@link IR#phase}. 64 * </ul> 65 * 66 * <p> 67 * There are two types of IR nodes: 68 * <ul> 69 * <li><p>Normal IR nodes: The IR node placeholder string is directly replaced by a regex.</li> 70 * <li><p>Composite IR nodes: The IR node placeholder string contains an additional {@link #COMPOSITE_PREFIX}. 71 * Using this IR node expects another user provided string in the constraint list of 72 * {@link IR#failOn()} and {@link IR#counts()}. They cannot be used as normal IR nodes. 73 * Trying to do so will result in a format violation error.</li> 74 * <li><p>Vector IR nodes: The IR node placeholder string contains an additional {@link #VECTOR_PREFIX}. 75 * Using this IR node, one can check for the type and size of a vector. The type must 76 * be directly specified in {@link #vectorNode}. The size can be specified directly with 77 * an additional argument using {@link #VECTOR_SIZE}, followed by a size tag or a comma 78 * separated list of sizes. If the size argument is not given, then a default size of 79 * {@link #VECTOR_SIZE_MAX} is taken, which is the number of elements that can fit in a 80 * vector of the specified type (depends on the VM flag MaxVectorSize and CPU features). 81 * However, when using {@link IR#failOn} or {@link IR#counts()} with comparison {@code <}, 82 * or {@code <=} or {@code =0}, the default size is {@link #VECTOR_SIZE_ANY}, allowing any 83 * size. The motivation for these default values is that in most cases one wants to have 84 * vectorization with maximal vector width, or no vectorization of any vector width. 85 * </ul> 86 */ 87 public class IRNode { 88 /** 89 * Prefix for normal IR nodes. 90 */ 91 public static final String PREFIX = "_#"; 92 /** 93 * Prefix for composite IR nodes. 94 */ 95 private static final String COMPOSITE_PREFIX = PREFIX + "C#"; 96 /** 97 * Prefix for vector IR nodes. 98 */ 99 private static final String VECTOR_PREFIX = PREFIX + "V#"; 100 101 private static final String POSTFIX = "#_"; 102 103 public static final String START = "(\\d+(\\s){2}("; 104 public static final String MID = ".*)+(\\s){2}===.*"; 105 public static final String END = ")"; 106 107 public static final String IS_REPLACED = "#IS_REPLACED#"; // Is replaced by an additional user-defined string. 108 109 public static final String VECTOR_SIZE = "_@"; 110 public static final String VECTOR_SIZE_TAG_ANY = "any"; 111 public static final String VECTOR_SIZE_TAG_MAX = "max_for_type"; 112 public static final String VECTOR_SIZE_ANY = VECTOR_SIZE + VECTOR_SIZE_TAG_ANY; // default for counts "=0" and failOn 113 public static final String VECTOR_SIZE_MAX = VECTOR_SIZE + VECTOR_SIZE_TAG_MAX; // default in counts 114 public static final String VECTOR_SIZE_2 = VECTOR_SIZE + "2"; 115 public static final String VECTOR_SIZE_4 = VECTOR_SIZE + "4"; 116 public static final String VECTOR_SIZE_8 = VECTOR_SIZE + "8"; 117 public static final String VECTOR_SIZE_16 = VECTOR_SIZE + "16"; 118 public static final String VECTOR_SIZE_32 = VECTOR_SIZE + "32"; 119 public static final String VECTOR_SIZE_64 = VECTOR_SIZE + "64"; 120 121 private static final String TYPE_BYTE = "B"; 122 private static final String TYPE_CHAR = "C"; 123 private static final String TYPE_SHORT = "S"; 124 private static final String TYPE_INT = "I"; 125 private static final String TYPE_LONG = "J"; 126 private static final String TYPE_FLOAT = "F"; 127 private static final String TYPE_DOUBLE = "D"; 128 private static final String TYPE_BOOLEAN = "Z"; 129 130 /** 131 * IR placeholder string to regex-for-compile-phase map. 132 */ 133 private static final Map<String, IRNodeMapEntry> IR_NODE_MAPPINGS = new HashMap<>(); 134 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 // Valhalla: Make sure that all Valhalla specific IR nodes are also properly initialized. Doing it here also 156 // ensures that the Flag VM is able to pick up the correct compile phases. 157 static { 158 InlineTypeIRNode.forceStaticInitialization(); 159 } 160 161 public static final String ABS_D = PREFIX + "ABS_D" + POSTFIX; 162 static { 163 beforeMatchingNameRegex(ABS_D, "AbsD"); 164 } 165 166 public static final String ABS_F = PREFIX + "ABS_F" + POSTFIX; 167 static { 168 beforeMatchingNameRegex(ABS_F, "AbsF"); 169 } 170 171 public static final String ABS_I = PREFIX + "ABS_I" + POSTFIX; 172 static { 173 beforeMatchingNameRegex(ABS_I, "AbsI"); 174 } 175 176 public static final String ABS_L = PREFIX + "ABS_L" + POSTFIX; 177 static { 178 beforeMatchingNameRegex(ABS_L, "AbsL"); 179 } 180 181 public static final String ABS_VB = VECTOR_PREFIX + "ABS_VB" + POSTFIX; 182 static { 183 vectorNode(ABS_VB, "AbsVB", TYPE_BYTE); 184 } 185 186 // ABS_VC / AbsVC does not exist (char is 2 byte unsigned) 187 188 public static final String ABS_VS = VECTOR_PREFIX + "ABS_VS" + POSTFIX; 189 static { 190 vectorNode(ABS_VS, "AbsVS", TYPE_SHORT); 191 } 192 193 public static final String ABS_VI = VECTOR_PREFIX + "ABS_VI" + POSTFIX; 194 static { 195 vectorNode(ABS_VI, "AbsVI", TYPE_INT); 196 } 197 198 public static final String ABS_VL = VECTOR_PREFIX + "ABS_VL" + POSTFIX; 199 static { 200 vectorNode(ABS_VL, "AbsVL", TYPE_LONG); 201 } 202 203 public static final String ABS_VF = VECTOR_PREFIX + "ABS_VF" + POSTFIX; 204 static { 205 vectorNode(ABS_VF, "AbsVF", TYPE_FLOAT); 206 } 207 208 public static final String ABS_VD = VECTOR_PREFIX + "ABS_VD" + POSTFIX; 209 static { 210 vectorNode(ABS_VD, "AbsVD", TYPE_DOUBLE); 211 } 212 213 public static final String ADD = PREFIX + "ADD" + POSTFIX; 214 static { 215 beforeMatchingNameRegex(ADD, "Add(I|L|F|D|P)"); 216 } 217 218 public static final String ADD_F = PREFIX + "ADD_F" + POSTFIX; 219 static { 220 beforeMatchingNameRegex(ADD_F, "AddF"); 221 } 222 223 public static final String ADD_I = PREFIX + "ADD_I" + POSTFIX; 224 static { 225 beforeMatchingNameRegex(ADD_I, "AddI"); 226 } 227 228 public static final String ADD_L = PREFIX + "ADD_L" + POSTFIX; 229 static { 230 beforeMatchingNameRegex(ADD_L, "AddL"); 231 } 232 233 public static final String ADD_HF = PREFIX + "ADD_HF" + POSTFIX; 234 static { 235 beforeMatchingNameRegex(ADD_HF, "AddHF"); 236 } 237 238 public static final String ADD_P = PREFIX + "ADD_P" + POSTFIX; 239 static { 240 beforeMatchingNameRegex(ADD_P, "AddP"); 241 } 242 243 public static final String ADD_D = PREFIX + "ADD_D" + POSTFIX; 244 static { 245 beforeMatchingNameRegex(ADD_D, "AddD"); 246 } 247 248 public static final String ADD_VD = VECTOR_PREFIX + "ADD_VD" + POSTFIX; 249 static { 250 vectorNode(ADD_VD, "AddVD", TYPE_DOUBLE); 251 } 252 253 public static final String ADD_VI = VECTOR_PREFIX + "ADD_VI" + POSTFIX; 254 static { 255 vectorNode(ADD_VI, "AddVI", TYPE_INT); 256 } 257 258 public static final String ADD_VHF = VECTOR_PREFIX + "ADD_VHF" + POSTFIX; 259 static { 260 vectorNode(ADD_VHF, "AddVHF", TYPE_SHORT); 261 } 262 263 public static final String ADD_VF = VECTOR_PREFIX + "ADD_VF" + POSTFIX; 264 static { 265 vectorNode(ADD_VF, "AddVF", TYPE_FLOAT); 266 } 267 268 public static final String ADD_VB = VECTOR_PREFIX + "ADD_VB" + POSTFIX; 269 static { 270 vectorNode(ADD_VB, "AddVB", TYPE_BYTE); 271 } 272 273 public static final String ADD_VS = VECTOR_PREFIX + "ADD_VS" + POSTFIX; 274 static { 275 vectorNode(ADD_VS, "AddVS", TYPE_SHORT); 276 } 277 278 public static final String ADD_VL = VECTOR_PREFIX + "ADD_VL" + POSTFIX; 279 static { 280 vectorNode(ADD_VL, "AddVL", TYPE_LONG); 281 } 282 283 public static final String SATURATING_ADD_VB = VECTOR_PREFIX + "SATURATING_ADD_VB" + POSTFIX; 284 static { 285 vectorNode(SATURATING_ADD_VB, "SaturatingAddV", TYPE_BYTE); 286 } 287 288 public static final String SATURATING_ADD_VS = VECTOR_PREFIX + "SATURATING_ADD_VS" + POSTFIX; 289 static { 290 vectorNode(SATURATING_ADD_VS, "SaturatingAddV", TYPE_SHORT); 291 } 292 293 public static final String SATURATING_ADD_VI = VECTOR_PREFIX + "SATURATING_ADD_VI" + POSTFIX; 294 static { 295 vectorNode(SATURATING_ADD_VI, "SaturatingAddV", TYPE_INT); 296 } 297 298 public static final String SATURATING_ADD_VL = VECTOR_PREFIX + "SATURATING_ADD_VL" + POSTFIX; 299 static { 300 vectorNode(SATURATING_ADD_VL, "SaturatingAddV", TYPE_LONG); 301 } 302 303 public static final String SATURATING_SUB_VB = VECTOR_PREFIX + "SATURATING_SUB_VB" + POSTFIX; 304 static { 305 vectorNode(SATURATING_SUB_VB, "SaturatingSubV", TYPE_BYTE); 306 } 307 308 public static final String SATURATING_SUB_VS = VECTOR_PREFIX + "SATURATING_SUB_VS" + POSTFIX; 309 static { 310 vectorNode(SATURATING_SUB_VS, "SaturatingSubV", TYPE_SHORT); 311 } 312 313 public static final String SATURATING_SUB_VI = VECTOR_PREFIX + "SATURATING_SUB_VI" + POSTFIX; 314 static { 315 vectorNode(SATURATING_SUB_VI, "SaturatingSubV", TYPE_INT); 316 } 317 318 public static final String SATURATING_SUB_VL = VECTOR_PREFIX + "SATURATING_SUB_VL" + POSTFIX; 319 static { 320 vectorNode(SATURATING_SUB_VL, "SaturatingSubV", TYPE_LONG); 321 } 322 323 public static final String ADD_REDUCTION_V = PREFIX + "ADD_REDUCTION_V" + POSTFIX; 324 static { 325 beforeMatchingNameRegex(ADD_REDUCTION_V, "AddReductionV(B|S|I|L|F|D)"); 326 } 327 328 public static final String ADD_REDUCTION_VD = PREFIX + "ADD_REDUCTION_VD" + POSTFIX; 329 static { 330 superWordNodes(ADD_REDUCTION_VD, "AddReductionVD"); 331 } 332 333 public static final String ADD_REDUCTION_VF = PREFIX + "ADD_REDUCTION_VF" + POSTFIX; 334 static { 335 superWordNodes(ADD_REDUCTION_VF, "AddReductionVF"); 336 } 337 338 public static final String ADD_REDUCTION_VHF = PREFIX + "ADD_REDUCTION_VHF" + POSTFIX; 339 static { 340 superWordNodes(ADD_REDUCTION_VHF, "AddReductionVHF"); 341 } 342 343 public static final String ADD_REDUCTION_VI = PREFIX + "ADD_REDUCTION_VI" + POSTFIX; 344 static { 345 superWordNodes(ADD_REDUCTION_VI, "AddReductionVI"); 346 } 347 348 public static final String ADD_REDUCTION_VL = PREFIX + "ADD_REDUCTION_VL" + POSTFIX; 349 static { 350 superWordNodes(ADD_REDUCTION_VL, "AddReductionVL"); 351 } 352 353 public static final String OPAQUE_MULTIVERSIONING = PREFIX + "OPAQUE_MULTIVERSIONING" + POSTFIX; 354 static { 355 beforeMatchingNameRegex(OPAQUE_MULTIVERSIONING, "OpaqueMultiversioning"); 356 } 357 358 public static final String REARRANGE_VB = VECTOR_PREFIX + "REARRANGE_VB" + POSTFIX; 359 static { 360 vectorNode(REARRANGE_VB, "VectorRearrange", TYPE_BYTE); 361 } 362 363 public static final String REARRANGE_VS = VECTOR_PREFIX + "REARRANGE_VS" + POSTFIX; 364 static { 365 vectorNode(REARRANGE_VS, "VectorRearrange", TYPE_SHORT); 366 } 367 368 public static final String REARRANGE_VI = VECTOR_PREFIX + "REARRANGE_VI" + POSTFIX; 369 static { 370 vectorNode(REARRANGE_VI, "VectorRearrange", TYPE_INT); 371 } 372 373 public static final String REARRANGE_VL = VECTOR_PREFIX + "REARRANGE_VL" + POSTFIX; 374 static { 375 vectorNode(REARRANGE_VL, "VectorRearrange", TYPE_LONG); 376 } 377 378 public static final String REARRANGE_VF = VECTOR_PREFIX + "REARRANGE_VF" + POSTFIX; 379 static { 380 vectorNode(REARRANGE_VF, "VectorRearrange", TYPE_FLOAT); 381 } 382 383 public static final String REARRANGE_VD = VECTOR_PREFIX + "REARRANGE_VD" + POSTFIX; 384 static { 385 vectorNode(REARRANGE_VD, "VectorRearrange", TYPE_DOUBLE); 386 } 387 388 public static final String ADD_P_OF = COMPOSITE_PREFIX + "ADD_P_OF" + POSTFIX; 389 static { 390 String regex = START + "addP_" + IS_REPLACED + MID + ".*" + END; 391 machOnly(ADD_P_OF, regex); 392 } 393 394 public static final String ALLOC = PREFIX + "ALLOC" + POSTFIX; 395 static { 396 String regex = START + "Allocate\\b" + MID + END; 397 macroNodes(ALLOC, regex); 398 } 399 400 public static final String ALLOC_OF = COMPOSITE_PREFIX + "ALLOC_OF" + POSTFIX; 401 static { 402 allocateOfNodes(ALLOC_OF, IS_REPLACED); 403 } 404 405 public static void allocateOfNodes(String irNodePlaceholder, String allocatee) { 406 String regex = START + "Allocate\\b" + MID + "allocationKlass:.*\\b" + allocatee + "\\s.*" + END; 407 macroNodes(irNodePlaceholder, regex); 408 } 409 410 public static final String ALLOC_ARRAY = PREFIX + "ALLOC_ARRAY" + POSTFIX; 411 static { 412 String regex = START + "AllocateArray\\b" + MID + END; 413 macroNodes(ALLOC_ARRAY, regex); 414 } 415 416 public static final String ALLOC_ARRAY_OF = COMPOSITE_PREFIX + "ALLOC_ARRAY_OF" + POSTFIX; 417 static { 418 allocateArrayOfNodes(ALLOC_ARRAY_OF, IS_REPLACED); 419 } 420 421 public static void allocateArrayOfNodes(String irNodePlaceholder, String allocatee) { 422 // Assuming we are looking for an array of "some/package/MyClass". The printout is 423 // [Lsome/package/MyClass; 424 // or, with more dimensions 425 // [[[Lsome/package/MyClass; 426 427 // Case where the searched string is a not fully qualified name (but maybe partially qualified): 428 // package/MyClass or MyClass 429 // The ".*\\b" will eat the "some/" and "some/package/" resp. 430 String partial_name_prefix = ".+\\b"; 431 432 // The thing after "allocationKlass:" (the name of the allocated class) is a sequence of: 433 // - a non-empty sequence of "[" 434 // - a single character ("L"), 435 // - maybe a non-empty sequence of characters ending on a word boundary 436 // this sequence is omitted if the given name is already fully qualified (exact match) 437 // but will eat the package path prefix in the cases described above 438 // - the name we are looking for 439 // - the final ";". 440 String name_part = "\\[+.(" + partial_name_prefix + ")?" + allocatee + ";"; 441 String regex = START + "AllocateArray\\b" + MID + "allocationKlass:" + name_part + ".*" + END; 442 macroNodes(irNodePlaceholder, regex); 443 } 444 445 public static final String OR = PREFIX + "OR" + POSTFIX; 446 static { 447 beforeMatchingNameRegex(OR, "Or(I|L)"); 448 } 449 450 public static final String AND = PREFIX + "AND" + POSTFIX; 451 static { 452 beforeMatchingNameRegex(AND, "And(I|L)"); 453 } 454 455 public static final String AND_I = PREFIX + "AND_I" + POSTFIX; 456 static { 457 beforeMatchingNameRegex(AND_I, "AndI"); 458 } 459 460 public static final String AND_L = PREFIX + "AND_L" + POSTFIX; 461 static { 462 beforeMatchingNameRegex(AND_L, "AndL"); 463 } 464 465 public static final String AND_VB = VECTOR_PREFIX + "AND_VB" + POSTFIX; 466 static { 467 vectorNode(AND_VB, "AndV", TYPE_BYTE); 468 } 469 470 public static final String AND_VC = VECTOR_PREFIX + "AND_VC" + POSTFIX; 471 static { 472 vectorNode(AND_VC, "AndV", TYPE_CHAR); 473 } 474 475 public static final String AND_VS = VECTOR_PREFIX + "AND_VS" + POSTFIX; 476 static { 477 vectorNode(AND_VS, "AndV", TYPE_SHORT); 478 } 479 480 public static final String AND_VI = VECTOR_PREFIX + "AND_VI" + POSTFIX; 481 static { 482 vectorNode(AND_VI, "AndV", TYPE_INT); 483 } 484 485 public static final String AND_VL = VECTOR_PREFIX + "AND_VL" + POSTFIX; 486 static { 487 vectorNode(AND_VL, "AndV", TYPE_LONG); 488 } 489 490 public static final String AND_V_MASK = PREFIX + "AND_V_MASK" + POSTFIX; 491 static { 492 beforeMatchingNameRegex(AND_V_MASK, "AndVMask"); 493 } 494 495 public static final String AND_REDUCTION_V = PREFIX + "AND_REDUCTION_V" + POSTFIX; 496 static { 497 superWordNodes(AND_REDUCTION_V, "AndReductionV"); 498 } 499 500 public static final String CALL = PREFIX + "CALL" + POSTFIX; 501 static { 502 beforeMatchingNameRegex(CALL, "Call.*Java"); 503 } 504 505 public static final String CALL_OF = COMPOSITE_PREFIX + "CALL_OF" + POSTFIX; 506 static { 507 callOfNodes(CALL_OF, "Call.*", IS_REPLACED + " " ); 508 } 509 510 public static final String CALL_OF_METHOD = COMPOSITE_PREFIX + "CALL_OF_METHOD" + POSTFIX; 511 static { 512 callOfNodes(CALL_OF_METHOD, "Call.*Java", IS_REPLACED + " "); 513 } 514 515 public static final String STATIC_CALL = PREFIX + "STATIC_CALL" + POSTFIX; 516 static { 517 beforeMatchingNameRegex(STATIC_CALL, "CallStaticJava"); 518 } 519 520 public static final String STATIC_CALL_OF_METHOD = COMPOSITE_PREFIX + "STATIC_CALL_OF_METHOD" + POSTFIX; 521 static { 522 staticCallOfMethodNodes(STATIC_CALL_OF_METHOD, IS_REPLACED + " "); 523 } 524 525 public static void staticCallOfMethodNodes(String irNodePlaceholder, String calleeRegex) { 526 callOfNodes(irNodePlaceholder, "CallStaticJava", calleeRegex); 527 } 528 529 public static final String CALL_LEAF_NO_FP = PREFIX + "CALL_LEAF_NO_FP" + POSTFIX; 530 static { 531 beforeMatchingNameRegex(CALL_LEAF_NO_FP, "CallLeafNoFP"); 532 } 533 534 public static final String CALL_LEAF_NO_FP_OF_METHOD = COMPOSITE_PREFIX + "CALL_LEAF_NO_FP_OF_METHOD" + POSTFIX; 535 static { 536 callLeafNoFpOfMethodNodes(CALL_LEAF_NO_FP_OF_METHOD, IS_REPLACED); 537 } 538 539 public static void callLeafNoFpOfMethodNodes(String irNodePlaceholder, String calleeRegex) { 540 callOfNodes(irNodePlaceholder, "CallLeafNoFP", calleeRegex); 541 } 542 543 public static final String CAST_II = PREFIX + "CAST_II" + POSTFIX; 544 static { 545 beforeMatchingNameRegex(CAST_II, "CastII"); 546 } 547 548 public static final String CAST_LL = PREFIX + "CAST_LL" + POSTFIX; 549 static { 550 beforeMatchingNameRegex(CAST_LL, "CastLL"); 551 } 552 553 public static final String CBNZW_HI = PREFIX + "CBNZW_HI" + POSTFIX; 554 static { 555 optoOnly(CBNZW_HI, "cbwhi"); 556 } 557 558 public static final String CBZW_LS = PREFIX + "CBZW_LS" + POSTFIX; 559 static { 560 optoOnly(CBZW_LS, "cbwls"); 561 } 562 563 public static final String CBZ_LS = PREFIX + "CBZ_LS" + POSTFIX; 564 static { 565 optoOnly(CBZ_LS, "cbls"); 566 } 567 568 public static final String CBZ_HI = PREFIX + "CBZ_HI" + POSTFIX; 569 static { 570 optoOnly(CBZ_HI, "cbhi"); 571 } 572 573 public static final String CHECKCAST_ARRAY = PREFIX + "CHECKCAST_ARRAY" + POSTFIX; 574 static { 575 String regex = "(((?i:cmp|CLFI|CLR).*aryklassptr:\\[.*:Constant|.*(?i:mov|mv|or).*aryklassptr:\\[.*:Constant.*\\R.*(cmp|CMP|CLR))" + END; 576 optoOnly(CHECKCAST_ARRAY, regex); 577 } 578 579 public static final String CHECKCAST_ARRAY_OF = COMPOSITE_PREFIX + "CHECKCAST_ARRAY_OF" + POSTFIX; 580 static { 581 String regex = "(((?i:cmp|CLFI|CLR).*aryklassptr:\\[.*" + IS_REPLACED + ":.*:Constant|.*(?i:mov|mv|or).*aryklassptr:\\[.*" + IS_REPLACED + ":.*:Constant.*\\R.*(cmp|CMP|CLR))" + END; 582 optoOnly(CHECKCAST_ARRAY_OF, regex); 583 } 584 585 // Does not work on s390 (a rule containing this regex will be skipped on s390). 586 public static final String CHECKCAST_ARRAYCOPY = PREFIX + "CHECKCAST_ARRAYCOPY" + POSTFIX; 587 static { 588 String regex = "(.*((?i:call_leaf_nofp,runtime)|CALL,\\s?runtime leaf nofp|BCTRL.*.leaf call).*checkcast_arraycopy.*" + END; 589 optoOnly(CHECKCAST_ARRAYCOPY, regex); 590 } 591 592 public static final String CLASS_CHECK_TRAP = PREFIX + "CLASS_CHECK_TRAP" + POSTFIX; 593 static { 594 trapNodes(CLASS_CHECK_TRAP, "class_check"); 595 } 596 597 public static final String CMOVE_F = PREFIX + "CMOVE_F" + POSTFIX; 598 static { 599 beforeMatchingNameRegex(CMOVE_F, "CMoveF"); 600 } 601 602 public static final String CMOVE_D = PREFIX + "CMOVE_D" + POSTFIX; 603 static { 604 beforeMatchingNameRegex(CMOVE_D, "CMoveD"); 605 } 606 607 public static final String CMOVE_I = PREFIX + "CMOVE_I" + POSTFIX; 608 static { 609 beforeMatchingNameRegex(CMOVE_I, "CMoveI"); 610 } 611 612 public static final String CMOVE_L = PREFIX + "CMOVE_L" + POSTFIX; 613 static { 614 beforeMatchingNameRegex(CMOVE_L, "CMoveL"); 615 } 616 617 public static final String CMP_F = PREFIX + "CMP_F" + POSTFIX; 618 static { 619 beforeMatchingNameRegex(CMP_F, "CmpF"); 620 } 621 622 public static final String CMP_D = PREFIX + "CMP_D" + POSTFIX; 623 static { 624 beforeMatchingNameRegex(CMP_D, "CmpD"); 625 } 626 627 public static final String CMP_I = PREFIX + "CMP_I" + POSTFIX; 628 static { 629 beforeMatchingNameRegex(CMP_I, "CmpI"); 630 } 631 632 public static final String CMP_L = PREFIX + "CMP_L" + POSTFIX; 633 static { 634 beforeMatchingNameRegex(CMP_L, "CmpL"); 635 } 636 637 public static final String CMP_U = PREFIX + "CMP_U" + POSTFIX; 638 static { 639 beforeMatchingNameRegex(CMP_U, "CmpU\\b"); 640 } 641 642 public static final String CMP_U3 = PREFIX + "CMP_U3" + POSTFIX; 643 static { 644 beforeMatchingNameRegex(CMP_U3, "CmpU3"); 645 } 646 647 public static final String CMP_UL = PREFIX + "CMP_UL" + POSTFIX; 648 static { 649 beforeMatchingNameRegex(CMP_UL, "CmpUL"); 650 } 651 652 public static final String CMP_UL3 = PREFIX + "CMP_UL3" + POSTFIX; 653 static { 654 beforeMatchingNameRegex(CMP_UL3, "CmpUL3"); 655 } 656 657 public static final String CMP_P = PREFIX + "CMP_P" + POSTFIX; 658 static { 659 beforeMatchingNameRegex(CMP_P, "CmpP"); 660 } 661 662 public static final String CMP_N = PREFIX + "CMP_N" + POSTFIX; 663 static { 664 beforeMatchingNameRegex(CMP_N, "CmpN"); 665 } 666 667 public static final String CMP_P_OR_N = PREFIX + "CMP_P_OR_N" + POSTFIX; 668 static { 669 beforeMatchingNameRegex(CMP_P_OR_N, "Cmp(P|N)"); 670 } 671 672 public static final String CMP_LT_MASK = PREFIX + "CMP_LT_MASK" + POSTFIX; 673 static { 674 beforeMatchingNameRegex(CMP_LT_MASK, "CmpLTMask"); 675 } 676 677 public static final String ROUND_F = PREFIX + "ROUND_F" + POSTFIX; 678 static { 679 beforeMatchingNameRegex(ROUND_F, "RoundF"); 680 } 681 682 public static final String ROUND_D = PREFIX + "ROUND_D" + POSTFIX; 683 static { 684 beforeMatchingNameRegex(ROUND_D, "RoundD"); 685 } 686 687 public static final String COMPRESS_BITS = PREFIX + "COMPRESS_BITS" + POSTFIX; 688 static { 689 beforeMatchingNameRegex(COMPRESS_BITS, "CompressBits"); 690 } 691 692 public static final String CONV = PREFIX + "CONV" + POSTFIX; 693 static { 694 beforeMatchingNameRegex(CONV, "Conv"); 695 } 696 697 public static final String CONV_D2F = PREFIX + "CONV_D2F" + POSTFIX; 698 static { 699 beforeMatchingNameRegex(CONV_D2F, "ConvD2F"); 700 } 701 702 public static final String CONV_D2I = PREFIX + "CONV_D2I" + POSTFIX; 703 static { 704 beforeMatchingNameRegex(CONV_D2I, "ConvD2I"); 705 } 706 707 public static final String CONV_D2L = PREFIX + "CONV_D2L" + POSTFIX; 708 static { 709 beforeMatchingNameRegex(CONV_D2L, "ConvD2L"); 710 } 711 712 public static final String CONV_F2D = PREFIX + "CONV_F2D" + POSTFIX; 713 static { 714 beforeMatchingNameRegex(CONV_F2D, "ConvF2D"); 715 } 716 717 public static final String CONV_F2HF = PREFIX + "CONV_F2HF" + POSTFIX; 718 static { 719 beforeMatchingNameRegex(CONV_F2HF, "ConvF2HF"); 720 } 721 722 public static final String CONV_F2I = PREFIX + "CONV_F2I" + POSTFIX; 723 static { 724 beforeMatchingNameRegex(CONV_F2I, "ConvF2I"); 725 } 726 727 public static final String CONV_F2L = PREFIX + "CONV_F2L" + POSTFIX; 728 static { 729 beforeMatchingNameRegex(CONV_F2L, "ConvF2L"); 730 } 731 732 public static final String CONV_I2L = PREFIX + "CONV_I2L" + POSTFIX; 733 static { 734 beforeMatchingNameRegex(CONV_I2L, "ConvI2L"); 735 } 736 737 public static final String CONV_L2I = PREFIX + "CONV_L2I" + POSTFIX; 738 static { 739 beforeMatchingNameRegex(CONV_L2I, "ConvL2I"); 740 } 741 742 public static final String CONV_HF2F = PREFIX + "CONV_HF2F" + POSTFIX; 743 static { 744 beforeMatchingNameRegex(CONV_HF2F, "ConvHF2F"); 745 } 746 747 public static final String CON_I = PREFIX + "CON_I" + POSTFIX; 748 static { 749 beforeMatchingNameRegex(CON_I, "ConI"); 750 } 751 752 public static final String CON_L = PREFIX + "CON_L" + POSTFIX; 753 static { 754 beforeMatchingNameRegex(CON_L, "ConL"); 755 } 756 757 public static final String COUNTED_LOOP = PREFIX + "COUNTED_LOOP" + POSTFIX; 758 static { 759 String regex = START + "CountedLoop\\b" + MID + END; 760 fromAfterCountedLoops(COUNTED_LOOP, regex); 761 } 762 763 public static final String COUNTED_LOOP_MAIN = PREFIX + "COUNTED_LOOP_MAIN" + POSTFIX; 764 static { 765 String regex = START + "CountedLoop\\b" + MID + "main" + END; 766 fromAfterCountedLoops(COUNTED_LOOP_MAIN, regex); 767 } 768 769 public static final String DECODE_HEAP_OOP_NOT_NULL = PREFIX + "DECODE_HEAP_OOP_NOT_NULL" + POSTFIX; 770 static { 771 machOnly(DECODE_HEAP_OOP_NOT_NULL, "decodeHeapOop_not_null"); 772 } 773 774 public static final String DIV = PREFIX + "DIV" + POSTFIX; 775 static { 776 beforeMatchingNameRegex(DIV, "Div(I|L|F|D)"); 777 } 778 779 public static final String UDIV = PREFIX + "UDIV" + POSTFIX; 780 static { 781 beforeMatchingNameRegex(UDIV, "UDiv(I|L|F|D)"); 782 } 783 784 public static final String DIV_BY_ZERO_TRAP = PREFIX + "DIV_BY_ZERO_TRAP" + POSTFIX; 785 static { 786 trapNodes(DIV_BY_ZERO_TRAP, "div0_check"); 787 } 788 789 public static final String DIV_I = PREFIX + "DIV_I" + POSTFIX; 790 static { 791 beforeMatchingNameRegex(DIV_I, "DivI"); 792 } 793 794 public static final String DIV_L = PREFIX + "DIV_L" + POSTFIX; 795 static { 796 beforeMatchingNameRegex(DIV_L, "DivL"); 797 } 798 799 public static final String DIV_MOD_I = PREFIX + "DIV_MOD_I" + POSTFIX; 800 static { 801 beforeMatchingNameRegex(DIV_MOD_I, "DivModI"); 802 } 803 804 public static final String DIV_MOD_L = PREFIX + "DIV_MOD_L" + POSTFIX; 805 static { 806 beforeMatchingNameRegex(DIV_MOD_L, "DivModL"); 807 } 808 809 public static final String DIV_VB = VECTOR_PREFIX + "DIV_VB" + POSTFIX; 810 static { 811 vectorNode(DIV_VB, "DivVB", TYPE_BYTE); 812 } 813 814 public static final String DIV_VS = VECTOR_PREFIX + "DIV_VS" + POSTFIX; 815 static { 816 vectorNode(DIV_VS, "DivVS", TYPE_SHORT); 817 } 818 819 public static final String DIV_VI = VECTOR_PREFIX + "DIV_VI" + POSTFIX; 820 static { 821 vectorNode(DIV_VI, "DivVI", TYPE_INT); 822 } 823 824 public static final String DIV_VL = VECTOR_PREFIX + "DIV_VL" + POSTFIX; 825 static { 826 vectorNode(DIV_VL, "DivVL", TYPE_LONG); 827 } 828 829 public static final String DIV_VHF = VECTOR_PREFIX + "DIV_VHF" + POSTFIX; 830 static { 831 vectorNode(DIV_VHF, "DivVHF", TYPE_SHORT); 832 } 833 834 public static final String DIV_F = PREFIX + "DIV_F" + POSTFIX; 835 static { 836 beforeMatchingNameRegex(DIV_F, "DivF"); 837 } 838 839 public static final String DIV_VF = VECTOR_PREFIX + "DIV_VF" + POSTFIX; 840 static { 841 vectorNode(DIV_VF, "DivVF", TYPE_FLOAT); 842 } 843 844 public static final String DIV_D = PREFIX + "DIV_D" + POSTFIX; 845 static { 846 beforeMatchingNameRegex(DIV_D, "DivD"); 847 } 848 849 public static final String DIV_VD = VECTOR_PREFIX + "DIV_VD" + POSTFIX; 850 static { 851 vectorNode(DIV_VD, "DivVD", TYPE_DOUBLE); 852 } 853 854 public static final String DYNAMIC_CALL_OF_METHOD = COMPOSITE_PREFIX + "DYNAMIC_CALL_OF_METHOD" + POSTFIX; 855 static { 856 callOfNodes(DYNAMIC_CALL_OF_METHOD, "CallDynamicJava", IS_REPLACED); 857 } 858 859 public static final String EXPAND_BITS = PREFIX + "EXPAND_BITS" + POSTFIX; 860 static { 861 beforeMatchingNameRegex(EXPAND_BITS, "ExpandBits"); 862 } 863 864 public static final String FAST_LOCK = PREFIX + "FAST_LOCK" + POSTFIX; 865 static { 866 beforeMatchingNameRegex(FAST_LOCK, "FastLock"); 867 } 868 869 public static final String FAST_UNLOCK = PREFIX + "FAST_UNLOCK" + POSTFIX; 870 static { 871 String regex = START + "FastUnlock" + MID + END; 872 fromMacroToBeforeMatching(FAST_UNLOCK, regex); 873 } 874 875 public static final String FIELD_ACCESS = PREFIX + "FIELD_ACCESS" + POSTFIX; 876 static { 877 String regex = "(.*Field: *" + END; 878 optoOnly(FIELD_ACCESS, regex); 879 } 880 881 public static final String FMA_VHF = VECTOR_PREFIX + "FMA_VHF" + POSTFIX; 882 static { 883 vectorNode(FMA_VHF, "FmaVHF", TYPE_SHORT); 884 } 885 886 public static final String FMA_VF = VECTOR_PREFIX + "FMA_VF" + POSTFIX; 887 static { 888 vectorNode(FMA_VF, "FmaVF", TYPE_FLOAT); 889 } 890 891 public static final String FMA_VD = VECTOR_PREFIX + "FMA_VD" + POSTFIX; 892 static { 893 vectorNode(FMA_VD, "FmaVD", TYPE_DOUBLE); 894 } 895 896 public static final String FMA_HF = PREFIX + "FMA_HF" + POSTFIX; 897 static { 898 beforeMatchingNameRegex(FMA_HF, "FmaHF"); 899 } 900 901 public static final String G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG" + POSTFIX; 902 static { 903 String regex = START + "g1CompareAndExchangeN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 904 machOnly(G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG, regex); 905 } 906 907 public static final String G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG" + POSTFIX; 908 static { 909 String regex = START + "g1CompareAndExchangeP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 910 machOnly(G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG, regex); 911 } 912 913 public static final String G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG" + POSTFIX; 914 static { 915 String regex = START + "g1CompareAndSwapN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 916 machOnly(G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG, regex); 917 } 918 919 public static final String G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG" + POSTFIX; 920 static { 921 String regex = START + "g1CompareAndSwapP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 922 machOnly(G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, regex); 923 } 924 925 public static final String G1_ENCODE_P_AND_STORE_N = PREFIX + "G1_ENCODE_P_AND_STORE_N" + POSTFIX; 926 static { 927 machOnlyNameRegex(G1_ENCODE_P_AND_STORE_N, "g1EncodePAndStoreN"); 928 } 929 930 public static final String G1_ENCODE_P_AND_STORE_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_ENCODE_P_AND_STORE_N_WITH_BARRIER_FLAG" + POSTFIX; 931 static { 932 String regex = START + "g1EncodePAndStoreN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 933 machOnly(G1_ENCODE_P_AND_STORE_N_WITH_BARRIER_FLAG, regex); 934 } 935 936 public static final String G1_GET_AND_SET_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_GET_AND_SET_N_WITH_BARRIER_FLAG" + POSTFIX; 937 static { 938 String regex = START + "g1GetAndSetN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 939 machOnly(G1_GET_AND_SET_N_WITH_BARRIER_FLAG, regex); 940 } 941 942 public static final String G1_GET_AND_SET_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_GET_AND_SET_P_WITH_BARRIER_FLAG" + POSTFIX; 943 static { 944 String regex = START + "g1GetAndSetP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 945 machOnly(G1_GET_AND_SET_P_WITH_BARRIER_FLAG, regex); 946 } 947 948 public static final String G1_LOAD_N = PREFIX + "G1_LOAD_N" + POSTFIX; 949 static { 950 machOnlyNameRegex(G1_LOAD_N, "g1LoadN"); 951 } 952 953 public static final String G1_LOAD_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_LOAD_N_WITH_BARRIER_FLAG" + POSTFIX; 954 static { 955 String regex = START + "g1LoadN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 956 machOnly(G1_LOAD_N_WITH_BARRIER_FLAG, regex); 957 } 958 959 public static final String G1_LOAD_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_LOAD_P_WITH_BARRIER_FLAG" + POSTFIX; 960 static { 961 String regex = START + "g1LoadP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 962 machOnly(G1_LOAD_P_WITH_BARRIER_FLAG, regex); 963 } 964 965 public static final String G1_STORE_N = PREFIX + "G1_STORE_N" + POSTFIX; 966 static { 967 machOnlyNameRegex(G1_STORE_N, "g1StoreN"); 968 } 969 970 public static final String G1_STORE_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_STORE_N_WITH_BARRIER_FLAG" + POSTFIX; 971 static { 972 String regex = START + "g1StoreN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 973 machOnly(G1_STORE_N_WITH_BARRIER_FLAG, regex); 974 } 975 976 public static final String G1_STORE_P = PREFIX + "G1_STORE_P" + POSTFIX; 977 static { 978 machOnlyNameRegex(G1_STORE_P, "g1StoreP"); 979 } 980 981 public static final String G1_STORE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_STORE_P_WITH_BARRIER_FLAG" + POSTFIX; 982 static { 983 String regex = START + "g1StoreP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 984 machOnly(G1_STORE_P_WITH_BARRIER_FLAG, regex); 985 } 986 987 public static final String IF = PREFIX + "IF" + POSTFIX; 988 static { 989 beforeMatchingNameRegex(IF, "If\\b"); 990 } 991 992 public static final String INLINE_TYPE = PREFIX + "INLINE_TYPE" + POSTFIX; 993 static { 994 beforeMatchingNameRegex(INLINE_TYPE, "InlineType"); 995 } 996 997 public static final String INTRINSIC_TRAP = PREFIX + "INTRINSIC_TRAP" + POSTFIX; 998 static { 999 trapNodes(INTRINSIC_TRAP, "intrinsic"); 1000 } 1001 1002 // Is only supported on riscv64. 1003 public static final String IS_FINITE_D = PREFIX + "IS_FINITE_D" + POSTFIX; 1004 static { 1005 beforeMatchingNameRegex(IS_FINITE_D, "IsFiniteD"); 1006 } 1007 1008 // Is only supported on riscv64. 1009 public static final String IS_FINITE_F = PREFIX + "IS_FINITE_F" + POSTFIX; 1010 static { 1011 beforeMatchingNameRegex(IS_FINITE_F, "IsFiniteF"); 1012 } 1013 1014 public static final String IS_INFINITE_D = PREFIX + "IS_INFINITE_D" + POSTFIX; 1015 static { 1016 beforeMatchingNameRegex(IS_INFINITE_D, "IsInfiniteD"); 1017 } 1018 1019 public static final String IS_INFINITE_F = PREFIX + "IS_INFINITE_F" + POSTFIX; 1020 static { 1021 beforeMatchingNameRegex(IS_INFINITE_F, "IsInfiniteF"); 1022 } 1023 1024 // Only supported on x86. 1025 public static final String LEA_P = PREFIX + "LEA_P" + POSTFIX; 1026 static { 1027 machOnly(LEA_P, "leaP(CompressedOopOffset|(8|32)Narrow)"); 1028 } 1029 1030 public static final String LOAD = PREFIX + "LOAD" + POSTFIX; 1031 static { 1032 beforeMatchingNameRegex(LOAD, "Load(B|UB|S|US|I|L|F|D|P|N)"); 1033 } 1034 1035 public static final String LOAD_OF_CLASS = COMPOSITE_PREFIX + "LOAD_OF_CLASS" + POSTFIX; 1036 static { 1037 anyLoadOfNodes(LOAD_OF_CLASS, IS_REPLACED); 1038 } 1039 1040 public static void anyLoadOfNodes(String irNodePlaceholder, String fieldHolder) { 1041 loadOfNodes(irNodePlaceholder, "Load(B|UB|S|US|I|L|F|D|P|N)", fieldHolder); 1042 } 1043 1044 public static final String LOAD_B = PREFIX + "LOAD_B" + POSTFIX; 1045 static { 1046 beforeMatchingNameRegex(LOAD_B, "LoadB"); 1047 } 1048 1049 public static final String LOAD_B_OF_CLASS = COMPOSITE_PREFIX + "LOAD_B_OF_CLASS" + POSTFIX; 1050 static { 1051 loadOfNodes(LOAD_B_OF_CLASS, "LoadB", IS_REPLACED); 1052 } 1053 1054 public static final String LOAD_D = PREFIX + "LOAD_D" + POSTFIX; 1055 static { 1056 beforeMatchingNameRegex(LOAD_D, "LoadD"); 1057 } 1058 1059 public static final String LOAD_D_OF_CLASS = COMPOSITE_PREFIX + "LOAD_D_OF_CLASS" + POSTFIX; 1060 static { 1061 loadOfNodes(LOAD_D_OF_CLASS, "LoadD", IS_REPLACED); 1062 } 1063 1064 public static final String LOAD_F = PREFIX + "LOAD_F" + POSTFIX; 1065 static { 1066 beforeMatchingNameRegex(LOAD_F, "LoadF"); 1067 } 1068 1069 public static final String LOAD_F_OF_CLASS = COMPOSITE_PREFIX + "LOAD_F_OF_CLASS" + POSTFIX; 1070 static { 1071 loadOfNodes(LOAD_F_OF_CLASS, "LoadF", IS_REPLACED); 1072 } 1073 1074 public static final String LOAD_I = PREFIX + "LOAD_I" + POSTFIX; 1075 static { 1076 beforeMatchingNameRegex(LOAD_I, "LoadI"); 1077 } 1078 1079 public static final String LOAD_I_OF_CLASS = COMPOSITE_PREFIX + "LOAD_I_OF_CLASS" + POSTFIX; 1080 static { 1081 loadOfNodes(LOAD_I_OF_CLASS, "LoadI", IS_REPLACED); 1082 } 1083 1084 public static final String LOAD_KLASS = PREFIX + "LOAD_KLASS" + POSTFIX; 1085 static { 1086 beforeMatchingNameRegex(LOAD_KLASS, "LoadKlass"); 1087 } 1088 1089 public static final String LOAD_NKLASS = PREFIX + "LOAD_NKLASS" + POSTFIX; 1090 static { 1091 beforeMatchingNameRegex(LOAD_NKLASS, "LoadNKlass"); 1092 } 1093 1094 public static final String LOAD_KLASS_OR_NKLASS = PREFIX + "LOAD_KLASS_OR_NKLASS" + POSTFIX; 1095 static { 1096 beforeMatchingNameRegex(LOAD_KLASS_OR_NKLASS, "LoadN?Klass"); 1097 } 1098 1099 public static final String LOAD_L = PREFIX + "LOAD_L" + POSTFIX; 1100 static { 1101 beforeMatchingNameRegex(LOAD_L, "LoadL"); 1102 } 1103 1104 public static final String LOAD_L_OF_CLASS = COMPOSITE_PREFIX + "LOAD_L_OF_CLASS" + POSTFIX; 1105 static { 1106 loadOfNodes(LOAD_L_OF_CLASS, "LoadL", IS_REPLACED); 1107 } 1108 1109 public static final String LOAD_N = PREFIX + "LOAD_N" + POSTFIX; 1110 static { 1111 beforeMatchingNameRegex(LOAD_N, "LoadN"); 1112 } 1113 1114 public static final String LOAD_N_OF_CLASS = COMPOSITE_PREFIX + "LOAD_N_OF_CLASS" + POSTFIX; 1115 static { 1116 loadOfNodes(LOAD_N_OF_CLASS, "LoadN", IS_REPLACED); 1117 } 1118 1119 public static final String LOAD_OF_FIELD = COMPOSITE_PREFIX + "LOAD_OF_FIELD" + POSTFIX; 1120 static { 1121 String regex = START + "Load(B|C|S|I|L|F|D|P|N)" + MID + "@.*name=" + IS_REPLACED + ",.*" + END; 1122 beforeMatching(LOAD_OF_FIELD, regex); 1123 } 1124 1125 public static final String LOAD_P = PREFIX + "LOAD_P" + POSTFIX; 1126 static { 1127 beforeMatchingNameRegex(LOAD_P, "LoadP"); 1128 } 1129 1130 public static final String LOAD_P_OF_CLASS = COMPOSITE_PREFIX + "LOAD_P_OF_CLASS" + POSTFIX; 1131 static { 1132 loadOfNodes(LOAD_P_OF_CLASS, "LoadP", IS_REPLACED); 1133 } 1134 1135 public static final String LOAD_S = PREFIX + "LOAD_S" + POSTFIX; 1136 static { 1137 beforeMatchingNameRegex(LOAD_S, "LoadS"); 1138 } 1139 1140 public static final String LOAD_S_OF_CLASS = COMPOSITE_PREFIX + "LOAD_S_OF_CLASS" + POSTFIX; 1141 static { 1142 loadOfNodes(LOAD_S_OF_CLASS, "LoadS", IS_REPLACED); 1143 } 1144 1145 public static final String LOAD_UB = PREFIX + "LOAD_UB" + POSTFIX; 1146 static { 1147 beforeMatchingNameRegex(LOAD_UB, "LoadUB"); 1148 } 1149 1150 public static final String LOAD_UB_OF_CLASS = COMPOSITE_PREFIX + "LOAD_UB_OF_CLASS" + POSTFIX; 1151 static { 1152 loadOfNodes(LOAD_UB_OF_CLASS, "LoadUB", IS_REPLACED); 1153 } 1154 1155 public static final String LOAD_US = PREFIX + "LOAD_US" + POSTFIX; 1156 static { 1157 beforeMatchingNameRegex(LOAD_US, "LoadUS"); 1158 } 1159 1160 public static final String LOAD_US_OF_CLASS = COMPOSITE_PREFIX + "LOAD_US_OF_CLASS" + POSTFIX; 1161 static { 1162 loadOfNodes(LOAD_US_OF_CLASS, "LoadUS", IS_REPLACED); 1163 } 1164 1165 public static final String LOAD_VECTOR_B = VECTOR_PREFIX + "LOAD_VECTOR_B" + POSTFIX; 1166 static { 1167 vectorNode(LOAD_VECTOR_B, "LoadVector", TYPE_BYTE); 1168 } 1169 1170 public static final String LOAD_VECTOR_C = VECTOR_PREFIX + "LOAD_VECTOR_C" + POSTFIX; 1171 static { 1172 vectorNode(LOAD_VECTOR_C, "LoadVector", TYPE_CHAR); 1173 } 1174 1175 public static final String LOAD_VECTOR_S = VECTOR_PREFIX + "LOAD_VECTOR_S" + POSTFIX; 1176 static { 1177 vectorNode(LOAD_VECTOR_S, "LoadVector", TYPE_SHORT); 1178 } 1179 1180 public static final String LOAD_VECTOR_I = VECTOR_PREFIX + "LOAD_VECTOR_I" + POSTFIX; 1181 static { 1182 vectorNode(LOAD_VECTOR_I, "LoadVector", TYPE_INT); 1183 } 1184 1185 public static final String LOAD_VECTOR_L = VECTOR_PREFIX + "LOAD_VECTOR_L" + POSTFIX; 1186 static { 1187 vectorNode(LOAD_VECTOR_L, "LoadVector", TYPE_LONG); 1188 } 1189 1190 public static final String LOAD_VECTOR_F = VECTOR_PREFIX + "LOAD_VECTOR_F" + POSTFIX; 1191 static { 1192 vectorNode(LOAD_VECTOR_F, "LoadVector", TYPE_FLOAT); 1193 } 1194 1195 public static final String LOAD_VECTOR_D = VECTOR_PREFIX + "LOAD_VECTOR_D" + POSTFIX; 1196 static { 1197 vectorNode(LOAD_VECTOR_D, "LoadVector", TYPE_DOUBLE); 1198 } 1199 1200 public static final String LOAD_VECTOR_Z = VECTOR_PREFIX + "LOAD_VECTOR_Z" + POSTFIX; 1201 static { 1202 vectorNode(LOAD_VECTOR_Z, "LoadVector", TYPE_BOOLEAN); 1203 } 1204 1205 public static final String LOAD_VECTOR_GATHER = PREFIX + "LOAD_VECTOR_GATHER" + POSTFIX; 1206 static { 1207 beforeMatchingNameRegex(LOAD_VECTOR_GATHER, "LoadVectorGather"); 1208 } 1209 1210 public static final String LOAD_VECTOR_MASKED = PREFIX + "LOAD_VECTOR_MASKED" + POSTFIX; 1211 static { 1212 beforeMatchingNameRegex(LOAD_VECTOR_MASKED, "LoadVectorMasked"); 1213 } 1214 1215 public static final String LOAD_VECTOR_GATHER_MASKED = PREFIX + "LOAD_VECTOR_GATHER_MASKED" + POSTFIX; 1216 static { 1217 beforeMatchingNameRegex(LOAD_VECTOR_GATHER_MASKED, "LoadVectorGatherMasked"); 1218 } 1219 1220 public static final String LONG_COUNTED_LOOP = PREFIX + "LONG_COUNTED_LOOP" + POSTFIX; 1221 static { 1222 String regex = START + "LongCountedLoop\\b" + MID + END; 1223 fromAfterCountedLoops(LONG_COUNTED_LOOP, regex); 1224 } 1225 1226 public static final String LOOP = PREFIX + "LOOP" + POSTFIX; 1227 static { 1228 String regex = START + "Loop" + MID + END; 1229 fromBeforeCountedLoops(LOOP, regex); 1230 } 1231 1232 public static final String LSHIFT = PREFIX + "LSHIFT" + POSTFIX; 1233 static { 1234 beforeMatchingNameRegex(LSHIFT, "LShift(I|L)"); 1235 } 1236 1237 public static final String LSHIFT_I = PREFIX + "LSHIFT_I" + POSTFIX; 1238 static { 1239 beforeMatchingNameRegex(LSHIFT_I, "LShiftI"); 1240 } 1241 1242 public static final String LSHIFT_L = PREFIX + "LSHIFT_L" + POSTFIX; 1243 static { 1244 beforeMatchingNameRegex(LSHIFT_L, "LShiftL"); 1245 } 1246 1247 public static final String LSHIFT_VB = VECTOR_PREFIX + "LSHIFT_VB" + POSTFIX; 1248 static { 1249 vectorNode(LSHIFT_VB, "LShiftVB", TYPE_BYTE); 1250 } 1251 1252 public static final String LSHIFT_VS = VECTOR_PREFIX + "LSHIFT_VS" + POSTFIX; 1253 static { 1254 vectorNode(LSHIFT_VS, "LShiftVS", TYPE_SHORT); 1255 } 1256 1257 public static final String LSHIFT_VC = VECTOR_PREFIX + "LSHIFT_VC" + POSTFIX; 1258 static { 1259 vectorNode(LSHIFT_VC, "LShiftVS", TYPE_CHAR); // using short op with char type 1260 } 1261 1262 public static final String LSHIFT_VI = VECTOR_PREFIX + "LSHIFT_VI" + POSTFIX; 1263 static { 1264 vectorNode(LSHIFT_VI, "LShiftVI", TYPE_INT); 1265 } 1266 1267 public static final String LSHIFT_VL = VECTOR_PREFIX + "LSHIFT_VL" + POSTFIX; 1268 static { 1269 vectorNode(LSHIFT_VL, "LShiftVL", TYPE_LONG); 1270 } 1271 1272 public static final String MACH_TEMP = PREFIX + "MACH_TEMP" + POSTFIX; 1273 static { 1274 machOnlyNameRegex(MACH_TEMP, "MachTemp"); 1275 } 1276 1277 public static final String MACRO_LOGIC_V = PREFIX + "MACRO_LOGIC_V" + POSTFIX; 1278 static { 1279 afterBarrierExpansionToBeforeMatching(MACRO_LOGIC_V, "MacroLogicV"); 1280 } 1281 1282 public static final String MAX = PREFIX + "MAX" + POSTFIX; 1283 static { 1284 beforeMatchingNameRegex(MAX, "Max(I|L|F|D)"); 1285 } 1286 1287 public static final String MAX_D = PREFIX + "MAX_D" + POSTFIX; 1288 static { 1289 beforeMatchingNameRegex(MAX_D, "MaxD"); 1290 } 1291 1292 public static final String MAX_F = PREFIX + "MAX_F" + POSTFIX; 1293 static { 1294 beforeMatchingNameRegex(MAX_F, "MaxF"); 1295 } 1296 1297 public static final String MAX_I = PREFIX + "MAX_I" + POSTFIX; 1298 static { 1299 beforeMatchingNameRegex(MAX_I, "MaxI"); 1300 } 1301 1302 public static final String MAX_L = PREFIX + "MAX_L" + POSTFIX; 1303 static { 1304 beforeMatchingNameRegex(MAX_L, "MaxL"); 1305 } 1306 1307 public static final String MAX_VI = VECTOR_PREFIX + "MAX_VI" + POSTFIX; 1308 static { 1309 vectorNode(MAX_VI, "MaxV", TYPE_INT); 1310 } 1311 1312 public static final String MAX_VB = VECTOR_PREFIX + "MAX_VB" + POSTFIX; 1313 static { 1314 vectorNode(MAX_VB, "MaxV", TYPE_BYTE); 1315 } 1316 1317 public static final String MAX_VS = VECTOR_PREFIX + "MAX_VS" + POSTFIX; 1318 static { 1319 vectorNode(MAX_VS, "MaxV", TYPE_SHORT); 1320 } 1321 1322 public static final String MAX_VHF = VECTOR_PREFIX + "MAX_VHF" + POSTFIX; 1323 static { 1324 vectorNode(MAX_VHF, "MaxVHF", TYPE_SHORT); 1325 } 1326 1327 public static final String MAX_VF = VECTOR_PREFIX + "MAX_VF" + POSTFIX; 1328 static { 1329 vectorNode(MAX_VF, "MaxV", TYPE_FLOAT); 1330 } 1331 1332 public static final String MAX_VD = VECTOR_PREFIX + "MAX_VD" + POSTFIX; 1333 static { 1334 vectorNode(MAX_VD, "MaxV", TYPE_DOUBLE); 1335 } 1336 1337 public static final String MAX_VL = VECTOR_PREFIX + "MAX_VL" + POSTFIX; 1338 static { 1339 vectorNode(MAX_VL, "MaxV", TYPE_LONG); 1340 } 1341 1342 public static final String MEMBAR = PREFIX + "MEMBAR" + POSTFIX; 1343 static { 1344 beforeMatchingNameRegex(MEMBAR, "MemBar"); 1345 } 1346 1347 public static final String MEMBAR_ACQUIRE = PREFIX + "MEMBAR_ACQUIRE" + POSTFIX; 1348 static { 1349 beforeMatchingNameRegex(MEMBAR_ACQUIRE, "MemBarAcquire"); 1350 } 1351 1352 public static final String MEMBAR_RELEASE = PREFIX + "MEMBAR_RELEASE" + POSTFIX; 1353 static { 1354 beforeMatchingNameRegex(MEMBAR_RELEASE, "MemBarRelease"); 1355 } 1356 1357 public static final String MEMBAR_STORESTORE = PREFIX + "MEMBAR_STORESTORE" + POSTFIX; 1358 static { 1359 beforeMatchingNameRegex(MEMBAR_STORESTORE, "MemBarStoreStore"); 1360 } 1361 1362 public static final String MEMBAR_VOLATILE = PREFIX + "MEMBAR_VOLATILE" + POSTFIX; 1363 static { 1364 beforeMatchingNameRegex(MEMBAR_VOLATILE, "MemBarVolatile"); 1365 } 1366 1367 public static final String MEM_TO_REG_SPILL_COPY = PREFIX + "MEM_TO_REG_SPILL_COPY" + POSTFIX; 1368 static { 1369 machOnly(MEM_TO_REG_SPILL_COPY, "MemToRegSpillCopy"); 1370 } 1371 1372 public static final String MEM_TO_REG_SPILL_COPY_TYPE = COMPOSITE_PREFIX + "MEM_TO_REG_SPILL_COPY_TYPE" + POSTFIX; 1373 static { 1374 String regex = START + "MemToRegSpillCopy" + MID + IS_REPLACED + ".*" + END; 1375 machOnly(MEM_TO_REG_SPILL_COPY_TYPE, regex); 1376 } 1377 1378 public static final String MIN = PREFIX + "MIN" + POSTFIX; 1379 static { 1380 beforeMatchingNameRegex(MIN, "Min(I|L)"); 1381 } 1382 1383 public static final String MIN_D = PREFIX + "MIN_D" + POSTFIX; 1384 static { 1385 beforeMatchingNameRegex(MIN_D, "MinD"); 1386 } 1387 1388 public static final String MINMAX_D_REDUCTION_REG = PREFIX + "MINMAX_D_REDUCTION_REG" + POSTFIX; 1389 static { 1390 machOnlyNameRegex(MINMAX_D_REDUCTION_REG, "minmaxD_reduction_reg"); 1391 } 1392 1393 public static final String MINMAX_D_REG = PREFIX + "MINMAX_D_REG" + POSTFIX; 1394 static { 1395 machOnlyNameRegex(MINMAX_D_REG, "minmaxD_reg"); 1396 } 1397 1398 public static final String MIN_F = PREFIX + "MIN_F" + POSTFIX; 1399 static { 1400 beforeMatchingNameRegex(MIN_F, "MinF"); 1401 } 1402 1403 public static final String MINMAX_F_REDUCTION_REG = PREFIX + "MINMAX_F_REDUCTION_REG" + POSTFIX; 1404 static { 1405 machOnlyNameRegex(MINMAX_F_REDUCTION_REG, "minmaxF_reduction_reg"); 1406 } 1407 1408 public static final String MINMAX_F_REG = PREFIX + "MINMAX_F_REG" + POSTFIX; 1409 static { 1410 machOnlyNameRegex(MINMAX_F_REG, "minmaxF_reg"); 1411 } 1412 1413 public static final String MIN_I = PREFIX + "MIN_I" + POSTFIX; 1414 static { 1415 beforeMatchingNameRegex(MIN_I, "MinI"); 1416 } 1417 1418 public static final String MIN_L = PREFIX + "MIN_L" + POSTFIX; 1419 static { 1420 beforeMatchingNameRegex(MIN_L, "MinL"); 1421 } 1422 1423 public static final String MIN_HF = PREFIX + "MIN_HF" + POSTFIX; 1424 static { 1425 beforeMatchingNameRegex(MIN_HF, "MinHF"); 1426 } 1427 1428 public static final String MAX_HF = PREFIX + "MAX_HF" + POSTFIX; 1429 static { 1430 beforeMatchingNameRegex(MAX_HF, "MaxHF"); 1431 } 1432 1433 public static final String MIN_VI = VECTOR_PREFIX + "MIN_VI" + POSTFIX; 1434 static { 1435 vectorNode(MIN_VI, "MinV", TYPE_INT); 1436 } 1437 1438 public static final String MIN_VB = VECTOR_PREFIX + "MIN_VB" + POSTFIX; 1439 static { 1440 vectorNode(MIN_VB, "MinV", TYPE_BYTE); 1441 } 1442 1443 public static final String MIN_VS = VECTOR_PREFIX + "MIN_VS" + POSTFIX; 1444 static { 1445 vectorNode(MIN_VS, "MinV", TYPE_SHORT); 1446 } 1447 1448 public static final String MIN_VHF = VECTOR_PREFIX + "MIN_VHF" + POSTFIX; 1449 static { 1450 vectorNode(MIN_VHF, "MinVHF", TYPE_SHORT); 1451 } 1452 1453 public static final String MIN_VF = VECTOR_PREFIX + "MIN_VF" + POSTFIX; 1454 static { 1455 vectorNode(MIN_VF, "MinV", TYPE_FLOAT); 1456 } 1457 1458 public static final String MIN_VD = VECTOR_PREFIX + "MIN_VD" + POSTFIX; 1459 static { 1460 vectorNode(MIN_VD, "MinV", TYPE_DOUBLE); 1461 } 1462 1463 public static final String MIN_VL = VECTOR_PREFIX + "MIN_VL" + POSTFIX; 1464 static { 1465 vectorNode(MIN_VL, "MinV", TYPE_LONG); 1466 } 1467 1468 public static final String MOD_I = PREFIX + "MOD_I" + POSTFIX; 1469 static { 1470 beforeMatchingNameRegex(MOD_I, "ModI"); 1471 } 1472 1473 public static final String MOD_L = PREFIX + "MOD_L" + POSTFIX; 1474 static { 1475 beforeMatchingNameRegex(MOD_L, "ModL"); 1476 } 1477 1478 public static final String MOV_F2I = PREFIX + "MOV_F2I" + POSTFIX; 1479 static { 1480 beforeMatchingNameRegex(MOV_F2I, "MoveF2I"); 1481 } 1482 1483 public static final String MOV_I2F = PREFIX + "MOV_I2F" + POSTFIX; 1484 static { 1485 beforeMatchingNameRegex(MOV_I2F, "MoveI2F"); 1486 } 1487 1488 public static final String MOV_D2L = PREFIX + "MOV_D2L" + POSTFIX; 1489 static { 1490 beforeMatchingNameRegex(MOV_D2L, "MoveD2L"); 1491 } 1492 1493 public static final String MOV_L2D = PREFIX + "MOD_L2D" + POSTFIX; 1494 static { 1495 beforeMatchingNameRegex(MOV_L2D, "MoveL2D"); 1496 } 1497 1498 public static final String MUL = PREFIX + "MUL" + POSTFIX; 1499 static { 1500 beforeMatchingNameRegex(MUL, "Mul(I|L|F|D)"); 1501 } 1502 1503 public static final String MUL_ADD_S2I = PREFIX + "MUL_ADD_S2I" + POSTFIX; 1504 static { 1505 beforeMatchingNameRegex(MUL_ADD_S2I, "MulAddS2I"); 1506 } 1507 1508 public static final String MUL_ADD_VS2VI = VECTOR_PREFIX + "MUL_ADD_VS2VI" + POSTFIX; 1509 static { 1510 vectorNode(MUL_ADD_VS2VI, "MulAddVS2VI", TYPE_INT); 1511 } 1512 1513 public static final String UMIN_VB = VECTOR_PREFIX + "UMIN_VB" + POSTFIX; 1514 static { 1515 vectorNode(UMIN_VB, "UMinV", TYPE_BYTE); 1516 } 1517 1518 public static final String UMIN_VS = VECTOR_PREFIX + "UMIN_VS" + POSTFIX; 1519 static { 1520 vectorNode(UMIN_VS, "UMinV", TYPE_SHORT); 1521 } 1522 1523 public static final String UMIN_VI = VECTOR_PREFIX + "UMIN_VI" + POSTFIX; 1524 static { 1525 vectorNode(UMIN_VI, "UMinV", TYPE_INT); 1526 } 1527 1528 public static final String UMIN_VL = VECTOR_PREFIX + "UMIN_VL" + POSTFIX; 1529 static { 1530 vectorNode(UMIN_VL, "UMinV", TYPE_LONG); 1531 } 1532 1533 public static final String UMAX_VB = VECTOR_PREFIX + "UMAX_VB" + POSTFIX; 1534 static { 1535 vectorNode(UMAX_VB, "UMaxV", TYPE_BYTE); 1536 } 1537 1538 public static final String UMAX_VS = VECTOR_PREFIX + "UMAX_VS" + POSTFIX; 1539 static { 1540 vectorNode(UMAX_VS, "UMaxV", TYPE_SHORT); 1541 } 1542 1543 public static final String UMAX_VI = VECTOR_PREFIX + "UMAX_VI" + POSTFIX; 1544 static { 1545 vectorNode(UMAX_VI, "UMaxV", TYPE_INT); 1546 } 1547 1548 public static final String UMAX_VL = VECTOR_PREFIX + "UMAX_VL" + POSTFIX; 1549 static { 1550 vectorNode(UMAX_VL, "UMaxV", TYPE_LONG); 1551 } 1552 1553 public static final String MASK_ALL = PREFIX + "MASK_ALL" + POSTFIX; 1554 static { 1555 beforeMatchingNameRegex(MASK_ALL, "MaskAll"); 1556 } 1557 1558 public static final String AARCH64_VMASK_ALL_IMM_I = PREFIX + "AARCH64_VMASK_ALL_IMM_I" + POSTFIX; 1559 static { 1560 machOnlyNameRegex(AARCH64_VMASK_ALL_IMM_I, "vmaskAll_immI"); 1561 } 1562 1563 public static final String AARCH64_VMASK_ALL_IMM_L = PREFIX + "AARCH64_VMASK_ALL_IMM_L" + POSTFIX; 1564 static { 1565 machOnlyNameRegex(AARCH64_VMASK_ALL_IMM_L, "vmaskAll_immL"); 1566 } 1567 1568 public static final String VECTOR_LONG_TO_MASK = PREFIX + "VECTOR_LONG_TO_MASK" + POSTFIX; 1569 static { 1570 beforeMatchingNameRegex(VECTOR_LONG_TO_MASK, "VectorLongToMask"); 1571 } 1572 1573 public static final String VECTOR_MASK_TO_LONG = PREFIX + "VECTOR_MASK_TO_LONG" + POSTFIX; 1574 static { 1575 beforeMatchingNameRegex(VECTOR_MASK_TO_LONG, "VectorMaskToLong"); 1576 } 1577 1578 public static final String VECTOR_MASK_LANE_IS_SET = PREFIX + "VECTOR_MASK_LANE_IS_SET" + POSTFIX; 1579 static { 1580 beforeMatchingNameRegex(VECTOR_MASK_LANE_IS_SET, "ExtractUB"); 1581 } 1582 1583 public static final String VECTOR_MASK_GEN = PREFIX + "VECTOR_MASK_GEN" + POSTFIX; 1584 static { 1585 beforeMatchingNameRegex(VECTOR_MASK_GEN, "VectorMaskGen"); 1586 } 1587 1588 public static final String VECTOR_MASK_FIRST_TRUE = PREFIX + "VECTOR_MASK_FIRST_TRUE" + POSTFIX; 1589 static { 1590 beforeMatchingNameRegex(VECTOR_MASK_FIRST_TRUE, "VectorMaskFirstTrue"); 1591 } 1592 1593 // Can only be used if libjsvml or libsleef is available 1594 public static final String CALL_LEAF_VECTOR = PREFIX + "CALL_LEAF_VECTOR" + POSTFIX; 1595 static { 1596 beforeMatchingNameRegex(CALL_LEAF_VECTOR, "CallLeafVector"); 1597 } 1598 1599 // Can only be used if avx512_vnni is available. 1600 public static final String MUL_ADD_VS2VI_VNNI = PREFIX + "MUL_ADD_VS2VI_VNNI" + POSTFIX; 1601 static { 1602 machOnly(MUL_ADD_VS2VI_VNNI, "vmuladdaddS2I_reg"); 1603 } 1604 1605 public static final String MUL_D = PREFIX + "MUL_D" + POSTFIX; 1606 static { 1607 beforeMatchingNameRegex(MUL_D, "MulD"); 1608 } 1609 1610 public static final String MUL_F = PREFIX + "MUL_F" + POSTFIX; 1611 static { 1612 beforeMatchingNameRegex(MUL_F, "MulF"); 1613 } 1614 1615 public static final String MUL_HF = PREFIX + "MUL_HF" + POSTFIX; 1616 static { 1617 beforeMatchingNameRegex(MUL_HF, "MulHF"); 1618 } 1619 1620 public static final String MUL_I = PREFIX + "MUL_I" + POSTFIX; 1621 static { 1622 beforeMatchingNameRegex(MUL_I, "MulI"); 1623 } 1624 1625 public static final String MUL_L = PREFIX + "MUL_L" + POSTFIX; 1626 static { 1627 beforeMatchingNameRegex(MUL_L, "MulL"); 1628 } 1629 1630 public static final String MUL_VL = VECTOR_PREFIX + "MUL_VL" + POSTFIX; 1631 static { 1632 vectorNode(MUL_VL, "MulVL", TYPE_LONG); 1633 } 1634 1635 public static final String MUL_VI = VECTOR_PREFIX + "MUL_VI" + POSTFIX; 1636 static { 1637 vectorNode(MUL_VI, "MulVI", TYPE_INT); 1638 } 1639 1640 public static final String MUL_VHF = VECTOR_PREFIX + "MUL_VHF" + POSTFIX; 1641 static { 1642 vectorNode(MUL_VHF, "MulVHF", TYPE_SHORT); 1643 } 1644 1645 public static final String MUL_VF = VECTOR_PREFIX + "MUL_VF" + POSTFIX; 1646 static { 1647 vectorNode(MUL_VF, "MulVF", TYPE_FLOAT); 1648 } 1649 1650 public static final String MUL_VD = VECTOR_PREFIX + "MUL_VD" + POSTFIX; 1651 static { 1652 vectorNode(MUL_VD, "MulVD", TYPE_DOUBLE); 1653 } 1654 1655 public static final String MUL_VB = VECTOR_PREFIX + "MUL_VB" + POSTFIX; 1656 static { 1657 vectorNode(MUL_VB, "MulVB", TYPE_BYTE); 1658 } 1659 1660 public static final String MUL_VS = VECTOR_PREFIX + "MUL_VS" + POSTFIX; 1661 static { 1662 vectorNode(MUL_VS, "MulVS", TYPE_SHORT); 1663 } 1664 1665 public static final String MUL_REDUCTION_VD = PREFIX + "MUL_REDUCTION_VD" + POSTFIX; 1666 static { 1667 superWordNodes(MUL_REDUCTION_VD, "MulReductionVD"); 1668 } 1669 1670 public static final String MUL_REDUCTION_VF = PREFIX + "MUL_REDUCTION_VF" + POSTFIX; 1671 static { 1672 superWordNodes(MUL_REDUCTION_VF, "MulReductionVF"); 1673 } 1674 1675 public static final String MUL_REDUCTION_VHF = PREFIX + "MUL_REDUCTION_VHF" + POSTFIX; 1676 static { 1677 superWordNodes(MUL_REDUCTION_VHF, "MulReductionVHF"); 1678 } 1679 1680 public static final String MUL_REDUCTION_VI = PREFIX + "MUL_REDUCTION_VI" + POSTFIX; 1681 static { 1682 superWordNodes(MUL_REDUCTION_VI, "MulReductionVI"); 1683 } 1684 1685 public static final String MUL_REDUCTION_VL = PREFIX + "MUL_REDUCTION_VL" + POSTFIX; 1686 static { 1687 superWordNodes(MUL_REDUCTION_VL, "MulReductionVL"); 1688 } 1689 1690 public static final String MIN_REDUCTION_V = PREFIX + "MIN_REDUCTION_V" + POSTFIX; 1691 static { 1692 superWordNodes(MIN_REDUCTION_V, "MinReductionV"); 1693 } 1694 1695 public static final String MAX_REDUCTION_V = PREFIX + "MAX_REDUCTION_V" + POSTFIX; 1696 static { 1697 superWordNodes(MAX_REDUCTION_V, "MaxReductionV"); 1698 } 1699 1700 public static final String UMIN_REDUCTION_V = PREFIX + "UMIN_REDUCTION_V" + POSTFIX; 1701 static { 1702 superWordNodes(UMIN_REDUCTION_V, "UMinReductionV"); 1703 } 1704 1705 public static final String UMAX_REDUCTION_V = PREFIX + "UMAX_REDUCTION_V" + POSTFIX; 1706 static { 1707 superWordNodes(UMAX_REDUCTION_V, "UMaxReductionV"); 1708 } 1709 1710 public static final String NEG_VF = VECTOR_PREFIX + "NEG_VF" + POSTFIX; 1711 static { 1712 vectorNode(NEG_VF, "NegVF", TYPE_FLOAT); 1713 } 1714 1715 public static final String NEG_VD = VECTOR_PREFIX + "NEG_VD" + POSTFIX; 1716 static { 1717 vectorNode(NEG_VD, "NegVD", TYPE_DOUBLE); 1718 } 1719 1720 public static final String NOP = PREFIX + "NOP" + POSTFIX; 1721 static { 1722 machOnlyNameRegex(NOP, "Nop"); 1723 } 1724 1725 public static final String NULL_ASSERT_TRAP = PREFIX + "NULL_ASSERT_TRAP" + POSTFIX; 1726 static { 1727 trapNodes(NULL_ASSERT_TRAP, "null_assert"); 1728 } 1729 1730 public static final String NULL_CHECK = PREFIX + "NULL_CHECK" + POSTFIX; 1731 static { 1732 machOnlyNameRegex(NULL_CHECK, "NullCheck"); 1733 } 1734 1735 public static final String NULL_CHECK_TRAP = PREFIX + "NULL_CHECK_TRAP" + POSTFIX; 1736 static { 1737 trapNodes(NULL_CHECK_TRAP, "null_check"); 1738 } 1739 1740 public static final String OOPMAP_WITH = COMPOSITE_PREFIX + "OOPMAP_WITH" + POSTFIX; 1741 static { 1742 String regex = "(#\\s*OopMap\\s*\\{.*" + IS_REPLACED + ".*\\})"; 1743 optoOnly(OOPMAP_WITH, regex); 1744 } 1745 1746 public static final String OPAQUE_TEMPLATE_ASSERTION_PREDICATE = PREFIX + "OPAQUE_TEMPLATE_ASSERTION_PREDICATE" + POSTFIX; 1747 static { 1748 duringLoopOpts(OPAQUE_TEMPLATE_ASSERTION_PREDICATE, "OpaqueTemplateAssertionPredicate"); 1749 } 1750 1751 public static final String OR_I = PREFIX + "OR_I" + POSTFIX; 1752 static { 1753 beforeMatchingNameRegex(OR_I, "OrI"); 1754 } 1755 1756 public static final String OR_L = PREFIX + "OR_L" + POSTFIX; 1757 static { 1758 beforeMatchingNameRegex(OR_L, "OrL"); 1759 } 1760 1761 public static final String OR_VB = VECTOR_PREFIX + "OR_VB" + POSTFIX; 1762 static { 1763 vectorNode(OR_VB, "OrV", TYPE_BYTE); 1764 } 1765 1766 public static final String OR_VS = VECTOR_PREFIX + "OR_VS" + POSTFIX; 1767 static { 1768 vectorNode(OR_VS, "OrV", TYPE_SHORT); 1769 } 1770 1771 public static final String OR_VI = VECTOR_PREFIX + "OR_VI" + POSTFIX; 1772 static { 1773 vectorNode(OR_VI, "OrV", TYPE_INT); 1774 } 1775 1776 public static final String OR_VL = VECTOR_PREFIX + "OR_VL" + POSTFIX; 1777 static { 1778 vectorNode(OR_VL, "OrV", TYPE_LONG); 1779 } 1780 1781 public static final String OR_V_MASK = PREFIX + "OR_V_MASK" + POSTFIX; 1782 static { 1783 beforeMatchingNameRegex(OR_V_MASK, "OrVMask"); 1784 } 1785 1786 public static final String OR_REDUCTION_V = PREFIX + "OR_REDUCTION_V" + POSTFIX; 1787 static { 1788 superWordNodes(OR_REDUCTION_V, "OrReductionV"); 1789 } 1790 1791 public static final String OUTER_STRIP_MINED_LOOP = PREFIX + "OUTER_STRIP_MINED_LOOP" + POSTFIX; 1792 static { 1793 String regex = START + "OuterStripMinedLoop\\b" + MID + END; 1794 fromAfterCountedLoops(OUTER_STRIP_MINED_LOOP, regex); 1795 } 1796 1797 public static final String PARTIAL_SUBTYPE_CHECK = PREFIX + "PARTIAL_SUBTYPE_CHECK" + POSTFIX; 1798 static { 1799 beforeMatchingNameRegex(PARTIAL_SUBTYPE_CHECK, "PartialSubtypeCheck"); 1800 } 1801 1802 public static final String PHI = PREFIX + "PHI" + POSTFIX; 1803 static { 1804 beforeMatchingNameRegex(PHI, "Phi"); 1805 } 1806 1807 public static final String POPCOUNT_I = PREFIX + "POPCOUNT_I" + POSTFIX; 1808 static { 1809 beforeMatchingNameRegex(POPCOUNT_I, "PopCountI"); 1810 } 1811 1812 public static final String POPCOUNT_L = PREFIX + "POPCOUNT_L" + POSTFIX; 1813 static { 1814 beforeMatchingNameRegex(POPCOUNT_L, "PopCountL"); 1815 } 1816 1817 public static final String POPCOUNT_VI = VECTOR_PREFIX + "POPCOUNT_VI" + POSTFIX; 1818 static { 1819 vectorNode(POPCOUNT_VI, "PopCountVI", TYPE_INT); 1820 } 1821 1822 public static final String POPCOUNT_VL = VECTOR_PREFIX + "POPCOUNT_VL" + POSTFIX; 1823 static { 1824 vectorNode(POPCOUNT_VL, "PopCountVL", TYPE_LONG); 1825 } 1826 1827 public static final String COUNT_TRAILING_ZEROS_I = PREFIX + "COUNT_TRAILING_ZEROS_I" + POSTFIX; 1828 static { 1829 beforeMatchingNameRegex(COUNT_TRAILING_ZEROS_I, "CountTrailingZerosI"); 1830 } 1831 1832 public static final String COUNT_TRAILING_ZEROS_L = PREFIX + "COUNT_TRAILING_ZEROS_L" + POSTFIX; 1833 static { 1834 beforeMatchingNameRegex(COUNT_TRAILING_ZEROS_L, "CountTrailingZerosL"); 1835 } 1836 1837 public static final String COUNT_TRAILING_ZEROS_VL = VECTOR_PREFIX + "COUNT_TRAILING_ZEROS_VL" + POSTFIX; 1838 static { 1839 vectorNode(COUNT_TRAILING_ZEROS_VL, "CountTrailingZerosV", TYPE_LONG); 1840 } 1841 1842 public static final String COUNT_TRAILING_ZEROS_VI = VECTOR_PREFIX + "COUNT_TRAILING_ZEROS_VI" + POSTFIX; 1843 static { 1844 vectorNode(COUNT_TRAILING_ZEROS_VI, "CountTrailingZerosV", TYPE_INT); 1845 } 1846 1847 public static final String COUNT_LEADING_ZEROS_I = PREFIX + "COUNT_LEADING_ZEROS_I" + POSTFIX; 1848 static { 1849 beforeMatchingNameRegex(COUNT_LEADING_ZEROS_I, "CountLeadingZerosI"); 1850 } 1851 1852 public static final String COUNT_LEADING_ZEROS_L = PREFIX + "COUNT_LEADING_ZEROS_L" + POSTFIX; 1853 static { 1854 beforeMatchingNameRegex(COUNT_LEADING_ZEROS_L, "CountLeadingZerosL"); 1855 } 1856 1857 public static final String COUNT_LEADING_ZEROS_VL = VECTOR_PREFIX + "COUNT_LEADING_ZEROS_VL" + POSTFIX; 1858 static { 1859 vectorNode(COUNT_LEADING_ZEROS_VL, "CountLeadingZerosV", TYPE_LONG); 1860 } 1861 1862 public static final String COUNT_LEADING_ZEROS_VI = VECTOR_PREFIX + "COUNT_LEADING_ZEROS_VI" + POSTFIX; 1863 static { 1864 vectorNode(COUNT_LEADING_ZEROS_VI, "CountLeadingZerosV", TYPE_INT); 1865 } 1866 1867 public static final String POPULATE_INDEX = PREFIX + "POPULATE_INDEX" + POSTFIX; 1868 static { 1869 String regex = START + "PopulateIndex" + MID + END; 1870 IR_NODE_MAPPINGS.put(POPULATE_INDEX, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 1871 CompilePhase.AFTER_CLOOPS, 1872 CompilePhase.BEFORE_MATCHING)); 1873 } 1874 1875 public static final String LOOP_PARSE_PREDICATE = PREFIX + "LOOP_PARSE_PREDICATE" + POSTFIX; 1876 static { 1877 parsePredicateNodes(LOOP_PARSE_PREDICATE, "Loop"); 1878 } 1879 1880 public static final String LOOP_LIMIT_CHECK_PARSE_PREDICATE = PREFIX + "LOOP_LIMIT_CHECK_PARSE_PREDICATE" + POSTFIX; 1881 static { 1882 parsePredicateNodes(LOOP_LIMIT_CHECK_PARSE_PREDICATE, "Loop_Limit_Check"); 1883 } 1884 1885 public static final String PROFILED_LOOP_PARSE_PREDICATE = PREFIX + "PROFILED_LOOP_PARSE_PREDICATE" + POSTFIX; 1886 static { 1887 parsePredicateNodes(PROFILED_LOOP_PARSE_PREDICATE, "Profiled_Loop"); 1888 } 1889 1890 public static final String AUTO_VECTORIZATION_CHECK_PARSE_PREDICATE = PREFIX + "AUTO_VECTORIZATION_CHECK_PARSE_PREDICATE" + POSTFIX; 1891 static { 1892 parsePredicateNodes(AUTO_VECTORIZATION_CHECK_PARSE_PREDICATE, "Auto_Vectorization_Check"); 1893 } 1894 1895 public static final String PREDICATE_TRAP = PREFIX + "PREDICATE_TRAP" + POSTFIX; 1896 static { 1897 trapNodes(PREDICATE_TRAP, "predicate"); 1898 } 1899 1900 public static final String RANGE_CHECK = PREFIX + "RANGE_CHECK" + POSTFIX; 1901 static { 1902 beforeMatchingNameRegex(RANGE_CHECK, "RangeCheck"); 1903 } 1904 1905 public static final String RANGE_CHECK_TRAP = PREFIX + "RANGE_CHECK_TRAP" + POSTFIX; 1906 static { 1907 trapNodes(RANGE_CHECK_TRAP, "range_check"); 1908 } 1909 1910 public static final String SHORT_RUNNING_LOOP_TRAP = PREFIX + "SHORT_RUNNING_LOOP_TRAP" + POSTFIX; 1911 static { 1912 trapNodes(SHORT_RUNNING_LOOP_TRAP, "short_running_loop"); 1913 } 1914 1915 public static final String REINTERPRET_S2HF = PREFIX + "REINTERPRET_S2HF" + POSTFIX; 1916 static { 1917 beforeMatchingNameRegex(REINTERPRET_S2HF, "ReinterpretS2HF"); 1918 } 1919 1920 public static final String REINTERPRET_HF2S = PREFIX + "REINTERPRET_HF2S" + POSTFIX; 1921 static { 1922 beforeMatchingNameRegex(REINTERPRET_HF2S, "ReinterpretHF2S"); 1923 } 1924 1925 public static final String REPLICATE_B = VECTOR_PREFIX + "REPLICATE_B" + POSTFIX; 1926 static { 1927 vectorNode(REPLICATE_B, "Replicate", TYPE_BYTE); 1928 } 1929 1930 public static final String REPLICATE_S = VECTOR_PREFIX + "REPLICATE_S" + POSTFIX; 1931 static { 1932 vectorNode(REPLICATE_S, "Replicate", TYPE_SHORT); 1933 } 1934 1935 public static final String REPLICATE_I = VECTOR_PREFIX + "REPLICATE_I" + POSTFIX; 1936 static { 1937 vectorNode(REPLICATE_I, "Replicate", TYPE_INT); 1938 } 1939 1940 public static final String REPLICATE_L = VECTOR_PREFIX + "REPLICATE_L" + POSTFIX; 1941 static { 1942 vectorNode(REPLICATE_L, "Replicate", TYPE_LONG); 1943 } 1944 1945 public static final String REPLICATE_F = VECTOR_PREFIX + "REPLICATE_F" + POSTFIX; 1946 static { 1947 vectorNode(REPLICATE_F, "Replicate", TYPE_FLOAT); 1948 } 1949 1950 public static final String REPLICATE_D = VECTOR_PREFIX + "REPLICATE_D" + POSTFIX; 1951 static { 1952 vectorNode(REPLICATE_D, "Replicate", TYPE_DOUBLE); 1953 } 1954 1955 public static final String REVERSE_BYTES_I = PREFIX + "REVERSE_BYTES_I" + POSTFIX; 1956 static { 1957 beforeMatchingNameRegex(REVERSE_BYTES_I, "ReverseBytesI"); 1958 } 1959 1960 public static final String REVERSE_BYTES_L = PREFIX + "REVERSE_BYTES_L" + POSTFIX; 1961 static { 1962 beforeMatchingNameRegex(REVERSE_BYTES_L, "ReverseBytesL"); 1963 } 1964 1965 public static final String REVERSE_BYTES_S = PREFIX + "REVERSE_BYTES_S" + POSTFIX; 1966 static { 1967 beforeMatchingNameRegex(REVERSE_BYTES_S, "ReverseBytesS"); 1968 } 1969 1970 public static final String REVERSE_BYTES_US = PREFIX + "REVERSE_BYTES_US" + POSTFIX; 1971 static { 1972 beforeMatchingNameRegex(REVERSE_BYTES_US, "ReverseBytesUS"); 1973 } 1974 1975 public static final String REVERSE_BYTES_VB = VECTOR_PREFIX + "REVERSE_BYTES_VB" + POSTFIX; 1976 static { 1977 vectorNode(REVERSE_BYTES_VB, "ReverseBytesV", TYPE_BYTE); 1978 } 1979 1980 public static final String REVERSE_BYTES_VS = VECTOR_PREFIX + "REVERSE_BYTES_VS" + POSTFIX; 1981 static { 1982 vectorNode(REVERSE_BYTES_VS, "ReverseBytesV", TYPE_SHORT); 1983 } 1984 1985 public static final String REVERSE_BYTES_VI = VECTOR_PREFIX + "REVERSE_BYTES_VI" + POSTFIX; 1986 static { 1987 vectorNode(REVERSE_BYTES_VI, "ReverseBytesV", TYPE_INT); 1988 } 1989 1990 public static final String REVERSE_BYTES_VL = VECTOR_PREFIX + "REVERSE_BYTES_VL" + POSTFIX; 1991 static { 1992 vectorNode(REVERSE_BYTES_VL, "ReverseBytesV", TYPE_LONG); 1993 } 1994 1995 public static final String REVERSE_I = PREFIX + "REVERSE_I" + POSTFIX; 1996 static { 1997 beforeMatchingNameRegex(REVERSE_I, "ReverseI"); 1998 } 1999 2000 public static final String REVERSE_L = PREFIX + "REVERSE_L" + POSTFIX; 2001 static { 2002 beforeMatchingNameRegex(REVERSE_L, "ReverseL"); 2003 } 2004 2005 public static final String REVERSE_VI = VECTOR_PREFIX + "REVERSE_VI" + POSTFIX; 2006 static { 2007 vectorNode(REVERSE_VI, "ReverseV", TYPE_INT); 2008 } 2009 2010 public static final String REVERSE_VL = VECTOR_PREFIX + "REVERSE_VL" + POSTFIX; 2011 static { 2012 vectorNode(REVERSE_VL, "ReverseV", TYPE_LONG); 2013 } 2014 2015 public static final String ROUND_VD = VECTOR_PREFIX + "ROUND_VD" + POSTFIX; 2016 static { 2017 vectorNode(ROUND_VD, "RoundVD", TYPE_LONG); 2018 } 2019 2020 public static final String ROUND_VF = VECTOR_PREFIX + "ROUND_VF" + POSTFIX; 2021 static { 2022 vectorNode(ROUND_VF, "RoundVF", TYPE_INT); 2023 } 2024 2025 public static final String ROTATE_LEFT = PREFIX + "ROTATE_LEFT" + POSTFIX; 2026 static { 2027 beforeMatchingNameRegex(ROTATE_LEFT, "RotateLeft"); 2028 } 2029 2030 public static final String ROTATE_RIGHT = PREFIX + "ROTATE_RIGHT" + POSTFIX; 2031 static { 2032 beforeMatchingNameRegex(ROTATE_RIGHT, "RotateRight"); 2033 } 2034 2035 public static final String ROTATE_LEFT_V = PREFIX + "ROTATE_LEFT_V" + POSTFIX; 2036 static { 2037 beforeMatchingNameRegex(ROTATE_LEFT_V, "RotateLeftV"); 2038 } 2039 2040 public static final String ROTATE_RIGHT_V = PREFIX + "ROTATE_RIGHT_V" + POSTFIX; 2041 static { 2042 beforeMatchingNameRegex(ROTATE_RIGHT_V, "RotateRightV"); 2043 } 2044 2045 public static final String ROUND_DOUBLE_MODE_V = VECTOR_PREFIX + "ROUND_DOUBLE_MODE_V" + POSTFIX; 2046 static { 2047 vectorNode(ROUND_DOUBLE_MODE_V, "RoundDoubleModeV", TYPE_DOUBLE); 2048 } 2049 2050 public static final String RSHIFT = PREFIX + "RSHIFT" + POSTFIX; 2051 static { 2052 beforeMatchingNameRegex(RSHIFT, "RShift(I|L)"); 2053 } 2054 2055 public static final String RSHIFT_I = PREFIX + "RSHIFT_I" + POSTFIX; 2056 static { 2057 beforeMatchingNameRegex(RSHIFT_I, "RShiftI"); 2058 } 2059 2060 public static final String RSHIFT_L = PREFIX + "RSHIFT_L" + POSTFIX; 2061 static { 2062 beforeMatchingNameRegex(RSHIFT_L, "RShiftL"); 2063 } 2064 2065 public static final String RSHIFT_VB = VECTOR_PREFIX + "RSHIFT_VB" + POSTFIX; 2066 static { 2067 vectorNode(RSHIFT_VB, "RShiftVB", TYPE_BYTE); 2068 } 2069 2070 public static final String RSHIFT_VS = VECTOR_PREFIX + "RSHIFT_VS" + POSTFIX; 2071 static { 2072 vectorNode(RSHIFT_VS, "RShiftVS", TYPE_SHORT); 2073 } 2074 2075 public static final String RSHIFT_VC = VECTOR_PREFIX + "RSHIFT_VC" + POSTFIX; 2076 static { 2077 vectorNode(RSHIFT_VC, "RShiftVS", TYPE_CHAR); // short computation with char type 2078 } 2079 2080 public static final String RSHIFT_VI = VECTOR_PREFIX + "RSHIFT_VI" + POSTFIX; 2081 static { 2082 vectorNode(RSHIFT_VI, "RShiftVI", TYPE_INT); 2083 } 2084 2085 public static final String RSHIFT_VL = VECTOR_PREFIX + "RSHIFT_VL" + POSTFIX; 2086 static { 2087 vectorNode(RSHIFT_VL, "RShiftVL", TYPE_LONG); 2088 } 2089 2090 public static final String SAFEPOINT = PREFIX + "SAFEPOINT" + POSTFIX; 2091 static { 2092 beforeMatchingNameRegex(SAFEPOINT, "SafePoint"); 2093 } 2094 2095 public static final String SCOPE_OBJECT = PREFIX + "SCOPE_OBJECT" + POSTFIX; 2096 static { 2097 String regex = "(.*# ScObj.*" + END; 2098 optoOnly(SCOPE_OBJECT, regex); 2099 } 2100 2101 public static final String SAFEPOINT_SCALAROBJECT_OF = COMPOSITE_PREFIX + "SAFEPOINT_SCALAROBJECT_OF" + POSTFIX; 2102 static { 2103 safepointScalarobjectOfNodes(SAFEPOINT_SCALAROBJECT_OF, "SafePointScalarObject"); 2104 } 2105 2106 public static final String SIGNUM_VD = VECTOR_PREFIX + "SIGNUM_VD" + POSTFIX; 2107 static { 2108 vectorNode(SIGNUM_VD, "SignumVD", TYPE_DOUBLE); 2109 } 2110 2111 public static final String SIGNUM_VF = VECTOR_PREFIX + "SIGNUM_VF" + POSTFIX; 2112 static { 2113 vectorNode(SIGNUM_VF, "SignumVF", TYPE_FLOAT); 2114 } 2115 2116 public static final String SQRT_VHF = VECTOR_PREFIX + "SQRT_VHF" + POSTFIX; 2117 static { 2118 vectorNode(SQRT_VHF, "SqrtVHF", TYPE_SHORT); 2119 } 2120 2121 public static final String SQRT_HF = PREFIX + "SQRT_HF" + POSTFIX; 2122 static { 2123 beforeMatchingNameRegex(SQRT_HF, "SqrtHF"); 2124 } 2125 2126 public static final String SQRT_D = PREFIX + "SQRT_D" + POSTFIX; 2127 static { 2128 beforeMatchingNameRegex(SQRT_D, "SqrtD"); 2129 } 2130 2131 public static final String SQRT_F = PREFIX + "SQRT_F" + POSTFIX; 2132 static { 2133 beforeMatchingNameRegex(SQRT_F, "SqrtF"); 2134 } 2135 2136 public static final String SQRT_VF = VECTOR_PREFIX + "SQRT_VF" + POSTFIX; 2137 static { 2138 vectorNode(SQRT_VF, "SqrtVF", TYPE_FLOAT); 2139 } 2140 2141 public static final String SQRT_VD = VECTOR_PREFIX + "SQRT_VD" + POSTFIX; 2142 static { 2143 vectorNode(SQRT_VD, "SqrtVD", TYPE_DOUBLE); 2144 } 2145 2146 public static final String STORE = PREFIX + "STORE" + POSTFIX; 2147 static { 2148 beforeMatchingNameRegex(STORE, "Store(B|C|S|I|L|F|D|P|N)"); 2149 } 2150 2151 public static final String STORE_B = PREFIX + "STORE_B" + POSTFIX; 2152 static { 2153 beforeMatchingNameRegex(STORE_B, "StoreB"); 2154 } 2155 2156 public static final String STORE_B_OF_CLASS = COMPOSITE_PREFIX + "STORE_B_OF_CLASS" + POSTFIX; 2157 static { 2158 storeOfNodes(STORE_B_OF_CLASS, "StoreB", IS_REPLACED); 2159 } 2160 2161 public static final String STORE_C = PREFIX + "STORE_C" + POSTFIX; 2162 static { 2163 beforeMatchingNameRegex(STORE_C, "StoreC"); 2164 } 2165 2166 public static final String STORE_C_OF_CLASS = COMPOSITE_PREFIX + "STORE_C_OF_CLASS" + POSTFIX; 2167 static { 2168 storeOfNodes(STORE_C_OF_CLASS, "StoreC", IS_REPLACED); 2169 } 2170 2171 public static final String STORE_D = PREFIX + "STORE_D" + POSTFIX; 2172 static { 2173 beforeMatchingNameRegex(STORE_D, "StoreD"); 2174 } 2175 2176 public static final String STORE_D_OF_CLASS = COMPOSITE_PREFIX + "STORE_D_OF_CLASS" + POSTFIX; 2177 static { 2178 storeOfNodes(STORE_D_OF_CLASS, "StoreD", IS_REPLACED); 2179 } 2180 2181 public static final String STORE_F = PREFIX + "STORE_F" + POSTFIX; 2182 static { 2183 beforeMatchingNameRegex(STORE_F, "StoreF"); 2184 } 2185 2186 public static final String STORE_F_OF_CLASS = COMPOSITE_PREFIX + "STORE_F_OF_CLASS" + POSTFIX; 2187 static { 2188 storeOfNodes(STORE_F_OF_CLASS, "StoreF", IS_REPLACED); 2189 } 2190 2191 public static final String STORE_I = PREFIX + "STORE_I" + POSTFIX; 2192 static { 2193 beforeMatchingNameRegex(STORE_I, "StoreI"); 2194 } 2195 2196 public static final String STORE_I_OF_CLASS = COMPOSITE_PREFIX + "STORE_I_OF_CLASS" + POSTFIX; 2197 static { 2198 storeOfNodes(STORE_I_OF_CLASS, "StoreI", IS_REPLACED); 2199 } 2200 2201 public static final String STORE_L = PREFIX + "STORE_L" + POSTFIX; 2202 static { 2203 beforeMatchingNameRegex(STORE_L, "StoreL"); 2204 } 2205 2206 public static final String STORE_L_OF_CLASS = COMPOSITE_PREFIX + "STORE_L_OF_CLASS" + POSTFIX; 2207 static { 2208 storeOfNodes(STORE_L_OF_CLASS, "StoreL", IS_REPLACED); 2209 } 2210 2211 public static final String STORE_N = PREFIX + "STORE_N" + POSTFIX; 2212 static { 2213 beforeMatchingNameRegex(STORE_N, "StoreN"); 2214 } 2215 2216 public static final String STORE_N_OF_CLASS = COMPOSITE_PREFIX + "STORE_N_OF_CLASS" + POSTFIX; 2217 static { 2218 storeOfNodes(STORE_N_OF_CLASS, "StoreN", IS_REPLACED); 2219 } 2220 2221 public static final String STORE_OF_CLASS = COMPOSITE_PREFIX + "STORE_OF_CLASS" + POSTFIX; 2222 static { 2223 anyStoreOfNodes(STORE_OF_CLASS, IS_REPLACED); 2224 } 2225 2226 public static void anyStoreOfNodes(String irNodePlaceholder, String fieldHolder) { 2227 storeOfNodes(irNodePlaceholder, "Store(B|C|S|I|L|F|D|P|N)", fieldHolder); 2228 } 2229 2230 public static final String STORE_OF_FIELD = COMPOSITE_PREFIX + "STORE_OF_FIELD" + POSTFIX; 2231 static { 2232 String regex = START + "Store(B|C|S|I|L|F|D|P|N)" + MID + "@.*name=" + IS_REPLACED + ",.*" + END; 2233 beforeMatching(STORE_OF_FIELD, regex); 2234 } 2235 2236 public static final String STORE_P = PREFIX + "STORE_P" + POSTFIX; 2237 static { 2238 beforeMatchingNameRegex(STORE_P, "StoreP"); 2239 } 2240 2241 public static final String STORE_P_OF_CLASS = COMPOSITE_PREFIX + "STORE_P_OF_CLASS" + POSTFIX; 2242 static { 2243 storeOfNodes(STORE_P_OF_CLASS, "StoreP", IS_REPLACED); 2244 } 2245 2246 public static final String STORE_VECTOR = PREFIX + "STORE_VECTOR" + POSTFIX; 2247 static { 2248 beforeMatchingNameRegex(STORE_VECTOR, "StoreVector"); 2249 } 2250 2251 public static final String STORE_VECTOR_SCATTER = PREFIX + "STORE_VECTOR_SCATTER" + POSTFIX; 2252 static { 2253 beforeMatchingNameRegex(STORE_VECTOR_SCATTER, "StoreVectorScatter"); 2254 } 2255 2256 public static final String STORE_VECTOR_MASKED = PREFIX + "STORE_VECTOR_MASKED" + POSTFIX; 2257 static { 2258 beforeMatchingNameRegex(STORE_VECTOR_MASKED, "StoreVectorMasked"); 2259 } 2260 2261 public static final String STORE_VECTOR_SCATTER_MASKED = PREFIX + "STORE_VECTOR_SCATTER_MASKED" + POSTFIX; 2262 static { 2263 beforeMatchingNameRegex(STORE_VECTOR_SCATTER_MASKED, "StoreVectorScatterMasked"); 2264 } 2265 2266 public static final String VECTOR_LOAD_MASK = PREFIX + "VECTOR_LOAD_MASK" + POSTFIX; 2267 static { 2268 beforeMatchingNameRegex(VECTOR_LOAD_MASK, "VectorLoadMask"); 2269 } 2270 2271 public static final String VECTOR_STORE_MASK = PREFIX + "VECTOR_STORE_MASK" + POSTFIX; 2272 static { 2273 beforeMatchingNameRegex(VECTOR_STORE_MASK, "VectorStoreMask"); 2274 } 2275 2276 public static final String SUB = PREFIX + "SUB" + POSTFIX; 2277 static { 2278 beforeMatchingNameRegex(SUB, "Sub(I|L|F|D|HF)"); 2279 } 2280 2281 public static final String SUB_D = PREFIX + "SUB_D" + POSTFIX; 2282 static { 2283 beforeMatchingNameRegex(SUB_D, "SubD"); 2284 } 2285 2286 public static final String SUB_F = PREFIX + "SUB_F" + POSTFIX; 2287 static { 2288 beforeMatchingNameRegex(SUB_F, "SubF"); 2289 } 2290 2291 public static final String SUB_HF = PREFIX + "SUB_HF" + POSTFIX; 2292 static { 2293 beforeMatchingNameRegex(SUB_HF, "SubHF"); 2294 } 2295 2296 public static final String SUB_I = PREFIX + "SUB_I" + POSTFIX; 2297 static { 2298 beforeMatchingNameRegex(SUB_I, "SubI"); 2299 } 2300 2301 public static final String SUB_L = PREFIX + "SUB_L" + POSTFIX; 2302 static { 2303 beforeMatchingNameRegex(SUB_L, "SubL"); 2304 } 2305 2306 public static final String SUB_VB = VECTOR_PREFIX + "SUB_VB" + POSTFIX; 2307 static { 2308 vectorNode(SUB_VB, "SubVB", TYPE_BYTE); 2309 } 2310 2311 public static final String SUB_VS = VECTOR_PREFIX + "SUB_VS" + POSTFIX; 2312 static { 2313 vectorNode(SUB_VS, "SubVS", TYPE_SHORT); 2314 } 2315 2316 public static final String SUB_VI = VECTOR_PREFIX + "SUB_VI" + POSTFIX; 2317 static { 2318 vectorNode(SUB_VI, "SubVI", TYPE_INT); 2319 } 2320 2321 public static final String SUB_VL = VECTOR_PREFIX + "SUB_VL" + POSTFIX; 2322 static { 2323 vectorNode(SUB_VL, "SubVL", TYPE_LONG); 2324 } 2325 2326 public static final String SUB_VHF = VECTOR_PREFIX + "SUB_VHF" + POSTFIX; 2327 static { 2328 vectorNode(SUB_VHF, "SubVHF", TYPE_SHORT); 2329 } 2330 2331 public static final String SUB_VF = VECTOR_PREFIX + "SUB_VF" + POSTFIX; 2332 static { 2333 vectorNode(SUB_VF, "SubVF", TYPE_FLOAT); 2334 } 2335 2336 public static final String SUB_VD = VECTOR_PREFIX + "SUB_VD" + POSTFIX; 2337 static { 2338 vectorNode(SUB_VD, "SubVD", TYPE_DOUBLE); 2339 } 2340 2341 public static final String SUBTYPE_CHECK = PREFIX + "SUBTYPE_CHECK" + POSTFIX; 2342 static { 2343 String regex = START + "SubTypeCheck" + MID + END; 2344 macroNodes(SUBTYPE_CHECK, regex); 2345 } 2346 2347 public static final String TRAP = PREFIX + "TRAP" + POSTFIX; 2348 static { 2349 trapNodes(TRAP, "reason"); 2350 } 2351 2352 public static final String DIV_HF = PREFIX + "DIV_HF" + POSTFIX; 2353 static { 2354 beforeMatchingNameRegex(DIV_HF, "DivHF"); 2355 } 2356 2357 public static final String UDIV_I = PREFIX + "UDIV_I" + POSTFIX; 2358 static { 2359 beforeMatchingNameRegex(UDIV_I, "UDivI"); 2360 } 2361 2362 public static final String UDIV_L = PREFIX + "UDIV_L" + POSTFIX; 2363 static { 2364 beforeMatchingNameRegex(UDIV_L, "UDivL"); 2365 } 2366 2367 public static final String UDIV_MOD_I = PREFIX + "UDIV_MOD_I" + POSTFIX; 2368 static { 2369 beforeMatchingNameRegex(UDIV_MOD_I, "UDivModI"); 2370 } 2371 2372 public static final String UDIV_MOD_L = PREFIX + "UDIV_MOD_L" + POSTFIX; 2373 static { 2374 beforeMatchingNameRegex(UDIV_MOD_L, "UDivModL"); 2375 } 2376 2377 public static final String UMOD_I = PREFIX + "UMOD_I" + POSTFIX; 2378 static { 2379 beforeMatchingNameRegex(UMOD_I, "UModI"); 2380 } 2381 2382 public static final String UMOD_L = PREFIX + "UMOD_L" + POSTFIX; 2383 static { 2384 beforeMatchingNameRegex(UMOD_L, "UModL"); 2385 } 2386 2387 public static final String UNHANDLED_TRAP = PREFIX + "UNHANDLED_TRAP" + POSTFIX; 2388 static { 2389 trapNodes(UNHANDLED_TRAP, "unhandled"); 2390 } 2391 2392 public static final String UNSTABLE_IF_TRAP = PREFIX + "UNSTABLE_IF_TRAP" + POSTFIX; 2393 static { 2394 trapNodes(UNSTABLE_IF_TRAP, "unstable_if"); 2395 } 2396 2397 public static final String UNREACHED_TRAP = PREFIX + "UNREACHED_TRAP" + POSTFIX; 2398 static { 2399 trapNodes(UNREACHED_TRAP, "unreached"); 2400 } 2401 2402 public static final String URSHIFT = PREFIX + "URSHIFT" + POSTFIX; 2403 static { 2404 beforeMatchingNameRegex(URSHIFT, "URShift(B|S|I|L)"); 2405 } 2406 2407 public static final String URSHIFT_B = PREFIX + "URSHIFT_B" + POSTFIX; 2408 static { 2409 beforeMatchingNameRegex(URSHIFT_B, "URShiftB"); 2410 } 2411 2412 public static final String URSHIFT_I = PREFIX + "URSHIFT_I" + POSTFIX; 2413 static { 2414 beforeMatchingNameRegex(URSHIFT_I, "URShiftI"); 2415 } 2416 2417 public static final String URSHIFT_L = PREFIX + "URSHIFT_L" + POSTFIX; 2418 static { 2419 beforeMatchingNameRegex(URSHIFT_L, "URShiftL"); 2420 } 2421 2422 public static final String URSHIFT_S = PREFIX + "URSHIFT_S" + POSTFIX; 2423 static { 2424 beforeMatchingNameRegex(URSHIFT_S, "URShiftS"); 2425 } 2426 2427 public static final String URSHIFT_VB = VECTOR_PREFIX + "URSHIFT_VB" + POSTFIX; 2428 static { 2429 vectorNode(URSHIFT_VB, "URShiftVB", TYPE_BYTE); 2430 } 2431 2432 public static final String URSHIFT_VS = VECTOR_PREFIX + "URSHIFT_VS" + POSTFIX; 2433 static { 2434 vectorNode(URSHIFT_VS, "URShiftVS", TYPE_SHORT); 2435 } 2436 2437 public static final String URSHIFT_VC = VECTOR_PREFIX + "URSHIFT_VC" + POSTFIX; 2438 static { 2439 vectorNode(URSHIFT_VC, "URShiftVS", TYPE_CHAR); // short computation with char type 2440 } 2441 2442 public static final String URSHIFT_VI = VECTOR_PREFIX + "URSHIFT_VI" + POSTFIX; 2443 static { 2444 vectorNode(URSHIFT_VI, "URShiftVI", TYPE_INT); 2445 } 2446 2447 public static final String URSHIFT_VL = VECTOR_PREFIX + "URSHIFT_VL" + POSTFIX; 2448 static { 2449 vectorNode(URSHIFT_VL, "URShiftVL", TYPE_LONG); 2450 } 2451 2452 public static final String VAND_NOT_I = PREFIX + "VAND_NOT_I" + POSTFIX; 2453 static { 2454 machOnlyNameRegex(VAND_NOT_I, "vand_notI"); 2455 } 2456 2457 public static final String VAND_NOT_L = PREFIX + "VAND_NOT_L" + POSTFIX; 2458 static { 2459 machOnlyNameRegex(VAND_NOT_L, "vand_notL"); 2460 } 2461 2462 public static final String VAND_NOT_I_MASKED = PREFIX + "VAND_NOT_I_MASKED" + POSTFIX; 2463 static { 2464 machOnlyNameRegex(VAND_NOT_I_MASKED, "vand_notI_masked"); 2465 } 2466 2467 public static final String VAND_NOT_L_MASKED = PREFIX + "VAND_NOT_L_MASKED" + POSTFIX; 2468 static { 2469 machOnlyNameRegex(VAND_NOT_L_MASKED, "vand_notL_masked"); 2470 } 2471 2472 public static final String RISCV_VAND_NOTI_VX = PREFIX + "RISCV_VAND_NOTI_VX" + POSTFIX; 2473 static { 2474 machOnlyNameRegex(RISCV_VAND_NOTI_VX, "vand_notI_vx"); 2475 } 2476 2477 public static final String RISCV_VAND_NOTL_VX = PREFIX + "RISCV_VAND_NOTL_VX" + POSTFIX; 2478 static { 2479 machOnlyNameRegex(RISCV_VAND_NOTL_VX, "vand_notL_vx"); 2480 } 2481 2482 public static final String RISCV_VAND_NOTI_VX_MASKED = PREFIX + "RISCV_VAND_NOTI_VX_MASKED" + POSTFIX; 2483 static { 2484 machOnlyNameRegex(RISCV_VAND_NOTI_VX_MASKED, "vand_notI_vx_masked"); 2485 } 2486 2487 public static final String RISCV_VAND_NOTL_VX_MASKED = PREFIX + "RISCV_VAND_NOTL_VX_MASKED" + POSTFIX; 2488 static { 2489 machOnlyNameRegex(RISCV_VAND_NOTL_VX_MASKED, "vand_notL_vx_masked"); 2490 } 2491 2492 public static final String VECTOR_BLEND_B = VECTOR_PREFIX + "VECTOR_BLEND_B" + POSTFIX; 2493 static { 2494 vectorNode(VECTOR_BLEND_B, "VectorBlend", TYPE_BYTE); 2495 } 2496 2497 public static final String VECTOR_BLEND_S = VECTOR_PREFIX + "VECTOR_BLEND_S" + POSTFIX; 2498 static { 2499 vectorNode(VECTOR_BLEND_S, "VectorBlend", TYPE_SHORT); 2500 } 2501 2502 public static final String VECTOR_BLEND_I = VECTOR_PREFIX + "VECTOR_BLEND_I" + POSTFIX; 2503 static { 2504 vectorNode(VECTOR_BLEND_I, "VectorBlend", TYPE_INT); 2505 } 2506 2507 public static final String VECTOR_BLEND_L = VECTOR_PREFIX + "VECTOR_BLEND_L" + POSTFIX; 2508 static { 2509 vectorNode(VECTOR_BLEND_L, "VectorBlend", TYPE_LONG); 2510 } 2511 2512 public static final String VECTOR_BLEND_F = VECTOR_PREFIX + "VECTOR_BLEND_F" + POSTFIX; 2513 static { 2514 vectorNode(VECTOR_BLEND_F, "VectorBlend", TYPE_FLOAT); 2515 } 2516 2517 public static final String VECTOR_BLEND_D = VECTOR_PREFIX + "VECTOR_BLEND_D" + POSTFIX; 2518 static { 2519 vectorNode(VECTOR_BLEND_D, "VectorBlend", TYPE_DOUBLE); 2520 } 2521 2522 public static final String VECTOR_BITWISE_BLEND = PREFIX + "VECTOR_BITWISE_BLEND" + POSTFIX; 2523 static { 2524 String regex = START + "VectorBitwiseBlend" + MID + END; 2525 afterBarrierExpansionToBeforeMatching(VECTOR_BITWISE_BLEND, regex); 2526 } 2527 2528 public static final String VECTOR_MASK_CMP_I = VECTOR_PREFIX + "VECTOR_MASK_CMP_I" + POSTFIX; 2529 static { 2530 vectorNode(VECTOR_MASK_CMP_I, "VectorMaskCmp", TYPE_INT); 2531 } 2532 2533 public static final String VECTOR_MASK_CMP_L = VECTOR_PREFIX + "VECTOR_MASK_CMP_L" + POSTFIX; 2534 static { 2535 vectorNode(VECTOR_MASK_CMP_L, "VectorMaskCmp", TYPE_LONG); 2536 } 2537 2538 public static final String VECTOR_MASK_CMP_F = VECTOR_PREFIX + "VECTOR_MASK_CMP_F" + POSTFIX; 2539 static { 2540 vectorNode(VECTOR_MASK_CMP_F, "VectorMaskCmp", TYPE_FLOAT); 2541 } 2542 2543 public static final String VECTOR_MASK_CMP_D = VECTOR_PREFIX + "VECTOR_MASK_CMP_D" + POSTFIX; 2544 static { 2545 vectorNode(VECTOR_MASK_CMP_D, "VectorMaskCmp", TYPE_DOUBLE); 2546 } 2547 2548 public static final String VECTOR_MASK_CMP = PREFIX + "VECTOR_MASK_CMP" + POSTFIX; 2549 static { 2550 beforeMatchingNameRegex(VECTOR_MASK_CMP, "VectorMaskCmp"); 2551 } 2552 2553 public static final String VECTOR_CAST_B2S = VECTOR_PREFIX + "VECTOR_CAST_B2S" + POSTFIX; 2554 static { 2555 vectorNode(VECTOR_CAST_B2S, "VectorCastB2X", TYPE_SHORT); 2556 } 2557 2558 public static final String VECTOR_CAST_B2I = VECTOR_PREFIX + "VECTOR_CAST_B2I" + POSTFIX; 2559 static { 2560 vectorNode(VECTOR_CAST_B2I, "VectorCastB2X", TYPE_INT); 2561 } 2562 2563 public static final String VECTOR_CAST_B2L = VECTOR_PREFIX + "VECTOR_CAST_B2L" + POSTFIX; 2564 static { 2565 vectorNode(VECTOR_CAST_B2L, "VectorCastB2X", TYPE_LONG); 2566 } 2567 2568 public static final String VECTOR_CAST_B2F = VECTOR_PREFIX + "VECTOR_CAST_B2F" + POSTFIX; 2569 static { 2570 vectorNode(VECTOR_CAST_B2F, "VectorCastB2X", TYPE_FLOAT); 2571 } 2572 2573 public static final String VECTOR_CAST_B2D = VECTOR_PREFIX + "VECTOR_CAST_B2D" + POSTFIX; 2574 static { 2575 vectorNode(VECTOR_CAST_B2D, "VectorCastB2X", TYPE_DOUBLE); 2576 } 2577 2578 public static final String VECTOR_CAST_D2B = VECTOR_PREFIX + "VECTOR_CAST_D2B" + POSTFIX; 2579 static { 2580 vectorNode(VECTOR_CAST_D2B, "VectorCastD2X", TYPE_BYTE); 2581 } 2582 2583 public static final String VECTOR_CAST_D2S = VECTOR_PREFIX + "VECTOR_CAST_D2S" + POSTFIX; 2584 static { 2585 vectorNode(VECTOR_CAST_D2S, "VectorCastD2X", TYPE_SHORT); 2586 } 2587 2588 public static final String VECTOR_CAST_D2I = VECTOR_PREFIX + "VECTOR_CAST_D2I" + POSTFIX; 2589 static { 2590 vectorNode(VECTOR_CAST_D2I, "VectorCastD2X", TYPE_INT); 2591 } 2592 2593 public static final String VECTOR_CAST_D2L = VECTOR_PREFIX + "VECTOR_CAST_D2L" + POSTFIX; 2594 static { 2595 vectorNode(VECTOR_CAST_D2L, "VectorCastD2X", TYPE_LONG); 2596 } 2597 2598 public static final String VECTOR_CAST_D2F = VECTOR_PREFIX + "VECTOR_CAST_D2F" + POSTFIX; 2599 static { 2600 vectorNode(VECTOR_CAST_D2F, "VectorCastD2X", TYPE_FLOAT); 2601 } 2602 2603 public static final String VECTOR_CAST_F2B = VECTOR_PREFIX + "VECTOR_CAST_F2B" + POSTFIX; 2604 static { 2605 vectorNode(VECTOR_CAST_F2B, "VectorCastF2X", TYPE_BYTE); 2606 } 2607 2608 public static final String VECTOR_CAST_F2S = VECTOR_PREFIX + "VECTOR_CAST_F2S" + POSTFIX; 2609 static { 2610 vectorNode(VECTOR_CAST_F2S, "VectorCastF2X", TYPE_SHORT); 2611 } 2612 2613 public static final String VECTOR_CAST_F2I = VECTOR_PREFIX + "VECTOR_CAST_F2I" + POSTFIX; 2614 static { 2615 vectorNode(VECTOR_CAST_F2I, "VectorCastF2X", TYPE_INT); 2616 } 2617 2618 public static final String VECTOR_CAST_F2L = VECTOR_PREFIX + "VECTOR_CAST_F2L" + POSTFIX; 2619 static { 2620 vectorNode(VECTOR_CAST_F2L, "VectorCastF2X", TYPE_LONG); 2621 } 2622 2623 public static final String VECTOR_CAST_F2D = VECTOR_PREFIX + "VECTOR_CAST_F2D" + POSTFIX; 2624 static { 2625 vectorNode(VECTOR_CAST_F2D, "VectorCastF2X", TYPE_DOUBLE); 2626 } 2627 2628 public static final String VECTOR_CAST_I2B = VECTOR_PREFIX + "VECTOR_CAST_I2B" + POSTFIX; 2629 static { 2630 vectorNode(VECTOR_CAST_I2B, "VectorCastI2X", TYPE_BYTE); 2631 } 2632 2633 public static final String VECTOR_CAST_I2S = VECTOR_PREFIX + "VECTOR_CAST_I2S" + POSTFIX; 2634 static { 2635 vectorNode(VECTOR_CAST_I2S, "VectorCastI2X", TYPE_SHORT); 2636 } 2637 2638 public static final String VECTOR_CAST_I2L = VECTOR_PREFIX + "VECTOR_CAST_I2L" + POSTFIX; 2639 static { 2640 vectorNode(VECTOR_CAST_I2L, "VectorCastI2X", TYPE_LONG); 2641 } 2642 2643 public static final String VECTOR_CAST_I2F = VECTOR_PREFIX + "VECTOR_CAST_I2F" + POSTFIX; 2644 static { 2645 vectorNode(VECTOR_CAST_I2F, "VectorCastI2X", TYPE_FLOAT); 2646 } 2647 2648 public static final String VECTOR_CAST_I2D = VECTOR_PREFIX + "VECTOR_CAST_I2D" + POSTFIX; 2649 static { 2650 vectorNode(VECTOR_CAST_I2D, "VectorCastI2X", TYPE_DOUBLE); 2651 } 2652 2653 public static final String VECTOR_CAST_L2B = VECTOR_PREFIX + "VECTOR_CAST_L2B" + POSTFIX; 2654 static { 2655 vectorNode(VECTOR_CAST_L2B, "VectorCastL2X", TYPE_BYTE); 2656 } 2657 2658 public static final String VECTOR_CAST_L2S = VECTOR_PREFIX + "VECTOR_CAST_L2S" + POSTFIX; 2659 static { 2660 vectorNode(VECTOR_CAST_L2S, "VectorCastL2X", TYPE_SHORT); 2661 } 2662 2663 public static final String VECTOR_CAST_L2I = VECTOR_PREFIX + "VECTOR_CAST_L2I" + POSTFIX; 2664 static { 2665 vectorNode(VECTOR_CAST_L2I, "VectorCastL2X", TYPE_INT); 2666 } 2667 2668 public static final String VECTOR_CAST_L2F = VECTOR_PREFIX + "VECTOR_CAST_L2F" + POSTFIX; 2669 static { 2670 vectorNode(VECTOR_CAST_L2F, "VectorCastL2X", TYPE_FLOAT); 2671 } 2672 2673 public static final String VECTOR_CAST_L2D = VECTOR_PREFIX + "VECTOR_CAST_L2D" + POSTFIX; 2674 static { 2675 vectorNode(VECTOR_CAST_L2D, "VectorCastL2X", TYPE_DOUBLE); 2676 } 2677 2678 public static final String VECTOR_CAST_S2B = VECTOR_PREFIX + "VECTOR_CAST_S2B" + POSTFIX; 2679 static { 2680 vectorNode(VECTOR_CAST_S2B, "VectorCastS2X", TYPE_BYTE); 2681 } 2682 2683 public static final String VECTOR_CAST_S2I = VECTOR_PREFIX + "VECTOR_CAST_S2I" + POSTFIX; 2684 static { 2685 vectorNode(VECTOR_CAST_S2I, "VectorCastS2X", TYPE_INT); 2686 } 2687 2688 public static final String VECTOR_CAST_S2L = VECTOR_PREFIX + "VECTOR_CAST_S2L" + POSTFIX; 2689 static { 2690 vectorNode(VECTOR_CAST_S2L, "VectorCastS2X", TYPE_LONG); 2691 } 2692 2693 public static final String VECTOR_CAST_S2F = VECTOR_PREFIX + "VECTOR_CAST_S2F" + POSTFIX; 2694 static { 2695 vectorNode(VECTOR_CAST_S2F, "VectorCastS2X", TYPE_FLOAT); 2696 } 2697 2698 public static final String VECTOR_CAST_S2D = VECTOR_PREFIX + "VECTOR_CAST_S2D" + POSTFIX; 2699 static { 2700 vectorNode(VECTOR_CAST_S2D, "VectorCastS2X", TYPE_DOUBLE); 2701 } 2702 2703 public static final String VECTOR_CAST_F2HF = VECTOR_PREFIX + "VECTOR_CAST_F2HF" + POSTFIX; 2704 static { 2705 vectorNode(VECTOR_CAST_F2HF, "VectorCastF2HF", TYPE_SHORT); 2706 } 2707 2708 public static final String VECTOR_CAST_HF2F = VECTOR_PREFIX + "VECTOR_CAST_HF2F" + POSTFIX; 2709 static { 2710 vectorNode(VECTOR_CAST_HF2F, "VectorCastHF2F", TYPE_FLOAT); 2711 } 2712 2713 public static final String VECTOR_MASK_CAST = PREFIX + "VECTOR_MASK_CAST" + POSTFIX; 2714 static { 2715 beforeMatchingNameRegex(VECTOR_MASK_CAST, "VectorMaskCast"); 2716 } 2717 2718 public static final String VECTOR_REINTERPRET = PREFIX + "VECTOR_REINTERPRET" + POSTFIX; 2719 static { 2720 beforeMatchingNameRegex(VECTOR_REINTERPRET, "VectorReinterpret"); 2721 } 2722 2723 public static final String VECTOR_UCAST_B2S = VECTOR_PREFIX + "VECTOR_UCAST_B2S" + POSTFIX; 2724 static { 2725 vectorNode(VECTOR_UCAST_B2S, "VectorUCastB2X", TYPE_SHORT); 2726 } 2727 2728 public static final String VECTOR_UCAST_B2I = VECTOR_PREFIX + "VECTOR_UCAST_B2I" + POSTFIX; 2729 static { 2730 vectorNode(VECTOR_UCAST_B2I, "VectorUCastB2X", TYPE_INT); 2731 } 2732 2733 public static final String VECTOR_UCAST_B2L = VECTOR_PREFIX + "VECTOR_UCAST_B2L" + POSTFIX; 2734 static { 2735 vectorNode(VECTOR_UCAST_B2L, "VectorUCastB2X", TYPE_LONG); 2736 } 2737 2738 public static final String VECTOR_UCAST_I2L = VECTOR_PREFIX + "VECTOR_UCAST_I2L" + POSTFIX; 2739 static { 2740 vectorNode(VECTOR_UCAST_I2L, "VectorUCastI2X", TYPE_LONG); 2741 } 2742 2743 public static final String VECTOR_UCAST_S2I = VECTOR_PREFIX + "VECTOR_UCAST_S2I" + POSTFIX; 2744 static { 2745 vectorNode(VECTOR_UCAST_S2I, "VectorUCastS2X", TYPE_INT); 2746 } 2747 2748 public static final String VECTOR_UCAST_S2L = VECTOR_PREFIX + "VECTOR_UCAST_S2L" + POSTFIX; 2749 static { 2750 vectorNode(VECTOR_UCAST_S2L, "VectorUCastS2X", TYPE_LONG); 2751 } 2752 2753 public static final String VECTOR_TEST = PREFIX + "VECTOR_TEST" + POSTFIX; 2754 static { 2755 beforeMatchingNameRegex(VECTOR_TEST, "VectorTest"); 2756 } 2757 2758 public static final String VFABD = PREFIX + "VFABD" + POSTFIX; 2759 static { 2760 machOnlyNameRegex(VFABD, "vfabd"); 2761 } 2762 2763 public static final String VFABD_MASKED = PREFIX + "VFABD_MASKED" + POSTFIX; 2764 static { 2765 machOnlyNameRegex(VFABD_MASKED, "vfabd_masked"); 2766 } 2767 2768 public static final String VFMSB_MASKED = PREFIX + "VFMSB_MASKED" + POSTFIX; 2769 static { 2770 machOnlyNameRegex(VFMSB_MASKED, "vfmsb_masked"); 2771 } 2772 2773 public static final String RISCV_VFNMSUB_MASKED = PREFIX + "RISCV_VFNMSUB_MASKED" + POSTFIX; 2774 static { 2775 machOnlyNameRegex(RISCV_VFNMSUB_MASKED, "vfnmsub_masked"); 2776 } 2777 2778 public static final String VFNMAD_MASKED = PREFIX + "VFNMAD_MASKED" + POSTFIX; 2779 static { 2780 machOnlyNameRegex(VFNMAD_MASKED, "vfnmad_masked"); 2781 } 2782 2783 public static final String RISCV_VFNMADD_MASKED = PREFIX + "RISCV_VFNMADD_MASKED" + POSTFIX; 2784 static { 2785 machOnlyNameRegex(RISCV_VFNMADD_MASKED, "vfnmadd_masked"); 2786 } 2787 2788 public static final String VFNMSB_MASKED = PREFIX + "VFNMSB_MASKED" + POSTFIX; 2789 static { 2790 machOnlyNameRegex(VFNMSB_MASKED, "vfnmsb_masked"); 2791 } 2792 2793 public static final String RISCV_VFMSUB_MASKED = PREFIX + "RISCV_VFMSUB_MASKED" + POSTFIX; 2794 static { 2795 machOnlyNameRegex(RISCV_VFMSUB_MASKED, "vfmsub_masked"); 2796 } 2797 2798 public static final String VFMAD_MASKED = PREFIX + "VFMAD_MASKED" + POSTFIX; 2799 static { 2800 machOnlyNameRegex(VFMAD_MASKED, "vfmad_masked"); 2801 } 2802 2803 public static final String RISCV_VFMADD_MASKED = PREFIX + "RISCV_VFMADD_MASKED" + POSTFIX; 2804 static { 2805 machOnlyNameRegex(RISCV_VFMADD_MASKED, "vfmadd_masked"); 2806 } 2807 2808 public static final String VMASK_AND_NOT_I = PREFIX + "VMASK_AND_NOT_I" + POSTFIX; 2809 static { 2810 machOnlyNameRegex(VMASK_AND_NOT_I, "vmask_and_notI"); 2811 } 2812 2813 public static final String VMASK_AND_NOT_L = PREFIX + "VMASK_AND_NOT_L" + POSTFIX; 2814 static { 2815 machOnlyNameRegex(VMASK_AND_NOT_L, "vmask_and_notL"); 2816 } 2817 2818 public static final String VMLA = PREFIX + "VMLA" + POSTFIX; 2819 static { 2820 machOnlyNameRegex(VMLA, "vmla"); 2821 } 2822 2823 public static final String VMLA_MASKED = PREFIX + "VMLA_MASKED" + POSTFIX; 2824 static { 2825 machOnlyNameRegex(VMLA_MASKED, "vmla_masked"); 2826 } 2827 2828 public static final String FMSUB = PREFIX + "FMSUB" + POSTFIX; 2829 static { 2830 machOnlyNameRegex(FMSUB, "msub(F|D)_reg_reg"); 2831 } 2832 2833 public static final String FNMADD = PREFIX + "FNMADD" + POSTFIX; 2834 static { 2835 machOnlyNameRegex(FNMADD, "mnadd(F|D)_reg_reg"); 2836 } 2837 2838 public static final String FNMSUB = PREFIX + "FNMSUB" + POSTFIX; 2839 static { 2840 machOnlyNameRegex(FNMSUB, "mnsub(F|D)_reg_reg"); 2841 } 2842 2843 public static final String FMA_F = PREFIX + "FMA_F" + POSTFIX; 2844 static { 2845 beforeMatchingNameRegex(FMA_F, "FmaF"); 2846 } 2847 2848 public static final String FMA_D = PREFIX + "FMA_D" + POSTFIX; 2849 static { 2850 beforeMatchingNameRegex(FMA_D, "FmaD"); 2851 } 2852 2853 public static final String VFMLA = PREFIX + "VFMLA" + POSTFIX; 2854 static { 2855 machOnlyNameRegex(VFMLA, "vfmla"); 2856 } 2857 2858 public static final String VFMLS = PREFIX + "VFMLS" + POSTFIX; 2859 static { 2860 machOnlyNameRegex(VFMLS, "vfmls"); 2861 } 2862 2863 public static final String VFNMLA = PREFIX + "VFNMLA" + POSTFIX; 2864 static { 2865 machOnlyNameRegex(VFNMLA, "vfnmla"); 2866 } 2867 2868 public static final String VMLS = PREFIX + "VMLS" + POSTFIX; 2869 static { 2870 machOnlyNameRegex(VMLS, "vmls"); 2871 } 2872 2873 public static final String VMLS_MASKED = PREFIX + "VMLS_MASKED" + POSTFIX; 2874 static { 2875 machOnlyNameRegex(VMLS_MASKED, "vmls_masked"); 2876 } 2877 2878 public static final String VMASK_CMP_ZERO_I_NEON = PREFIX + "VMASK_CMP_ZERO_I_NEON" + POSTFIX; 2879 static { 2880 machOnlyNameRegex(VMASK_CMP_ZERO_I_NEON, "vmaskcmp_zeroI_neon"); 2881 } 2882 2883 public static final String VMASK_CMP_ZERO_L_NEON = PREFIX + "VMASK_CMP_ZERO_L_NEON" + POSTFIX; 2884 static { 2885 machOnlyNameRegex(VMASK_CMP_ZERO_L_NEON, "vmaskcmp_zeroL_neon"); 2886 } 2887 2888 public static final String VMASK_CMP_ZERO_F_NEON = PREFIX + "VMASK_CMP_ZERO_F_NEON" + POSTFIX; 2889 static { 2890 machOnlyNameRegex(VMASK_CMP_ZERO_F_NEON, "vmaskcmp_zeroF_neon"); 2891 } 2892 2893 public static final String VMASK_CMP_ZERO_D_NEON = PREFIX + "VMASK_CMP_ZERO_D_NEON" + POSTFIX; 2894 static { 2895 machOnlyNameRegex(VMASK_CMP_ZERO_D_NEON, "vmaskcmp_zeroD_neon"); 2896 } 2897 2898 public static final String VMASK_CMP_IMM_I_SVE = PREFIX + "VMASK_CMP_IMM_I_SVE" + POSTFIX; 2899 static { 2900 machOnlyNameRegex(VMASK_CMP_IMM_I_SVE, "vmaskcmp_immI_sve"); 2901 } 2902 2903 public static final String VMASK_CMPU_IMM_I_SVE = PREFIX + "VMASK_CMPU_IMM_I_SVE" + POSTFIX; 2904 static { 2905 machOnlyNameRegex(VMASK_CMPU_IMM_I_SVE, "vmaskcmpU_immI_sve"); 2906 } 2907 2908 public static final String VMASK_CMP_IMM_L_SVE = PREFIX + "VMASK_CMP_IMM_L_SVE" + POSTFIX; 2909 static { 2910 machOnlyNameRegex(VMASK_CMP_IMM_L_SVE, "vmaskcmp_immL_sve"); 2911 } 2912 2913 public static final String VMASK_CMPU_IMM_L_SVE = PREFIX + "VMASK_CMPU_IMM_L_SVE" + POSTFIX; 2914 static { 2915 machOnlyNameRegex(VMASK_CMPU_IMM_L_SVE, "vmaskcmpU_immL_sve"); 2916 } 2917 2918 public static final String VNOT_I_MASKED = PREFIX + "VNOT_I_MASKED" + POSTFIX; 2919 static { 2920 machOnlyNameRegex(VNOT_I_MASKED, "vnotI_masked"); 2921 } 2922 2923 public static final String VNOT_L_MASKED = PREFIX + "VNOT_L_MASKED" + POSTFIX; 2924 static { 2925 machOnlyNameRegex(VNOT_L_MASKED, "vnotL_masked"); 2926 } 2927 2928 public static final String VSTOREMASK_TRUECOUNT = PREFIX + "VSTOREMASK_TRUECOUNT" + POSTFIX; 2929 static { 2930 machOnlyNameRegex(VSTOREMASK_TRUECOUNT, "vstoremask_truecount_neon"); 2931 } 2932 2933 public static final String X86_VMULUDQ_REG = PREFIX + "X86_VMULUDQ_REG" + POSTFIX; 2934 static { 2935 machOnlyNameRegex(X86_VMULUDQ_REG, "vmuludq_reg"); 2936 } 2937 2938 public static final String X86_VMULDQ_REG = PREFIX + "X86_VMULDQ_REG" + POSTFIX; 2939 static { 2940 machOnlyNameRegex(X86_VMULDQ_REG, "vmuldq_reg"); 2941 } 2942 2943 public static final String AARCH64_VMULL_UINT_SVE2 = PREFIX + "AARCH64_VMULL_UINT_SVE2" + POSTFIX; 2944 static { 2945 machOnlyNameRegex(AARCH64_VMULL_UINT_SVE2, "vmulL_uint_sve2"); 2946 } 2947 2948 public static final String AARCH64_VMULL_INT_SVE2 = PREFIX + "AARCH64_VMULL_INT_SVE2" + POSTFIX; 2949 static { 2950 machOnlyNameRegex(AARCH64_VMULL_INT_SVE2, "vmulL_int_sve2"); 2951 } 2952 2953 public static final String AARCH64_VMULL_UINT_NEON = PREFIX + "AARCH64_VMULL_UINT_NEON" + POSTFIX; 2954 static { 2955 machOnlyNameRegex(AARCH64_VMULL_UINT_NEON, "vmulL_uint_neon"); 2956 } 2957 2958 public static final String AARCH64_VMULL_INT_NEON = PREFIX + "AARCH64_VMULL_INT_NEON" + POSTFIX; 2959 static { 2960 machOnlyNameRegex(AARCH64_VMULL_INT_NEON, "vmulL_int_neon"); 2961 } 2962 2963 public static final String X86_SCONV_D2I = PREFIX + "X86_SCONV_D2I" + POSTFIX; 2964 static { 2965 machOnlyNameRegex(X86_SCONV_D2I, "convD2I_reg_reg"); 2966 } 2967 2968 public static final String X86_SCONV_D2L = PREFIX + "X86_SCONV_D2L" + POSTFIX; 2969 static { 2970 machOnlyNameRegex(X86_SCONV_D2L, "convD2L_reg_reg"); 2971 } 2972 2973 public static final String X86_SCONV_F2I = PREFIX + "X86_SCONV_F2I" + POSTFIX; 2974 static { 2975 machOnlyNameRegex(X86_SCONV_F2I, "convF2I_reg_reg"); 2976 } 2977 2978 public static final String X86_SCONV_F2L = PREFIX + "X86_SCONV_F2L" + POSTFIX; 2979 static { 2980 machOnlyNameRegex(X86_SCONV_F2L, "convF2L_reg_reg"); 2981 } 2982 2983 public static final String X86_SCONV_D2I_AVX10_2 = PREFIX + "X86_SCONV_D2I_AVX10_2" + POSTFIX; 2984 static { 2985 machOnlyNameRegex(X86_SCONV_D2I_AVX10_2, "convD2I_(reg_reg|reg_mem)_avx10_2"); 2986 } 2987 2988 public static final String X86_SCONV_D2L_AVX10_2 = PREFIX + "X86_SCONV_D2L_AVX10_2" + POSTFIX; 2989 static { 2990 machOnlyNameRegex(X86_SCONV_D2L_AVX10_2, "convD2L_(reg_reg|reg_mem)_avx10_2"); 2991 } 2992 2993 public static final String X86_SCONV_F2I_AVX10_2 = PREFIX + "X86_SCONV_F2I_AVX10_2" + POSTFIX; 2994 static { 2995 machOnlyNameRegex(X86_SCONV_F2I_AVX10_2, "convF2I_(reg_reg|reg_mem)_avx10_2"); 2996 } 2997 2998 public static final String X86_SCONV_F2L_AVX10_2 = PREFIX + "X86_SCONV_F2L_AVX10_2" + POSTFIX; 2999 static { 3000 machOnlyNameRegex(X86_SCONV_F2L_AVX10_2, "convF2L_(reg_reg|reg_mem)_avx10_2"); 3001 } 3002 3003 public static final String X86_VCAST_F2X = PREFIX + "X86_VCAST_F2X" + POSTFIX; 3004 static { 3005 machOnlyNameRegex(X86_VCAST_F2X, "castFtoX_reg_(av|eve)x"); 3006 } 3007 3008 public static final String X86_VCAST_D2X = PREFIX + "X86_VCAST_D2X" + POSTFIX; 3009 static { 3010 machOnlyNameRegex(X86_VCAST_D2X, "castDtoX_reg_(av|eve)x"); 3011 } 3012 3013 public static final String X86_VCAST_F2X_AVX10_2 = PREFIX + "X86_VCAST_F2X_AVX10_2" + POSTFIX; 3014 static { 3015 machOnlyNameRegex(X86_VCAST_F2X_AVX10_2, "castFtoX_(reg|mem)_avx10_2"); 3016 } 3017 3018 public static final String X86_VCAST_D2X_AVX10_2 = PREFIX + "X86_VCAST_D2X_AVX10_2" + POSTFIX; 3019 static { 3020 machOnlyNameRegex(X86_VCAST_D2X_AVX10_2, "castDtoX_(reg|mem)_avx10_2"); 3021 } 3022 3023 public static final String XOR = PREFIX + "XOR" + POSTFIX; 3024 static { 3025 beforeMatchingNameRegex(XOR, "Xor(I|L)"); 3026 } 3027 3028 public static final String XOR_I = PREFIX + "XOR_I" + POSTFIX; 3029 static { 3030 beforeMatchingNameRegex(XOR_I, "XorI"); 3031 } 3032 3033 public static final String XOR_L = PREFIX + "XOR_L" + POSTFIX; 3034 static { 3035 beforeMatchingNameRegex(XOR_L, "XorL"); 3036 } 3037 3038 public static final String XOR_VB = VECTOR_PREFIX + "XOR_VB" + POSTFIX; 3039 static { 3040 vectorNode(XOR_VB, "XorV", TYPE_BYTE); 3041 } 3042 3043 public static final String XOR_VS = VECTOR_PREFIX + "XOR_VS" + POSTFIX; 3044 static { 3045 vectorNode(XOR_VS, "XorV", TYPE_SHORT); 3046 } 3047 3048 public static final String XOR_VI = VECTOR_PREFIX + "XOR_VI" + POSTFIX; 3049 static { 3050 vectorNode(XOR_VI, "XorV", TYPE_INT); 3051 } 3052 3053 public static final String XOR_VL = VECTOR_PREFIX + "XOR_VL" + POSTFIX; 3054 static { 3055 vectorNode(XOR_VL, "XorV", TYPE_LONG); 3056 } 3057 3058 public static final String XOR_V = PREFIX + "XOR_V" + POSTFIX; 3059 static { 3060 beforeMatchingNameRegex(XOR_V, "XorV"); 3061 } 3062 3063 public static final String XOR_V_MASK = PREFIX + "XOR_V_MASK" + POSTFIX; 3064 static { 3065 beforeMatchingNameRegex(XOR_V_MASK, "XorVMask"); 3066 } 3067 3068 public static final String XOR_REDUCTION_V = PREFIX + "XOR_REDUCTION_V" + POSTFIX; 3069 static { 3070 superWordNodes(XOR_REDUCTION_V, "XorReductionV"); 3071 } 3072 3073 public static final String XOR3_NEON = PREFIX + "XOR3_NEON" + POSTFIX; 3074 static { 3075 machOnlyNameRegex(XOR3_NEON, "veor3_neon"); 3076 } 3077 3078 public static final String XOR3_SVE = PREFIX + "XOR3_SVE" + POSTFIX; 3079 static { 3080 machOnlyNameRegex(XOR3_SVE, "veor3_sve"); 3081 } 3082 3083 public static final String COMPRESS_BITS_VI = VECTOR_PREFIX + "COMPRESS_BITS_VI" + POSTFIX; 3084 static { 3085 vectorNode(COMPRESS_BITS_VI, "CompressBitsV", TYPE_INT); 3086 } 3087 3088 public static final String COMPRESS_BITS_VL = VECTOR_PREFIX + "COMPRESS_BITS_VL" + POSTFIX; 3089 static { 3090 vectorNode(COMPRESS_BITS_VL, "CompressBitsV", TYPE_LONG); 3091 } 3092 3093 public static final String EXPAND_BITS_VI = VECTOR_PREFIX + "EXPAND_BITS_VI" + POSTFIX; 3094 static { 3095 vectorNode(EXPAND_BITS_VI, "ExpandBitsV", TYPE_INT); 3096 } 3097 3098 public static final String EXPAND_BITS_VL = VECTOR_PREFIX + "EXPAND_BITS_VL" + POSTFIX; 3099 static { 3100 vectorNode(EXPAND_BITS_VL, "ExpandBitsV", TYPE_LONG); 3101 } 3102 3103 public static final String COMPRESS_VB = VECTOR_PREFIX + "COMPRESS_VB" + POSTFIX; 3104 static { 3105 vectorNode(COMPRESS_VB, "CompressV", TYPE_BYTE); 3106 } 3107 3108 public static final String COMPRESS_VS = VECTOR_PREFIX + "COMPRESS_VS" + POSTFIX; 3109 static { 3110 vectorNode(COMPRESS_VS, "CompressV", TYPE_SHORT); 3111 } 3112 3113 public static final String COMPRESS_VI = VECTOR_PREFIX + "COMPRESS_VI" + POSTFIX; 3114 static { 3115 vectorNode(COMPRESS_VI, "CompressV", TYPE_INT); 3116 } 3117 3118 public static final String COMPRESS_VL = VECTOR_PREFIX + "COMPRESS_VL" + POSTFIX; 3119 static { 3120 vectorNode(COMPRESS_VL, "CompressV", TYPE_LONG); 3121 } 3122 3123 public static final String COMPRESS_VF = VECTOR_PREFIX + "COMPRESS_VF" + POSTFIX; 3124 static { 3125 vectorNode(COMPRESS_VF, "CompressV", TYPE_FLOAT); 3126 } 3127 3128 public static final String COMPRESS_VD = VECTOR_PREFIX + "COMPRESS_VD" + POSTFIX; 3129 static { 3130 vectorNode(COMPRESS_VD, "CompressV", TYPE_DOUBLE); 3131 } 3132 3133 public static final String EXPAND_VB = VECTOR_PREFIX + "EXPAND_VB" + POSTFIX; 3134 static { 3135 vectorNode(EXPAND_VB, "ExpandV", TYPE_BYTE); 3136 } 3137 3138 public static final String EXPAND_VS = VECTOR_PREFIX + "EXPAND_VS" + POSTFIX; 3139 static { 3140 vectorNode(EXPAND_VS, "ExpandV", TYPE_SHORT); 3141 } 3142 3143 public static final String EXPAND_VI = VECTOR_PREFIX + "EXPAND_VI" + POSTFIX; 3144 static { 3145 vectorNode(EXPAND_VI, "ExpandV", TYPE_INT); 3146 } 3147 3148 public static final String EXPAND_VL = VECTOR_PREFIX + "EXPAND_VL" + POSTFIX; 3149 static { 3150 vectorNode(EXPAND_VL, "ExpandV", TYPE_LONG); 3151 } 3152 3153 public static final String EXPAND_VF = VECTOR_PREFIX + "EXPAND_VF" + POSTFIX; 3154 static { 3155 vectorNode(EXPAND_VF, "ExpandV", TYPE_FLOAT); 3156 } 3157 3158 public static final String EXPAND_VD = VECTOR_PREFIX + "EXPAND_VD" + POSTFIX; 3159 static { 3160 vectorNode(EXPAND_VD, "ExpandV", TYPE_DOUBLE); 3161 } 3162 3163 public static final String Z_LOAD_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_LOAD_P_WITH_BARRIER_FLAG" + POSTFIX; 3164 static { 3165 String regex = START + "zLoadP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 3166 machOnly(Z_LOAD_P_WITH_BARRIER_FLAG, regex); 3167 } 3168 3169 public static final String Z_STORE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_STORE_P_WITH_BARRIER_FLAG" + POSTFIX; 3170 static { 3171 String regex = START + "zStoreP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 3172 machOnly(Z_STORE_P_WITH_BARRIER_FLAG, regex); 3173 } 3174 3175 public static final String Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG" + POSTFIX; 3176 static { 3177 String regex = START + "zCompareAndSwapP" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 3178 machOnly(Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, regex); 3179 } 3180 3181 public static final String Z_GET_AND_SET_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_GET_AND_SET_P_WITH_BARRIER_FLAG" + POSTFIX; 3182 static { 3183 String regex = START + "(zXChgP)|(zGetAndSetP\\S*)" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 3184 machOnly(Z_GET_AND_SET_P_WITH_BARRIER_FLAG, regex); 3185 } 3186 3187 public static final String X86_LOCK_ADDB_REG = PREFIX + "X86_LOCK_ADDB_REG" + POSTFIX; 3188 static { 3189 machOnlyNameRegex(X86_LOCK_ADDB_REG, "xaddB_reg_no_res"); 3190 } 3191 3192 public static final String X86_LOCK_ADDB_IMM = PREFIX + "X86_LOCK_ADDB_IMM" + POSTFIX; 3193 static { 3194 machOnlyNameRegex(X86_LOCK_ADDB_IMM, "xaddB_imm_no_res"); 3195 } 3196 3197 public static final String X86_LOCK_XADDB = PREFIX + "X86_LOCK_XADDB" + POSTFIX; 3198 static { 3199 machOnlyNameRegex(X86_LOCK_XADDB, "xaddB"); 3200 } 3201 3202 public static final String X86_LOCK_ADDS_REG = PREFIX + "X86_LOCK_ADDS_REG" + POSTFIX; 3203 static { 3204 machOnlyNameRegex(X86_LOCK_ADDS_REG, "xaddS_reg_no_res"); 3205 } 3206 3207 public static final String X86_LOCK_ADDS_IMM = PREFIX + "X86_LOCK_ADDS_IMM" + POSTFIX; 3208 static { 3209 machOnlyNameRegex(X86_LOCK_ADDS_IMM, "xaddS_imm_no_res"); 3210 } 3211 3212 public static final String X86_LOCK_XADDS = PREFIX + "X86_LOCK_XADDS" + POSTFIX; 3213 static { 3214 machOnlyNameRegex(X86_LOCK_XADDS, "xaddS"); 3215 } 3216 3217 public static final String X86_LOCK_ADDI_REG = PREFIX + "X86_LOCK_ADDI_REG" + POSTFIX; 3218 static { 3219 machOnlyNameRegex(X86_LOCK_ADDI_REG, "xaddI_reg_no_res"); 3220 } 3221 3222 public static final String X86_LOCK_ADDI_IMM = PREFIX + "X86_LOCK_ADDI_IMM" + POSTFIX; 3223 static { 3224 machOnlyNameRegex(X86_LOCK_ADDI_IMM, "xaddI_imm_no_res"); 3225 } 3226 3227 public static final String X86_LOCK_XADDI = PREFIX + "X86_LOCK_XADDI" + POSTFIX; 3228 static { 3229 machOnlyNameRegex(X86_LOCK_XADDI, "xaddI"); 3230 } 3231 3232 public static final String X86_LOCK_ADDL_REG = PREFIX + "X86_LOCK_ADDL_REG" + POSTFIX; 3233 static { 3234 machOnlyNameRegex(X86_LOCK_ADDL_REG, "xaddL_reg_no_res"); 3235 } 3236 3237 public static final String X86_LOCK_ADDL_IMM = PREFIX + "X86_LOCK_ADDL_IMM" + POSTFIX; 3238 static { 3239 machOnlyNameRegex(X86_LOCK_ADDL_IMM, "xaddL_imm_no_res"); 3240 } 3241 3242 public static final String X86_LOCK_XADDL = PREFIX + "X86_LOCK_XADDL" + POSTFIX; 3243 static { 3244 machOnlyNameRegex(X86_LOCK_XADDL, "xaddL"); 3245 } 3246 3247 public static final String X86_TESTI_REG = PREFIX + "X86_TESTI_REG" + POSTFIX; 3248 static { 3249 machOnlyNameRegex(X86_TESTI_REG, "testI_reg"); 3250 } 3251 3252 public static final String X86_TESTL_REG = PREFIX + "X86_TESTL_REG" + POSTFIX; 3253 static { 3254 machOnlyNameRegex(X86_TESTL_REG, "testL_reg"); 3255 } 3256 3257 public static final String X86_CMOVEL_IMM01 = PREFIX + "X86_CMOVEL_IMM01" + POSTFIX; 3258 static { 3259 machOnlyNameRegex(X86_CMOVEL_IMM01, "cmovL_imm_01"); 3260 } 3261 3262 public static final String X86_CMOVEL_IMM01U = PREFIX + "X86_CMOVEL_IMM01U" + POSTFIX; 3263 static { 3264 machOnlyNameRegex(X86_CMOVEL_IMM01U, "cmovL_imm_01U"); 3265 } 3266 3267 public static final String X86_CMOVEL_IMM01UCF = PREFIX + "X86_CMOVEL_IMM01UCF" + POSTFIX; 3268 static { 3269 machOnlyNameRegex(X86_CMOVEL_IMM01UCF, "cmovL_imm_01UCF"); 3270 } 3271 3272 public static final String X86_CMOVEL_IMM01UCFE = PREFIX + "X86_CMOVEL_IMM01UCFE" + POSTFIX; 3273 static { 3274 machOnlyNameRegex(X86_CMOVEL_IMM01UCFE, "cmovL_imm_01UCFE"); 3275 } 3276 3277 public static final String MOD_F = PREFIX + "MOD_F" + POSTFIX; 3278 static { 3279 String regex = START + "ModF" + MID + END; 3280 macroNodes(MOD_F, regex); 3281 } 3282 3283 public static final String MOD_D = PREFIX + "MOD_D" + POSTFIX; 3284 static { 3285 String regex = START + "ModD" + MID + END; 3286 macroNodes(MOD_D, regex); 3287 } 3288 3289 public static final String POW_D = PREFIX + "POW_D" + POSTFIX; 3290 static { 3291 String regex = START + "PowD" + MID + END; 3292 macroNodes(POW_D, regex); 3293 } 3294 3295 public static final String BLACKHOLE = PREFIX + "BLACKHOLE" + POSTFIX; 3296 static { 3297 fromBeforeRemoveUselessToFinalCode(BLACKHOLE, "Blackhole"); 3298 } 3299 3300 public static final String REACHABILITY_FENCE = PREFIX + "REACHABILITY_FENCE" + POSTFIX; 3301 static { 3302 fromBeforeRemoveUselessToFinalCode(REACHABILITY_FENCE, "ReachabilityFence"); 3303 } 3304 3305 public static final String SELECT_FROM_TWO_VECTOR_VB = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VB" + POSTFIX; 3306 static { 3307 vectorNode(SELECT_FROM_TWO_VECTOR_VB, "SelectFromTwoVector", TYPE_BYTE); 3308 } 3309 3310 public static final String SELECT_FROM_TWO_VECTOR_VS = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VS" + POSTFIX; 3311 static { 3312 vectorNode(SELECT_FROM_TWO_VECTOR_VS, "SelectFromTwoVector", TYPE_SHORT); 3313 } 3314 3315 public static final String SELECT_FROM_TWO_VECTOR_VI = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VI" + POSTFIX; 3316 static { 3317 vectorNode(SELECT_FROM_TWO_VECTOR_VI, "SelectFromTwoVector", TYPE_INT); 3318 } 3319 3320 public static final String SELECT_FROM_TWO_VECTOR_VF = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VF" + POSTFIX; 3321 static { 3322 vectorNode(SELECT_FROM_TWO_VECTOR_VF, "SelectFromTwoVector", TYPE_FLOAT); 3323 } 3324 3325 public static final String SELECT_FROM_TWO_VECTOR_VD = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VD" + POSTFIX; 3326 static { 3327 vectorNode(SELECT_FROM_TWO_VECTOR_VD, "SelectFromTwoVector", TYPE_DOUBLE); 3328 } 3329 3330 public static final String SELECT_FROM_TWO_VECTOR_VL = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VL" + POSTFIX; 3331 static { 3332 vectorNode(SELECT_FROM_TWO_VECTOR_VL, "SelectFromTwoVector", TYPE_LONG); 3333 } 3334 3335 public static final String REPLICATE_HF = PREFIX + "REPLICATE_HF" + POSTFIX; 3336 static { 3337 machOnlyNameRegex(REPLICATE_HF, "replicateHF"); 3338 } 3339 3340 public static final String REPLICATE_HF_IMM8 = PREFIX + "REPLICATE_HF_IMM8" + POSTFIX; 3341 static { 3342 machOnlyNameRegex(REPLICATE_HF_IMM8, "replicateHF_imm8_gt128b"); 3343 } 3344 3345 public static final String OPAQUE_CONSTANT_BOOL = PREFIX + "OPAQUE_CONSTANT_BOOL" + POSTFIX; 3346 static { 3347 beforeMatchingNameRegex(OPAQUE_CONSTANT_BOOL, "OpaqueConstantBool"); 3348 } 3349 3350 /* 3351 * Utility methods to set up IR_NODE_MAPPINGS. 3352 */ 3353 3354 /** 3355 * Apply {@code regex} on all machine independent ideal graph phases up to and including 3356 * {@link CompilePhase#BEFORE_MATCHING}. 3357 */ 3358 public static void beforeMatching(String irNodePlaceholder, String regex) { 3359 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex)); 3360 } 3361 3362 /** 3363 * Apply {@code irNodeRegex} as regex for the IR node name on all machine independent ideal graph phases up to and 3364 * including {@link CompilePhase#BEFORE_MATCHING}. 3365 */ 3366 private static void beforeMatchingNameRegex(String irNodePlaceholder, String irNodeRegex) { 3367 String regex = START + irNodeRegex + MID + END; 3368 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex)); 3369 } 3370 3371 /** 3372 * Apply {@code irNodeRegex} as regex for the IR vector node name on all machine independent ideal graph phases up to and 3373 * including {@link CompilePhase#BEFORE_MATCHING}. Since this is a vector node, we can also check the vector element 3374 * type {@code typeString} and the vector size (number of elements), {@see VECTOR_SIZE}. 3375 */ 3376 private static void vectorNode(String irNodePlaceholder, String irNodeRegex, String typeString) { 3377 TestFramework.check(isVectorIRNode(irNodePlaceholder), "vectorNode: failed prefix check for irNodePlaceholder " 3378 + irNodePlaceholder + " -> did you use VECTOR_PREFIX?"); 3379 // IS_REPLACED is later replaced with the specific type and size of the vector. 3380 String regex = START + irNodeRegex + MID + IS_REPLACED + END; 3381 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex)); 3382 VECTOR_NODE_TYPE.put(irNodePlaceholder, typeString); 3383 } 3384 3385 /** 3386 * Apply {@code regex} on all ideal graph phases up to and including {@link CompilePhase#BEFORE_MACRO_EXPANSION}. 3387 */ 3388 private static void macroNodes(String irNodePlaceholder, String regex) { 3389 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.BEFORE_MACRO_EXPANSION, regex, 3390 CompilePhase.BEFORE_STRINGOPTS, 3391 CompilePhase.BEFORE_MACRO_EXPANSION)); 3392 } 3393 3394 private static void callOfNodes(String irNodePlaceholder, String callRegex, String calleeRegex) { 3395 String regex = START + callRegex + MID + calleeRegex + END; 3396 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex)); 3397 } 3398 3399 /** 3400 * Apply {@code regex} on all machine dependant ideal graph phases (i.e. on the mach graph) starting from 3401 * {@link CompilePhase#MATCHING}. 3402 */ 3403 public static void optoOnly(String irNodePlaceholder, String regex) { 3404 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.OPTO_ASSEMBLY, regex)); 3405 } 3406 3407 private static void machOnly(String irNodePlaceholder, String regex) { 3408 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex)); 3409 } 3410 3411 private static void machOnlyNameRegex(String irNodePlaceholder, String irNodeRegex) { 3412 String regex = START + irNodeRegex + MID + END; 3413 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex)); 3414 } 3415 3416 /** 3417 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#AFTER_CLOOPS}. 3418 */ 3419 private static void fromAfterCountedLoops(String irNodePlaceholder, String regex) { 3420 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 3421 CompilePhase.AFTER_CLOOPS, 3422 CompilePhase.FINAL_CODE)); 3423 } 3424 3425 /** 3426 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS}. 3427 */ 3428 private static void fromBeforeCountedLoops(String irNodePlaceholder, String regex) { 3429 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 3430 CompilePhase.BEFORE_CLOOPS, 3431 CompilePhase.FINAL_CODE)); 3432 } 3433 3434 /** 3435 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS} up to and 3436 * including {@link CompilePhase#BEFORE_MATCHING} 3437 */ 3438 private static void fromMacroToBeforeMatching(String irNodePlaceholder, String regex) { 3439 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 3440 CompilePhase.AFTER_MACRO_EXPANSION, 3441 CompilePhase.BEFORE_MATCHING)); 3442 } 3443 3444 /** 3445 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS} up to and 3446 * including {@link CompilePhase#BEFORE_MATCHING} 3447 */ 3448 private static void afterBarrierExpansionToBeforeMatching(String irNodePlaceholder, String regex) { 3449 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 3450 CompilePhase.OPTIMIZE_FINISHED, 3451 CompilePhase.BEFORE_MATCHING)); 3452 } 3453 3454 /** 3455 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_LOOP_OPTS} 3456 * up to and including {@link CompilePhase#AFTER_LOOP_OPTS}. 3457 */ 3458 private static void duringLoopOpts(String irNodePlaceholder, String regex) { 3459 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.AFTER_LOOP_OPTS, regex, 3460 CompilePhase.BEFORE_LOOP_OPTS, 3461 CompilePhase.AFTER_LOOP_OPTS)); 3462 } 3463 3464 private static void trapNodes(String irNodePlaceholder, String trapReason) { 3465 String regex = START + "CallStaticJava" + MID + "uncommon_trap.*" + trapReason + END; 3466 beforeMatching(irNodePlaceholder, regex); 3467 } 3468 3469 private static void parsePredicateNodes(String irNodePlaceholder, String label) { 3470 String regex = START + "ParsePredicate" + MID + "#" + label + " " + END; 3471 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.AFTER_PARSING, regex, 3472 CompilePhase.AFTER_PARSING, 3473 CompilePhase.AFTER_LOOP_OPTS)); 3474 } 3475 3476 // Typename in load/store have the structure: 3477 // @ptrtype:fully/qualified/package/name/to/TheClass:ptrlattice+12 3478 // with ptrtype being the kind of the type such as instptr, aryptr, etc, and ptrlattice being 3479 // the kind of the value such as BotPTR, NotNull, etc. 3480 // And variation: 3481 // - after ptrtype, we can have "stable:" or other labels, with optional space after ':' 3482 // - the class can actually be a nested class, with $ separator (and it must be ok to give only the deepest one 3483 // - after the class name, we can have a comma-separated list of implemented interfaces enclosed in parentheses 3484 // Worst case, it can be something like: 3485 // @bla: bli:a/b/c$d$e (f/g,h/i/j):NotNull+24 3486 3487 // @ matches the start character of the pattern 3488 // (\w+: ?)+ tries to match the pattern 'ptrtype:' or 'stable:' with optional trailing whitespaces 3489 // [\\w/\\$] tries to match the pattern such as 'a/b/', 'a/b', or '/b' but also nested class such as '$c' or '$c$d' 3490 // \b asserts that the next character is a word character 3491 private static final String LOAD_STORE_PREFIX = "@(\\w+: ?)+[\\w/\\$]*\\b"; 3492 // ( \([^\)]+\))? tries to match the pattern ' (f/g,h/i/j)' 3493 // :\w+ tries to match the pattern ':NotNull' 3494 // .* tries to match the remaining of the pattern 3495 private static final String LOAD_STORE_SUFFIX = "( \\([^\\)]+\\))?:\\w+.*"; 3496 3497 private static void loadOfNodes(String irNodePlaceholder, String irNodeRegex, String loadee) { 3498 String regex = START + irNodeRegex + MID + LOAD_STORE_PREFIX + loadee + LOAD_STORE_SUFFIX + END; 3499 beforeMatching(irNodePlaceholder, regex); 3500 } 3501 3502 private static void storeOfNodes(String irNodePlaceholder, String irNodeRegex, String storee) { 3503 String regex = START + irNodeRegex + MID + LOAD_STORE_PREFIX + storee + LOAD_STORE_SUFFIX + END; 3504 beforeMatching(irNodePlaceholder, regex); 3505 } 3506 3507 private static void safepointScalarobjectOfNodes(String irNodePlaceholder, String irNodeRegex) { 3508 String regex = START + irNodeRegex + MID + ".*" + IS_REPLACED + ".*" + END; 3509 beforeMatching(irNodePlaceholder, regex); 3510 } 3511 3512 private static void fromBeforeRemoveUselessToFinalCode(String irNodePlaceholder, String irNodeRegex) { 3513 String regex = START + irNodeRegex + MID + END; 3514 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 3515 CompilePhase.BEFORE_REMOVEUSELESS, 3516 CompilePhase.FINAL_CODE)); 3517 } 3518 3519 /** 3520 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#PHASEIDEALLOOP1} which is the 3521 * first phase that could contain vector nodes from super word. 3522 */ 3523 private static void superWordNodes(String irNodePlaceholder, String irNodeRegex) { 3524 String regex = START + irNodeRegex + MID + END; 3525 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 3526 CompilePhase.PHASEIDEALLOOP1, 3527 CompilePhase.BEFORE_MATCHING)); 3528 } 3529 3530 3531 /* 3532 * Methods used internally by the IR framework. 3533 */ 3534 3535 /** 3536 * Is {@code irNodeString} an IR node placeholder string? 3537 */ 3538 public static boolean isIRNode(String irNodeString) { 3539 return irNodeString.startsWith(PREFIX); 3540 } 3541 3542 /** 3543 * Is {@code irCompositeNodeString} an IR composite node placeholder string? 3544 */ 3545 public static boolean isCompositeIRNode(String irCompositeNodeString) { 3546 return irCompositeNodeString.startsWith(COMPOSITE_PREFIX); 3547 } 3548 3549 /** 3550 * Is {@code irVectorNodeString} an IR vector node placeholder string? 3551 */ 3552 public static boolean isVectorIRNode(String irVectorNodeString) { 3553 return irVectorNodeString.startsWith(VECTOR_PREFIX); 3554 } 3555 3556 /** 3557 * Is {@code irVectorSizeString} a vector size string? 3558 */ 3559 public static boolean isVectorSize(String irVectorSizeString) { 3560 return irVectorSizeString.startsWith(VECTOR_SIZE); 3561 } 3562 3563 /** 3564 * Parse {@code sizeString} and generate a regex pattern to match for the size in the IR dump. 3565 */ 3566 public static String parseVectorNodeSize(String sizeString, String typeString, VMInfo vmInfo) { 3567 if (sizeString.equals(VECTOR_SIZE_TAG_ANY)) { 3568 return "\\\\d+"; // match with any number 3569 } 3570 // Try to parse any tags, convert to comma separated list of ints 3571 sizeString = parseVectorNodeSizeTag(sizeString, typeString, vmInfo); 3572 // Parse comma separated list of numbers 3573 String[] sizes = sizeString.split(","); 3574 String regex = ""; 3575 for (int i = 0; i < sizes.length; i++) { 3576 int size = 0; 3577 try { 3578 size = Integer.parseInt(sizes[i]); 3579 } catch (NumberFormatException e) { 3580 throw new TestFormatException("Vector node has invalid size \"" + sizes[i] + "\", in \"" + sizeString + "\""); 3581 } 3582 TestFormat.checkNoReport(size > 1, "Vector node size must be 2 or larger, but got \"" + sizes[i] + "\", in \"" + sizeString + "\""); 3583 regex += ((i > 0) ? "|" : "") + size; 3584 } 3585 if (sizes.length > 1) { 3586 regex = "(" + regex + ")"; 3587 } 3588 return regex; 3589 } 3590 3591 /** 3592 * If {@code sizeTagString} is a size tag, return the list of accepted sizes, else return sizeTagString. 3593 */ 3594 public static String parseVectorNodeSizeTag(String sizeTagString, String typeString, VMInfo vmInfo) { 3595 // Parse out "min(a,b,c,...)" 3596 if (sizeTagString.startsWith("min(") && sizeTagString.endsWith(")")) { 3597 return parseVectorNodeSizeTagMin(sizeTagString, typeString, vmInfo); 3598 } 3599 3600 // Parse individual tags 3601 return switch (sizeTagString) { 3602 case VECTOR_SIZE_TAG_MAX -> String.valueOf(getMaxElementsForType(typeString, vmInfo)); 3603 case "max_byte" -> String.valueOf(getMaxElementsForType(TYPE_BYTE, vmInfo)); 3604 case "max_char" -> String.valueOf(getMaxElementsForType(TYPE_CHAR, vmInfo)); 3605 case "max_short" -> String.valueOf(getMaxElementsForType(TYPE_SHORT, vmInfo)); 3606 case "max_int" -> String.valueOf(getMaxElementsForType(TYPE_INT, vmInfo)); 3607 case "max_long" -> String.valueOf(getMaxElementsForType(TYPE_LONG, vmInfo)); 3608 case "max_float" -> String.valueOf(getMaxElementsForType(TYPE_FLOAT, vmInfo)); 3609 case "max_double" -> String.valueOf(getMaxElementsForType(TYPE_DOUBLE, vmInfo)); 3610 case "LoopMaxUnroll" -> String.valueOf(vmInfo.getLongValue("LoopMaxUnroll")); 3611 default -> sizeTagString; 3612 }; 3613 } 3614 3615 /** 3616 * Parse {@code sizeTagString}, which must be a min-clause. 3617 */ 3618 public static String parseVectorNodeSizeTagMin(String sizeTagString, String typeString, VMInfo vmInfo) { 3619 String[] tags = sizeTagString.substring(4, sizeTagString.length() - 1).split(","); 3620 TestFormat.checkNoReport(tags.length > 1, "Vector node size \"min(...)\" must have at least 2 comma separated arguments, got \"" + sizeTagString + "\""); 3621 int minVal = 1024; 3622 for (int i = 0; i < tags.length; i++) { 3623 String tag = parseVectorNodeSizeTag(tags[i].trim(), typeString, vmInfo); 3624 int tag_val = 0; 3625 try { 3626 tag_val = Integer.parseInt(tag); 3627 } catch (NumberFormatException e) { 3628 throw new TestFormatException("Vector node has invalid size in \"min(...)\", argument " + i + ", \"" + tag + "\", in \"" + sizeTagString + "\""); 3629 } 3630 minVal = Math.min(minVal, tag_val); 3631 } 3632 return String.valueOf(minVal); 3633 } 3634 3635 /** 3636 * Return maximal number of elements that can fit in a vector of the specified type. 3637 */ 3638 public static long getMaxElementsForType(String typeString, VMInfo vmInfo) { 3639 long maxVectorSize = vmInfo.getLongValue("MaxVectorSize"); 3640 TestFormat.checkNoReport(maxVectorSize > 0, "VMInfo: MaxVectorSize is not larger than zero"); 3641 long maxBytes = maxVectorSize; 3642 3643 if (Platform.isX64() || Platform.isX86()) { 3644 maxBytes = Math.min(maxBytes, getMaxElementsForTypeOnX86(typeString, vmInfo)); 3645 } 3646 3647 // compute elements per vector: vector bytes divided by bytes per element 3648 int bytes = getTypeSizeInBytes(typeString); 3649 return maxBytes / bytes; 3650 } 3651 3652 /** 3653 * Return maximal number of elements that can fit in a vector of the specified type, on x86 / x64. 3654 */ 3655 public static long getMaxElementsForTypeOnX86(String typeString, VMInfo vmInfo) { 3656 // restrict maxBytes for specific features, see Matcher::vector_width_in_bytes in x86.ad: 3657 boolean avx1 = vmInfo.hasCPUFeature("avx"); 3658 boolean avx2 = vmInfo.hasCPUFeature("avx2"); 3659 boolean avx512 = vmInfo.hasCPUFeature("avx512f"); 3660 boolean avx512bw = vmInfo.hasCPUFeature("avx512bw"); 3661 long maxBytes; 3662 if (avx512) { 3663 maxBytes = 64; 3664 } else if (avx2) { 3665 maxBytes = 32; 3666 } else { 3667 maxBytes = 16; 3668 } 3669 if (avx1 && (typeString.equals(TYPE_FLOAT) || typeString.equals(TYPE_DOUBLE))) { 3670 maxBytes = avx512 ? 64 : 32; 3671 } 3672 if (avx512 && (typeString.equals(TYPE_BYTE) || typeString.equals(TYPE_SHORT) || typeString.equals(TYPE_CHAR))) { 3673 maxBytes = avx512bw ? 64 : 32; 3674 } 3675 3676 return maxBytes; 3677 } 3678 3679 /** 3680 * Return size in bytes of type named by {@code typeString}, return 0 if it does not name a type. 3681 */ 3682 public static int getTypeSizeInBytes(String typeString) { 3683 return switch (typeString) { 3684 case TYPE_BYTE, TYPE_BOOLEAN -> 1; 3685 case TYPE_CHAR, TYPE_SHORT -> 2; 3686 case TYPE_INT, TYPE_FLOAT -> 4; 3687 case TYPE_LONG, TYPE_DOUBLE -> 8; 3688 default -> 0; 3689 }; 3690 } 3691 3692 /** 3693 * Returns "IRNode.XYZ", where XYZ is one of the IR node placeholder variable names defined above. 3694 */ 3695 public static String getIRNodeAccessString(String irNodeString) { 3696 int prefixLength; 3697 if (isCompositeIRNode(irNodeString)) { 3698 TestFramework.check(irNodeString.length() > COMPOSITE_PREFIX.length() + POSTFIX.length(), 3699 "Invalid composite node placeholder: " + irNodeString); 3700 prefixLength = COMPOSITE_PREFIX.length(); 3701 } else if (isVectorIRNode(irNodeString)) { 3702 TestFramework.check(irNodeString.length() > VECTOR_PREFIX.length() + POSTFIX.length(), 3703 "Invalid vector node placeholder: " + irNodeString); 3704 prefixLength = VECTOR_PREFIX.length(); 3705 } else { 3706 prefixLength = PREFIX.length(); 3707 } 3708 return "IRNode." + irNodeString.substring(prefixLength, irNodeString.length() - POSTFIX.length()); 3709 } 3710 3711 /** 3712 * Is this IR node supported on current platform, used VM build, etc.? 3713 * Throws a {@link CheckedTestFrameworkException} if the IR node is unsupported. 3714 */ 3715 public static void checkIRNodeSupported(String node) throws CheckedTestFrameworkException { 3716 switch (node) { 3717 case CHECKCAST_ARRAYCOPY -> { 3718 if (Platform.isS390x()) { 3719 throw new CheckedTestFrameworkException("CHECKCAST_ARRAYCOPY is unsupported on s390."); 3720 } 3721 } 3722 case IS_FINITE_D, IS_FINITE_F -> { 3723 if (!Platform.isRISCV64()) { 3724 throw new CheckedTestFrameworkException("IS_FINITE_* is only supported on riscv64."); 3725 } 3726 } 3727 // default: do nothing -> IR node is supported and can be used by the user. 3728 } 3729 } 3730 3731 /** 3732 * Get the regex of an IR node for a specific compile phase. If {@code irNode} is not an IR node placeholder string 3733 * or if there is no regex specified for {@code compilePhase}, a {@link TestFormatException} is reported. 3734 */ 3735 public static String getRegexForCompilePhase(String irNode, CompilePhase compilePhase) { 3736 IRNodeMapEntry entry = IR_NODE_MAPPINGS.get(irNode); 3737 String failMsg = "IR Node \"" + irNode + "\" defined in class IRNode has no regex/compiler phase mapping " + 3738 "(i.e. no static initializer block that adds a mapping entry to IRNode.IR_NODE_MAPPINGS)." + 3739 System.lineSeparator() + 3740 " Have you just created the entry \"" + irNode + "\" in class IRNode and forgot to add a " + 3741 "mapping?" + System.lineSeparator() + 3742 " Violation"; 3743 TestFormat.checkNoReport(entry != null, failMsg); 3744 String regex = entry.regexForCompilePhase(compilePhase); 3745 failMsg = "IR Node \"" + irNode + "\" defined in class IRNode has no regex defined for compile phase " 3746 + compilePhase + "." + System.lineSeparator() + 3747 " If you think this compile phase should be supported, update the mapping for \"" + irNode + 3748 "\" in class IRNode (i.e the static initializer block immediately following the definition of \"" + 3749 irNode + "\")." + System.lineSeparator() + 3750 " Violation"; 3751 TestFormat.checkNoReport(regex != null, failMsg); 3752 return regex; 3753 } 3754 3755 /** 3756 * Get the default phase of an IR node. If {@code irNode} is not an IR node placeholder string, a 3757 * {@link TestFormatException} is reported. 3758 */ 3759 public static CompilePhase getDefaultPhase(String irNode) { 3760 IRNodeMapEntry entry = IR_NODE_MAPPINGS.get(irNode); 3761 String failMsg = "\"" + irNode + "\" is not an IR node defined in class IRNode and " + 3762 "has therefore no default compile phase specified." + System.lineSeparator() + 3763 " If your regex represents a C2 IR node, consider adding an entry to class IRNode together " + 3764 "with a static initializer block that adds a mapping to IRNode.IR_NODE_MAPPINGS." + 3765 System.lineSeparator() + 3766 " Otherwise, set the @IR \"phase\" attribute to a compile phase different from " + 3767 "CompilePhase.DEFAULT to explicitly tell the IR framework on which compile phase your rule" + 3768 " should be applied on." + System.lineSeparator() + 3769 " Violation"; 3770 TestFormat.checkNoReport(entry != null, failMsg); 3771 return entry.defaultCompilePhase(); 3772 } 3773 3774 public static String getVectorNodeType(String irNode) { 3775 String typeString = VECTOR_NODE_TYPE.get(irNode); 3776 String failMsg = "\"" + irNode + "\" is not a Vector IR node defined in class IRNode"; 3777 TestFormat.check(typeString != null, failMsg); 3778 return typeString; 3779 } 3780 } --- EOF ---