1 /* 2 * Copyright (c) 2021, 2025, 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.irmatching.parser.VMInfo; 28 import compiler.lib.ir_framework.shared.CheckedTestFrameworkException; 29 import compiler.lib.ir_framework.shared.TestFormat; 30 import compiler.lib.ir_framework.shared.TestFormatException; 31 import jdk.test.lib.Platform; 32 import jdk.test.whitebox.WhiteBox; 33 34 import java.util.HashMap; 35 import java.util.Map; 36 37 /** 38 * This class specifies IR node placeholder strings (also referred to as just "IR nodes") with mappings to regexes 39 * depending on the selected compile phases. The mappings are stored in {@link #IR_NODE_MAPPINGS}. Each IR node 40 * placeholder string is mapped to a {@link IRNodeMapEntry} instance defined in 41 * {@link compiler.lib.ir_framework.driver.irmatching.mapping}. 42 * 43 * <p> 44 * IR node placeholder strings can be used in {@link IR#failOn()} and/or {@link IR#counts()} attributes to define IR 45 * constraints. They usually represent a single C2 IR node or a group of them. 46 * 47 * <p> 48 * Each IR node placeholder string is accompanied by a static block that defines an IR node placeholder to regex(es) 49 * mapping. The IR framework will automatically replace each IR node placeholder string in a user defined test with a 50 * regex depending on the selected compile phases in {@link IR#phase} and the provided mapping. 51 * 52 * <p> 53 * Each mapping must define a default compile phase which is applied when the user does not explicitly set the 54 * {@link IR#phase()} attribute or when directly using {@link CompilePhase#DEFAULT}. In this case, the IR framework 55 * falls back on the default compile phase of any {@link IRNodeMapEntry}. 56 * 57 * <p> 58 * The IR framework reports a {@link TestFormatException} if: 59 * <ul> 60 * <li><p> A user test specifies a compile phase for which no mapping is defined in this class.</li> 61 * <li><p> An IR node placeholder string is either missing a mapping or does not provide a regex for a specified 62 * compile phase in {@link IR#phase}. 63 * </ul> 64 * 65 * <p> 66 * There are two types of IR nodes: 67 * <ul> 68 * <li><p>Normal IR nodes: The IR node placeholder string is directly replaced by a regex.</li> 69 * <li><p>Composite IR nodes: The IR node placeholder string contains an additional {@link #COMPOSITE_PREFIX}. 70 * Using this IR node expects another user provided string in the constraint list of 71 * {@link IR#failOn()} and {@link IR#counts()}. They cannot be used as normal IR nodes. 72 * Trying to do so will result in a format violation error.</li> 73 * <li><p>Vector IR nodes: The IR node placeholder string contains an additional {@link #VECTOR_PREFIX}. 74 * Using this IR node, one can check for the type and size of a vector. The type must 75 * be directly specified in {@link #vectorNode}. The size can be specified directly with 76 * an additional argument using {@link #VECTOR_SIZE}, followed by a size tag or a comma 77 * separated list of sizes. If the size argument is not given, then a default size of 78 * {@link #VECTOR_SIZE_MAX} is taken, which is the number of elements that can fit in a 79 * vector of the specified type (depends on the VM flag MaxVectorSize and CPU features). 80 * However, when using {@link IR#failOn} or {@link IR#counts()} with comparison {@code <}, 81 * or {@code <=} or {@code =0}, the default size is {@link #VECTOR_SIZE_ANY}, allowing any 82 * size. The motivation for these default values is that in most cases one wants to have 83 * vectorization with maximal vector width, or no vectorization of any vector width. 84 * </ul> 85 */ 86 public class IRNode { 87 /** 88 * Prefix for normal IR nodes. 89 */ 90 private static final String PREFIX = "_#"; 91 /** 92 * Prefix for composite IR nodes. 93 */ 94 private static final String COMPOSITE_PREFIX = PREFIX + "C#"; 95 /** 96 * Prefix for vector IR nodes. 97 */ 98 private static final String VECTOR_PREFIX = PREFIX + "V#"; 99 100 private static final String POSTFIX = "#_"; 101 102 private static final String START = "(\\d+(\\s){2}("; 103 private static final String MID = ".*)+(\\s){2}===.*"; 104 private static final String END = ")"; 105 private static final String STORE_OF_CLASS_POSTFIX = "(:|\\+)\\S* \\*" + END; 106 private static final String LOAD_OF_CLASS_POSTFIX = "(:|\\+)\\S* \\*" + END; 107 108 public static final String IS_REPLACED = "#IS_REPLACED#"; // Is replaced by an additional user-defined string. 109 110 public static final String VECTOR_SIZE = "_@"; 111 public static final String VECTOR_SIZE_TAG_ANY = "any"; 112 public static final String VECTOR_SIZE_TAG_MAX = "max_for_type"; 113 public static final String VECTOR_SIZE_ANY = VECTOR_SIZE + VECTOR_SIZE_TAG_ANY; // default for counts "=0" and failOn 114 public static final String VECTOR_SIZE_MAX = VECTOR_SIZE + VECTOR_SIZE_TAG_MAX; // default in counts 115 public static final String VECTOR_SIZE_2 = VECTOR_SIZE + "2"; 116 public static final String VECTOR_SIZE_4 = VECTOR_SIZE + "4"; 117 public static final String VECTOR_SIZE_8 = VECTOR_SIZE + "8"; 118 public static final String VECTOR_SIZE_16 = VECTOR_SIZE + "16"; 119 public static final String VECTOR_SIZE_32 = VECTOR_SIZE + "32"; 120 public static final String VECTOR_SIZE_64 = VECTOR_SIZE + "64"; 121 122 private static final String TYPE_BYTE = "B"; 123 private static final String TYPE_CHAR = "C"; 124 private static final String TYPE_SHORT = "S"; 125 private static final String TYPE_INT = "I"; 126 private static final String TYPE_LONG = "J"; 127 private static final String TYPE_FLOAT = "F"; 128 private static final String TYPE_DOUBLE = "D"; 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 public static final String ABS_D = PREFIX + "ABS_D" + POSTFIX; 156 static { 157 beforeMatchingNameRegex(ABS_D, "AbsD"); 158 } 159 160 public static final String ABS_F = PREFIX + "ABS_F" + POSTFIX; 161 static { 162 beforeMatchingNameRegex(ABS_F, "AbsF"); 163 } 164 165 public static final String ABS_I = PREFIX + "ABS_I" + POSTFIX; 166 static { 167 beforeMatchingNameRegex(ABS_I, "AbsI"); 168 } 169 170 public static final String ABS_L = PREFIX + "ABS_L" + POSTFIX; 171 static { 172 beforeMatchingNameRegex(ABS_L, "AbsL"); 173 } 174 175 public static final String ABS_VB = VECTOR_PREFIX + "ABS_VB" + POSTFIX; 176 static { 177 vectorNode(ABS_VB, "AbsVB", TYPE_BYTE); 178 } 179 180 // ABS_VC / AbsVC does not exist (char is 2 byte unsigned) 181 182 public static final String ABS_VS = VECTOR_PREFIX + "ABS_VS" + POSTFIX; 183 static { 184 vectorNode(ABS_VS, "AbsVS", TYPE_SHORT); 185 } 186 187 public static final String ABS_VI = VECTOR_PREFIX + "ABS_VI" + POSTFIX; 188 static { 189 vectorNode(ABS_VI, "AbsVI", TYPE_INT); 190 } 191 192 public static final String ABS_VL = VECTOR_PREFIX + "ABS_VL" + POSTFIX; 193 static { 194 vectorNode(ABS_VL, "AbsVL", TYPE_LONG); 195 } 196 197 public static final String ABS_VF = VECTOR_PREFIX + "ABS_VF" + POSTFIX; 198 static { 199 vectorNode(ABS_VF, "AbsVF", TYPE_FLOAT); 200 } 201 202 public static final String ABS_VD = VECTOR_PREFIX + "ABS_VD" + POSTFIX; 203 static { 204 vectorNode(ABS_VD, "AbsVD", TYPE_DOUBLE); 205 } 206 207 public static final String ADD = PREFIX + "ADD" + POSTFIX; 208 static { 209 beforeMatchingNameRegex(ADD, "Add(I|L|F|D|P)"); 210 } 211 212 public static final String ADD_F = PREFIX + "ADD_F" + POSTFIX; 213 static { 214 beforeMatchingNameRegex(ADD_F, "AddF"); 215 } 216 217 public static final String ADD_I = PREFIX + "ADD_I" + POSTFIX; 218 static { 219 beforeMatchingNameRegex(ADD_I, "AddI"); 220 } 221 222 public static final String ADD_L = PREFIX + "ADD_L" + POSTFIX; 223 static { 224 beforeMatchingNameRegex(ADD_L, "AddL"); 225 } 226 227 public static final String ADD_HF = PREFIX + "ADD_HF" + POSTFIX; 228 static { 229 beforeMatchingNameRegex(ADD_HF, "AddHF"); 230 } 231 232 public static final String ADD_P = PREFIX + "ADD_P" + POSTFIX; 233 static { 234 beforeMatchingNameRegex(ADD_P, "AddP"); 235 } 236 237 public static final String ADD_VD = VECTOR_PREFIX + "ADD_VD" + POSTFIX; 238 static { 239 vectorNode(ADD_VD, "AddVD", TYPE_DOUBLE); 240 } 241 242 public static final String ADD_VI = VECTOR_PREFIX + "ADD_VI" + POSTFIX; 243 static { 244 vectorNode(ADD_VI, "AddVI", TYPE_INT); 245 } 246 247 public static final String ADD_VF = VECTOR_PREFIX + "ADD_VF" + POSTFIX; 248 static { 249 vectorNode(ADD_VF, "AddVF", TYPE_FLOAT); 250 } 251 252 public static final String ADD_VB = VECTOR_PREFIX + "ADD_VB" + POSTFIX; 253 static { 254 vectorNode(ADD_VB, "AddVB", TYPE_BYTE); 255 } 256 257 public static final String ADD_VS = VECTOR_PREFIX + "ADD_VS" + POSTFIX; 258 static { 259 vectorNode(ADD_VS, "AddVS", TYPE_SHORT); 260 } 261 262 public static final String ADD_VL = VECTOR_PREFIX + "ADD_VL" + POSTFIX; 263 static { 264 vectorNode(ADD_VL, "AddVL", TYPE_LONG); 265 } 266 267 public static final String SATURATING_ADD_VB = VECTOR_PREFIX + "SATURATING_ADD_VB" + POSTFIX; 268 static { 269 vectorNode(SATURATING_ADD_VB, "SaturatingAddV", TYPE_BYTE); 270 } 271 272 public static final String SATURATING_ADD_VS = VECTOR_PREFIX + "SATURATING_ADD_VS" + POSTFIX; 273 static { 274 vectorNode(SATURATING_ADD_VS, "SaturatingAddV", TYPE_SHORT); 275 } 276 277 public static final String SATURATING_ADD_VI = VECTOR_PREFIX + "SATURATING_ADD_VI" + POSTFIX; 278 static { 279 vectorNode(SATURATING_ADD_VI, "SaturatingAddV", TYPE_INT); 280 } 281 282 public static final String SATURATING_ADD_VL = VECTOR_PREFIX + "SATURATING_ADD_VL" + POSTFIX; 283 static { 284 vectorNode(SATURATING_ADD_VL, "SaturatingAddV", TYPE_LONG); 285 } 286 287 public static final String SATURATING_SUB_VB = VECTOR_PREFIX + "SATURATING_SUB_VB" + POSTFIX; 288 static { 289 vectorNode(SATURATING_SUB_VB, "SaturatingSubV", TYPE_BYTE); 290 } 291 292 public static final String SATURATING_SUB_VS = VECTOR_PREFIX + "SATURATING_SUB_VS" + POSTFIX; 293 static { 294 vectorNode(SATURATING_SUB_VS, "SaturatingSubV", TYPE_SHORT); 295 } 296 297 public static final String SATURATING_SUB_VI = VECTOR_PREFIX + "SATURATING_SUB_VI" + POSTFIX; 298 static { 299 vectorNode(SATURATING_SUB_VI, "SaturatingSubV", TYPE_INT); 300 } 301 302 public static final String SATURATING_SUB_VL = VECTOR_PREFIX + "SATURATING_SUB_VL" + POSTFIX; 303 static { 304 vectorNode(SATURATING_SUB_VL, "SaturatingSubV", TYPE_LONG); 305 } 306 307 public static final String ADD_REDUCTION_V = PREFIX + "ADD_REDUCTION_V" + POSTFIX; 308 static { 309 beforeMatchingNameRegex(ADD_REDUCTION_V, "AddReductionV(B|S|I|L|F|D)"); 310 } 311 312 public static final String ADD_REDUCTION_VD = PREFIX + "ADD_REDUCTION_VD" + POSTFIX; 313 static { 314 superWordNodes(ADD_REDUCTION_VD, "AddReductionVD"); 315 } 316 317 public static final String ADD_REDUCTION_VF = PREFIX + "ADD_REDUCTION_VF" + POSTFIX; 318 static { 319 superWordNodes(ADD_REDUCTION_VF, "AddReductionVF"); 320 } 321 322 public static final String ADD_REDUCTION_VI = PREFIX + "ADD_REDUCTION_VI" + POSTFIX; 323 static { 324 superWordNodes(ADD_REDUCTION_VI, "AddReductionVI"); 325 } 326 327 public static final String ADD_REDUCTION_VL = PREFIX + "ADD_REDUCTION_VL" + POSTFIX; 328 static { 329 superWordNodes(ADD_REDUCTION_VL, "AddReductionVL"); 330 } 331 332 public static final String OPAQUE_MULTIVERSIONING = PREFIX + "OPAQUE_MULTIVERSIONING" + POSTFIX; 333 static { 334 beforeMatchingNameRegex(OPAQUE_MULTIVERSIONING, "OpaqueMultiversioning"); 335 } 336 337 public static final String REARRANGE_VB = VECTOR_PREFIX + "REARRANGE_VB" + POSTFIX; 338 static { 339 vectorNode(REARRANGE_VB, "VectorRearrange", TYPE_BYTE); 340 } 341 342 public static final String REARRANGE_VS = VECTOR_PREFIX + "REARRANGE_VS" + POSTFIX; 343 static { 344 vectorNode(REARRANGE_VS, "VectorRearrange", TYPE_SHORT); 345 } 346 347 public static final String REARRANGE_VI = VECTOR_PREFIX + "REARRANGE_VI" + POSTFIX; 348 static { 349 vectorNode(REARRANGE_VI, "VectorRearrange", TYPE_INT); 350 } 351 352 public static final String REARRANGE_VL = VECTOR_PREFIX + "REARRANGE_VL" + POSTFIX; 353 static { 354 vectorNode(REARRANGE_VL, "VectorRearrange", TYPE_LONG); 355 } 356 357 public static final String REARRANGE_VF = VECTOR_PREFIX + "REARRANGE_VF" + POSTFIX; 358 static { 359 vectorNode(REARRANGE_VF, "VectorRearrange", TYPE_FLOAT); 360 } 361 362 public static final String REARRANGE_VD = VECTOR_PREFIX + "REARRANGE_VD" + POSTFIX; 363 static { 364 vectorNode(REARRANGE_VD, "VectorRearrange", TYPE_DOUBLE); 365 } 366 367 public static final String ADD_P_OF = COMPOSITE_PREFIX + "ADD_P_OF" + POSTFIX; 368 static { 369 String regex = START + "addP_" + IS_REPLACED + MID + ".*" + END; 370 machOnly(ADD_P_OF, regex); 371 } 372 373 public static final String ALLOC = PREFIX + "ALLOC" + POSTFIX; 374 static { 375 String regex = START + "Allocate\\b" + MID + END; 376 macroNodes(ALLOC, regex); 377 } 378 379 public static final String ALLOC_OF = COMPOSITE_PREFIX + "ALLOC_OF" + POSTFIX; 380 static { 381 String regex = START + "Allocate\\b" + MID + "allocationKlass:.*\\b" + IS_REPLACED + "\\s.*" + END; 382 macroNodes(ALLOC_OF, regex); 383 } 384 385 public static final String ALLOC_ARRAY = PREFIX + "ALLOC_ARRAY" + POSTFIX; 386 static { 387 String regex = START + "AllocateArray\\b" + MID + END; 388 macroNodes(ALLOC_ARRAY, regex); 389 } 390 391 public static final String ALLOC_ARRAY_OF = COMPOSITE_PREFIX + "ALLOC_ARRAY_OF" + POSTFIX; 392 static { 393 // Assuming we are looking for an array of "some/package/MyClass". The printout is 394 // [Lsome/package/MyClass; 395 // or, with more dimensions 396 // [[[Lsome/package/MyClass; 397 398 // Case where the searched string is a not fully qualified name (but maybe partially qualified): 399 // package/MyClass or MyClass 400 // The ".*\\b" will eat the "some/" and "some/package/" resp. 401 String partial_name_prefix = ".+\\b"; 402 403 // The thing after "allocationKlass:" (the name of the allocated class) is a sequence of: 404 // - a non-empty sequence of "[" 405 // - a single character ("L"), 406 // - maybe a non-empty sequence of characters ending on a word boundary 407 // this sequence is omitted if the given name is already fully qualified (exact match) 408 // but will eat the package path prefix in the cases described above 409 // - the name we are looking for 410 // - the final ";". 411 String name_part = "\\[+.(" + partial_name_prefix + ")?" + IS_REPLACED + ";"; 412 String regex = START + "AllocateArray\\b" + MID + "allocationKlass:" + name_part + ".*" + END; 413 macroNodes(ALLOC_ARRAY_OF, regex); 414 } 415 416 public static final String OR = PREFIX + "OR" + POSTFIX; 417 static { 418 beforeMatchingNameRegex(OR, "Or(I|L)"); 419 } 420 421 public static final String AND = PREFIX + "AND" + POSTFIX; 422 static { 423 beforeMatchingNameRegex(AND, "And(I|L)"); 424 } 425 426 public static final String AND_I = PREFIX + "AND_I" + POSTFIX; 427 static { 428 beforeMatchingNameRegex(AND_I, "AndI"); 429 } 430 431 public static final String AND_L = PREFIX + "AND_L" + POSTFIX; 432 static { 433 beforeMatchingNameRegex(AND_L, "AndL"); 434 } 435 436 public static final String AND_VB = VECTOR_PREFIX + "AND_VB" + POSTFIX; 437 static { 438 vectorNode(AND_VB, "AndV", TYPE_BYTE); 439 } 440 441 public static final String AND_VC = VECTOR_PREFIX + "AND_VC" + POSTFIX; 442 static { 443 vectorNode(AND_VC, "AndV", TYPE_CHAR); 444 } 445 446 public static final String AND_VS = VECTOR_PREFIX + "AND_VS" + POSTFIX; 447 static { 448 vectorNode(AND_VS, "AndV", TYPE_SHORT); 449 } 450 451 public static final String AND_VI = VECTOR_PREFIX + "AND_VI" + POSTFIX; 452 static { 453 vectorNode(AND_VI, "AndV", TYPE_INT); 454 } 455 456 public static final String AND_VL = VECTOR_PREFIX + "AND_VL" + POSTFIX; 457 static { 458 vectorNode(AND_VL, "AndV", TYPE_LONG); 459 } 460 461 public static final String AND_V_MASK = PREFIX + "AND_V_MASK" + POSTFIX; 462 static { 463 beforeMatchingNameRegex(AND_V_MASK, "AndVMask"); 464 } 465 466 public static final String AND_REDUCTION_V = PREFIX + "AND_REDUCTION_V" + POSTFIX; 467 static { 468 superWordNodes(AND_REDUCTION_V, "AndReductionV"); 469 } 470 471 public static final String CALL = PREFIX + "CALL" + POSTFIX; 472 static { 473 beforeMatchingNameRegex(CALL, "Call.*Java"); 474 } 475 476 public static final String CALL_OF = COMPOSITE_PREFIX + "CALL_OF" + POSTFIX; 477 static { 478 callOfNodes(CALL_OF, "Call.*"); 479 } 480 481 public static final String CALL_OF_METHOD = COMPOSITE_PREFIX + "CALL_OF_METHOD" + POSTFIX; 482 static { 483 callOfNodes(CALL_OF_METHOD, "Call.*Java"); 484 } 485 486 public static final String STATIC_CALL_OF_METHOD = COMPOSITE_PREFIX + "STATIC_CALL_OF_METHOD" + POSTFIX; 487 static { 488 callOfNodes(STATIC_CALL_OF_METHOD, "CallStaticJava"); 489 } 490 491 public static final String CAST_II = PREFIX + "CAST_II" + POSTFIX; 492 static { 493 beforeMatchingNameRegex(CAST_II, "CastII"); 494 } 495 496 public static final String CAST_LL = PREFIX + "CAST_LL" + POSTFIX; 497 static { 498 beforeMatchingNameRegex(CAST_LL, "CastLL"); 499 } 500 501 public static final String CBNZW_HI = PREFIX + "CBNZW_HI" + POSTFIX; 502 static { 503 optoOnly(CBNZW_HI, "cbwhi"); 504 } 505 506 public static final String CBZW_LS = PREFIX + "CBZW_LS" + POSTFIX; 507 static { 508 optoOnly(CBZW_LS, "cbwls"); 509 } 510 511 public static final String CBZ_LS = PREFIX + "CBZ_LS" + POSTFIX; 512 static { 513 optoOnly(CBZ_LS, "cbls"); 514 } 515 516 public static final String CBZ_HI = PREFIX + "CBZ_HI" + POSTFIX; 517 static { 518 optoOnly(CBZ_HI, "cbhi"); 519 } 520 521 public static final String CHECKCAST_ARRAY = PREFIX + "CHECKCAST_ARRAY" + POSTFIX; 522 static { 523 String regex = "(((?i:cmp|CLFI|CLR).*precise \\[.*:|.*(?i:mov|mv|or).*precise \\[.*:.*\\R.*(cmp|CMP|CLR))" + END; 524 optoOnly(CHECKCAST_ARRAY, regex); 525 } 526 527 public static final String CHECKCAST_ARRAY_OF = COMPOSITE_PREFIX + "CHECKCAST_ARRAY_OF" + POSTFIX; 528 static { 529 String regex = "(((?i:cmp|CLFI|CLR).*precise \\[.*" + IS_REPLACED + ":|.*(?i:mov|mv|or).*precise \\[.*" + IS_REPLACED + ":.*\\R.*(cmp|CMP|CLR))" + END; 530 optoOnly(CHECKCAST_ARRAY_OF, regex); 531 } 532 533 // Does not work on s390 (a rule containing this regex will be skipped on s390). 534 public static final String CHECKCAST_ARRAYCOPY = PREFIX + "CHECKCAST_ARRAYCOPY" + POSTFIX; 535 static { 536 String regex = "(.*((?i:call_leaf_nofp,runtime)|CALL,\\s?runtime leaf nofp|BCTRL.*.leaf call).*checkcast_arraycopy.*" + END; 537 optoOnly(CHECKCAST_ARRAYCOPY, regex); 538 } 539 540 public static final String CLASS_CHECK_TRAP = PREFIX + "CLASS_CHECK_TRAP" + POSTFIX; 541 static { 542 trapNodes(CLASS_CHECK_TRAP, "class_check"); 543 } 544 545 public static final String CMOVE_I = PREFIX + "CMOVE_I" + POSTFIX; 546 static { 547 beforeMatchingNameRegex(CMOVE_I, "CMoveI"); 548 } 549 550 public static final String CMP_I = PREFIX + "CMP_I" + POSTFIX; 551 static { 552 beforeMatchingNameRegex(CMP_I, "CmpI"); 553 } 554 555 public static final String CMP_L = PREFIX + "CMP_L" + POSTFIX; 556 static { 557 beforeMatchingNameRegex(CMP_L, "CmpL"); 558 } 559 560 public static final String CMP_U = PREFIX + "CMP_U" + POSTFIX; 561 static { 562 beforeMatchingNameRegex(CMP_U, "CmpU\\b"); 563 } 564 565 public static final String CMP_U3 = PREFIX + "CMP_U3" + POSTFIX; 566 static { 567 beforeMatchingNameRegex(CMP_U3, "CmpU3"); 568 } 569 570 public static final String CMP_UL = PREFIX + "CMP_UL" + POSTFIX; 571 static { 572 beforeMatchingNameRegex(CMP_UL, "CmpUL"); 573 } 574 575 public static final String CMP_UL3 = PREFIX + "CMP_UL3" + POSTFIX; 576 static { 577 beforeMatchingNameRegex(CMP_UL3, "CmpUL3"); 578 } 579 580 public static final String CMP_P = PREFIX + "CMP_P" + POSTFIX; 581 static { 582 beforeMatchingNameRegex(CMP_P, "CmpP"); 583 } 584 585 public static final String COMPRESS_BITS = PREFIX + "COMPRESS_BITS" + POSTFIX; 586 static { 587 beforeMatchingNameRegex(COMPRESS_BITS, "CompressBits"); 588 } 589 590 public static final String CONV = PREFIX + "CONV" + POSTFIX; 591 static { 592 beforeMatchingNameRegex(CONV, "Conv"); 593 } 594 595 public static final String CONV_F2HF = PREFIX + "CONV_F2HF" + POSTFIX; 596 static { 597 beforeMatchingNameRegex(CONV_F2HF, "ConvF2HF"); 598 } 599 600 public static final String CONV_I2L = PREFIX + "CONV_I2L" + POSTFIX; 601 static { 602 beforeMatchingNameRegex(CONV_I2L, "ConvI2L"); 603 } 604 605 public static final String CONV_L2I = PREFIX + "CONV_L2I" + POSTFIX; 606 static { 607 beforeMatchingNameRegex(CONV_L2I, "ConvL2I"); 608 } 609 610 public static final String CONV_HF2F = PREFIX + "CONV_HF2F" + POSTFIX; 611 static { 612 beforeMatchingNameRegex(CONV_HF2F, "ConvHF2F"); 613 } 614 615 public static final String CON_I = PREFIX + "CON_I" + POSTFIX; 616 static { 617 beforeMatchingNameRegex(CON_I, "ConI"); 618 } 619 620 public static final String CON_L = PREFIX + "CON_L" + POSTFIX; 621 static { 622 beforeMatchingNameRegex(CON_L, "ConL"); 623 } 624 625 public static final String CON_D = PREFIX + "CON_D" + POSTFIX; 626 static { 627 beforeMatchingNameRegex(CON_D, "ConD"); 628 } 629 630 public static final String CON_F = PREFIX + "CON_F" + POSTFIX; 631 static { 632 beforeMatchingNameRegex(CON_F, "ConF"); 633 } 634 635 public static final String COUNTED_LOOP = PREFIX + "COUNTED_LOOP" + POSTFIX; 636 static { 637 String regex = START + "CountedLoop\\b" + MID + END; 638 fromAfterCountedLoops(COUNTED_LOOP, regex); 639 } 640 641 public static final String COUNTED_LOOP_MAIN = PREFIX + "COUNTED_LOOP_MAIN" + POSTFIX; 642 static { 643 String regex = START + "CountedLoop\\b" + MID + "main" + END; 644 fromAfterCountedLoops(COUNTED_LOOP_MAIN, regex); 645 } 646 647 public static final String DIV = PREFIX + "DIV" + POSTFIX; 648 static { 649 beforeMatchingNameRegex(DIV, "Div(I|L|F|D)"); 650 } 651 652 public static final String UDIV = PREFIX + "UDIV" + POSTFIX; 653 static { 654 beforeMatchingNameRegex(UDIV, "UDiv(I|L|F|D)"); 655 } 656 657 public static final String DIV_BY_ZERO_TRAP = PREFIX + "DIV_BY_ZERO_TRAP" + POSTFIX; 658 static { 659 trapNodes(DIV_BY_ZERO_TRAP, "div0_check"); 660 } 661 662 public static final String DIV_I = PREFIX + "DIV_I" + POSTFIX; 663 static { 664 beforeMatchingNameRegex(DIV_I, "DivI"); 665 } 666 667 public static final String DIV_L = PREFIX + "DIV_L" + POSTFIX; 668 static { 669 beforeMatchingNameRegex(DIV_L, "DivL"); 670 } 671 672 public static final String DIV_MOD_I = PREFIX + "DIV_MOD_I" + POSTFIX; 673 static { 674 beforeMatchingNameRegex(DIV_MOD_I, "DivModI"); 675 } 676 677 public static final String DIV_MOD_L = PREFIX + "DIV_MOD_L" + POSTFIX; 678 static { 679 beforeMatchingNameRegex(DIV_MOD_L, "DivModL"); 680 } 681 682 public static final String DIV_VF = VECTOR_PREFIX + "DIV_VF" + POSTFIX; 683 static { 684 vectorNode(DIV_VF, "DivVF", TYPE_FLOAT); 685 } 686 687 public static final String DIV_VD = VECTOR_PREFIX + "DIV_VD" + POSTFIX; 688 static { 689 vectorNode(DIV_VD, "DivVD", TYPE_DOUBLE); 690 } 691 692 public static final String DYNAMIC_CALL_OF_METHOD = COMPOSITE_PREFIX + "DYNAMIC_CALL_OF_METHOD" + POSTFIX; 693 static { 694 callOfNodes(DYNAMIC_CALL_OF_METHOD, "CallDynamicJava"); 695 } 696 697 public static final String EXPAND_BITS = PREFIX + "EXPAND_BITS" + POSTFIX; 698 static { 699 beforeMatchingNameRegex(EXPAND_BITS, "ExpandBits"); 700 } 701 702 public static final String FAST_LOCK = PREFIX + "FAST_LOCK" + POSTFIX; 703 static { 704 beforeMatchingNameRegex(FAST_LOCK, "FastLock"); 705 } 706 707 public static final String FAST_UNLOCK = PREFIX + "FAST_UNLOCK" + POSTFIX; 708 static { 709 String regex = START + "FastUnlock" + MID + END; 710 fromMacroToBeforeMatching(FAST_UNLOCK, regex); 711 } 712 713 public static final String FIELD_ACCESS = PREFIX + "FIELD_ACCESS" + POSTFIX; 714 static { 715 String regex = "(.*Field: *" + END; 716 optoOnly(FIELD_ACCESS, regex); 717 } 718 719 public static final String FMA_VF = VECTOR_PREFIX + "FMA_VF" + POSTFIX; 720 static { 721 vectorNode(FMA_VF, "FmaVF", TYPE_FLOAT); 722 } 723 724 public static final String FMA_VD = VECTOR_PREFIX + "FMA_VD" + POSTFIX; 725 static { 726 vectorNode(FMA_VD, "FmaVD", TYPE_DOUBLE); 727 } 728 729 public static final String FMA_HF = PREFIX + "FMA_HF" + POSTFIX; 730 static { 731 beforeMatchingNameRegex(FMA_HF, "FmaHF"); 732 } 733 734 public static final String G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG" + POSTFIX; 735 static { 736 String regex = START + "g1CompareAndExchangeN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 737 machOnly(G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG, regex); 738 } 739 740 public static final String G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG" + POSTFIX; 741 static { 742 String regex = START + "g1CompareAndExchangeP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 743 machOnly(G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG, regex); 744 } 745 746 public static final String G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG" + POSTFIX; 747 static { 748 String regex = START + "g1CompareAndSwapN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 749 machOnly(G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG, regex); 750 } 751 752 public static final String G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG" + POSTFIX; 753 static { 754 String regex = START + "g1CompareAndSwapP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 755 machOnly(G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, regex); 756 } 757 758 public static final String G1_ENCODE_P_AND_STORE_N = PREFIX + "G1_ENCODE_P_AND_STORE_N" + POSTFIX; 759 static { 760 machOnlyNameRegex(G1_ENCODE_P_AND_STORE_N, "g1EncodePAndStoreN"); 761 } 762 763 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; 764 static { 765 String regex = START + "g1EncodePAndStoreN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 766 machOnly(G1_ENCODE_P_AND_STORE_N_WITH_BARRIER_FLAG, regex); 767 } 768 769 public static final String G1_GET_AND_SET_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_GET_AND_SET_N_WITH_BARRIER_FLAG" + POSTFIX; 770 static { 771 String regex = START + "g1GetAndSetN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 772 machOnly(G1_GET_AND_SET_N_WITH_BARRIER_FLAG, regex); 773 } 774 775 public static final String G1_GET_AND_SET_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_GET_AND_SET_P_WITH_BARRIER_FLAG" + POSTFIX; 776 static { 777 String regex = START + "g1GetAndSetP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 778 machOnly(G1_GET_AND_SET_P_WITH_BARRIER_FLAG, regex); 779 } 780 781 public static final String G1_LOAD_N = PREFIX + "G1_LOAD_N" + POSTFIX; 782 static { 783 machOnlyNameRegex(G1_LOAD_N, "g1LoadN"); 784 } 785 786 public static final String G1_LOAD_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_LOAD_N_WITH_BARRIER_FLAG" + POSTFIX; 787 static { 788 String regex = START + "g1LoadN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 789 machOnly(G1_LOAD_N_WITH_BARRIER_FLAG, regex); 790 } 791 792 public static final String G1_LOAD_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_LOAD_P_WITH_BARRIER_FLAG" + POSTFIX; 793 static { 794 String regex = START + "g1LoadP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 795 machOnly(G1_LOAD_P_WITH_BARRIER_FLAG, regex); 796 } 797 798 public static final String G1_STORE_N = PREFIX + "G1_STORE_N" + POSTFIX; 799 static { 800 machOnlyNameRegex(G1_STORE_N, "g1StoreN"); 801 } 802 803 public static final String G1_STORE_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_STORE_N_WITH_BARRIER_FLAG" + POSTFIX; 804 static { 805 String regex = START + "g1StoreN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 806 machOnly(G1_STORE_N_WITH_BARRIER_FLAG, regex); 807 } 808 809 public static final String G1_STORE_P = PREFIX + "G1_STORE_P" + POSTFIX; 810 static { 811 machOnlyNameRegex(G1_STORE_P, "g1StoreP"); 812 } 813 814 public static final String G1_STORE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_STORE_P_WITH_BARRIER_FLAG" + POSTFIX; 815 static { 816 String regex = START + "g1StoreP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 817 machOnly(G1_STORE_P_WITH_BARRIER_FLAG, regex); 818 } 819 820 public static final String IF = PREFIX + "IF" + POSTFIX; 821 static { 822 beforeMatchingNameRegex(IF, "If\\b"); 823 } 824 825 // Does not work for VM builds without JVMCI like x86_32 (a rule containing this regex will be skipped without having JVMCI built). 826 public static final String INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP = PREFIX + "INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP" + POSTFIX; 827 static { 828 trapNodes(INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP, "intrinsic_or_type_checked_inlining"); 829 } 830 831 public static final String INTRINSIC_TRAP = PREFIX + "INTRINSIC_TRAP" + POSTFIX; 832 static { 833 trapNodes(INTRINSIC_TRAP, "intrinsic"); 834 } 835 836 // Is only supported on riscv64. 837 public static final String IS_FINITE_D = PREFIX + "IS_FINITE_D" + POSTFIX; 838 static { 839 beforeMatchingNameRegex(IS_FINITE_D, "IsFiniteD"); 840 } 841 842 // Is only supported on riscv64. 843 public static final String IS_FINITE_F = PREFIX + "IS_FINITE_F" + POSTFIX; 844 static { 845 beforeMatchingNameRegex(IS_FINITE_F, "IsFiniteF"); 846 } 847 848 public static final String IS_INFINITE_D = PREFIX + "IS_INFINITE_D" + POSTFIX; 849 static { 850 beforeMatchingNameRegex(IS_INFINITE_D, "IsInfiniteD"); 851 } 852 853 public static final String IS_INFINITE_F = PREFIX + "IS_INFINITE_F" + POSTFIX; 854 static { 855 beforeMatchingNameRegex(IS_INFINITE_F, "IsInfiniteF"); 856 } 857 858 public static final String LOAD = PREFIX + "LOAD" + POSTFIX; 859 static { 860 beforeMatchingNameRegex(LOAD, "Load(B|UB|S|US|I|L|F|D|P|N)"); 861 } 862 863 public static final String LOAD_OF_CLASS = COMPOSITE_PREFIX + "LOAD_OF_CLASS" + POSTFIX; 864 static { 865 loadOfNodes(LOAD_OF_CLASS, "Load(B|UB|S|US|I|L|F|D|P|N)"); 866 } 867 868 public static final String LOAD_B = PREFIX + "LOAD_B" + POSTFIX; 869 static { 870 beforeMatchingNameRegex(LOAD_B, "LoadB"); 871 } 872 873 public static final String LOAD_B_OF_CLASS = COMPOSITE_PREFIX + "LOAD_B_OF_CLASS" + POSTFIX; 874 static { 875 loadOfNodes(LOAD_B_OF_CLASS, "LoadB"); 876 } 877 878 public static final String LOAD_D = PREFIX + "LOAD_D" + POSTFIX; 879 static { 880 beforeMatchingNameRegex(LOAD_D, "LoadD"); 881 } 882 883 public static final String LOAD_D_OF_CLASS = COMPOSITE_PREFIX + "LOAD_D_OF_CLASS" + POSTFIX; 884 static { 885 loadOfNodes(LOAD_D_OF_CLASS, "LoadD"); 886 } 887 888 public static final String LOAD_F = PREFIX + "LOAD_F" + POSTFIX; 889 static { 890 beforeMatchingNameRegex(LOAD_F, "LoadF"); 891 } 892 893 public static final String LOAD_F_OF_CLASS = COMPOSITE_PREFIX + "LOAD_F_OF_CLASS" + POSTFIX; 894 static { 895 loadOfNodes(LOAD_F_OF_CLASS, "LoadF"); 896 } 897 898 public static final String LOAD_I = PREFIX + "LOAD_I" + POSTFIX; 899 static { 900 beforeMatchingNameRegex(LOAD_I, "LoadI"); 901 } 902 903 public static final String LOAD_I_OF_CLASS = COMPOSITE_PREFIX + "LOAD_I_OF_CLASS" + POSTFIX; 904 static { 905 loadOfNodes(LOAD_I_OF_CLASS, "LoadI"); 906 } 907 908 public static final String LOAD_KLASS = PREFIX + "LOAD_KLASS" + POSTFIX; 909 static { 910 beforeMatchingNameRegex(LOAD_KLASS, "LoadKlass"); 911 } 912 913 public static final String LOAD_NKLASS = PREFIX + "LOAD_NKLASS" + POSTFIX; 914 static { 915 beforeMatchingNameRegex(LOAD_NKLASS, "LoadNKlass"); 916 } 917 918 public static final String LOAD_KLASS_OR_NKLASS = PREFIX + "LOAD_KLASS_OR_NKLASS" + POSTFIX; 919 static { 920 beforeMatchingNameRegex(LOAD_KLASS_OR_NKLASS, "LoadN?Klass"); 921 } 922 923 public static final String LOAD_L = PREFIX + "LOAD_L" + POSTFIX; 924 static { 925 beforeMatchingNameRegex(LOAD_L, "LoadL"); 926 } 927 928 public static final String LOAD_L_OF_CLASS = COMPOSITE_PREFIX + "LOAD_L_OF_CLASS" + POSTFIX; 929 static { 930 loadOfNodes(LOAD_L_OF_CLASS, "LoadL"); 931 } 932 933 public static final String LOAD_N = PREFIX + "LOAD_N" + POSTFIX; 934 static { 935 beforeMatchingNameRegex(LOAD_N, "LoadN"); 936 } 937 938 public static final String LOAD_N_OF_CLASS = COMPOSITE_PREFIX + "LOAD_N_OF_CLASS" + POSTFIX; 939 static { 940 loadOfNodes(LOAD_N_OF_CLASS, "LoadN"); 941 } 942 943 public static final String LOAD_OF_FIELD = COMPOSITE_PREFIX + "LOAD_OF_FIELD" + POSTFIX; 944 static { 945 String regex = START + "Load(B|C|S|I|L|F|D|P|N)" + MID + "@.*name=" + IS_REPLACED + ",.*" + END; 946 beforeMatching(LOAD_OF_FIELD, regex); 947 } 948 949 public static final String LOAD_P = PREFIX + "LOAD_P" + POSTFIX; 950 static { 951 beforeMatchingNameRegex(LOAD_P, "LoadP"); 952 } 953 954 public static final String LOAD_P_OF_CLASS = COMPOSITE_PREFIX + "LOAD_P_OF_CLASS" + POSTFIX; 955 static { 956 loadOfNodes(LOAD_P_OF_CLASS, "LoadP"); 957 } 958 959 public static final String LOAD_S = PREFIX + "LOAD_S" + POSTFIX; 960 static { 961 beforeMatchingNameRegex(LOAD_S, "LoadS"); 962 } 963 964 public static final String LOAD_S_OF_CLASS = COMPOSITE_PREFIX + "LOAD_S_OF_CLASS" + POSTFIX; 965 static { 966 loadOfNodes(LOAD_S_OF_CLASS, "LoadS"); 967 } 968 969 public static final String LOAD_UB = PREFIX + "LOAD_UB" + POSTFIX; 970 static { 971 beforeMatchingNameRegex(LOAD_UB, "LoadUB"); 972 } 973 974 public static final String LOAD_UB_OF_CLASS = COMPOSITE_PREFIX + "LOAD_UB_OF_CLASS" + POSTFIX; 975 static { 976 loadOfNodes(LOAD_UB_OF_CLASS, "LoadUB"); 977 } 978 979 public static final String LOAD_US = PREFIX + "LOAD_US" + POSTFIX; 980 static { 981 beforeMatchingNameRegex(LOAD_US, "LoadUS"); 982 } 983 984 public static final String LOAD_US_OF_CLASS = COMPOSITE_PREFIX + "LOAD_US_OF_CLASS" + POSTFIX; 985 static { 986 loadOfNodes(LOAD_US_OF_CLASS, "LoadUS"); 987 } 988 989 public static final String LOAD_VECTOR_B = VECTOR_PREFIX + "LOAD_VECTOR_B" + POSTFIX; 990 static { 991 vectorNode(LOAD_VECTOR_B, "LoadVector", TYPE_BYTE); 992 } 993 994 public static final String LOAD_VECTOR_C = VECTOR_PREFIX + "LOAD_VECTOR_C" + POSTFIX; 995 static { 996 vectorNode(LOAD_VECTOR_C, "LoadVector", TYPE_CHAR); 997 } 998 999 public static final String LOAD_VECTOR_S = VECTOR_PREFIX + "LOAD_VECTOR_S" + POSTFIX; 1000 static { 1001 vectorNode(LOAD_VECTOR_S, "LoadVector", TYPE_SHORT); 1002 } 1003 1004 public static final String LOAD_VECTOR_I = VECTOR_PREFIX + "LOAD_VECTOR_I" + POSTFIX; 1005 static { 1006 vectorNode(LOAD_VECTOR_I, "LoadVector", TYPE_INT); 1007 } 1008 1009 public static final String LOAD_VECTOR_L = VECTOR_PREFIX + "LOAD_VECTOR_L" + POSTFIX; 1010 static { 1011 vectorNode(LOAD_VECTOR_L, "LoadVector", TYPE_LONG); 1012 } 1013 1014 public static final String LOAD_VECTOR_F = VECTOR_PREFIX + "LOAD_VECTOR_F" + POSTFIX; 1015 static { 1016 vectorNode(LOAD_VECTOR_F, "LoadVector", TYPE_FLOAT); 1017 } 1018 1019 public static final String LOAD_VECTOR_D = VECTOR_PREFIX + "LOAD_VECTOR_D" + POSTFIX; 1020 static { 1021 vectorNode(LOAD_VECTOR_D, "LoadVector", TYPE_DOUBLE); 1022 } 1023 1024 public static final String LOAD_VECTOR_GATHER = PREFIX + "LOAD_VECTOR_GATHER" + POSTFIX; 1025 static { 1026 beforeMatchingNameRegex(LOAD_VECTOR_GATHER, "LoadVectorGather"); 1027 } 1028 1029 public static final String LOAD_VECTOR_MASKED = PREFIX + "LOAD_VECTOR_MASKED" + POSTFIX; 1030 static { 1031 beforeMatchingNameRegex(LOAD_VECTOR_MASKED, "LoadVectorMasked"); 1032 } 1033 1034 public static final String LOAD_VECTOR_GATHER_MASKED = PREFIX + "LOAD_VECTOR_GATHER_MASKED" + POSTFIX; 1035 static { 1036 beforeMatchingNameRegex(LOAD_VECTOR_GATHER_MASKED, "LoadVectorGatherMasked"); 1037 } 1038 1039 public static final String LONG_COUNTED_LOOP = PREFIX + "LONG_COUNTED_LOOP" + POSTFIX; 1040 static { 1041 String regex = START + "LongCountedLoop\\b" + MID + END; 1042 fromAfterCountedLoops(LONG_COUNTED_LOOP, regex); 1043 } 1044 1045 public static final String LOOP = PREFIX + "LOOP" + POSTFIX; 1046 static { 1047 String regex = START + "Loop" + MID + END; 1048 fromBeforeCountedLoops(LOOP, regex); 1049 } 1050 1051 public static final String LSHIFT = PREFIX + "LSHIFT" + POSTFIX; 1052 static { 1053 beforeMatchingNameRegex(LSHIFT, "LShift(I|L)"); 1054 } 1055 1056 public static final String LSHIFT_I = PREFIX + "LSHIFT_I" + POSTFIX; 1057 static { 1058 beforeMatchingNameRegex(LSHIFT_I, "LShiftI"); 1059 } 1060 1061 public static final String LSHIFT_L = PREFIX + "LSHIFT_L" + POSTFIX; 1062 static { 1063 beforeMatchingNameRegex(LSHIFT_L, "LShiftL"); 1064 } 1065 1066 public static final String LSHIFT_VB = VECTOR_PREFIX + "LSHIFT_VB" + POSTFIX; 1067 static { 1068 vectorNode(LSHIFT_VB, "LShiftVB", TYPE_BYTE); 1069 } 1070 1071 public static final String LSHIFT_VS = VECTOR_PREFIX + "LSHIFT_VS" + POSTFIX; 1072 static { 1073 vectorNode(LSHIFT_VS, "LShiftVS", TYPE_SHORT); 1074 } 1075 1076 public static final String LSHIFT_VC = VECTOR_PREFIX + "LSHIFT_VC" + POSTFIX; 1077 static { 1078 vectorNode(LSHIFT_VC, "LShiftVS", TYPE_CHAR); // using short op with char type 1079 } 1080 1081 public static final String LSHIFT_VI = VECTOR_PREFIX + "LSHIFT_VI" + POSTFIX; 1082 static { 1083 vectorNode(LSHIFT_VI, "LShiftVI", TYPE_INT); 1084 } 1085 1086 public static final String LSHIFT_VL = VECTOR_PREFIX + "LSHIFT_VL" + POSTFIX; 1087 static { 1088 vectorNode(LSHIFT_VL, "LShiftVL", TYPE_LONG); 1089 } 1090 1091 public static final String MACH_TEMP = PREFIX + "MACH_TEMP" + POSTFIX; 1092 static { 1093 machOnlyNameRegex(MACH_TEMP, "MachTemp"); 1094 } 1095 1096 public static final String MACRO_LOGIC_V = PREFIX + "MACRO_LOGIC_V" + POSTFIX; 1097 static { 1098 afterBarrierExpansionToBeforeMatching(MACRO_LOGIC_V, "MacroLogicV"); 1099 } 1100 1101 public static final String MAX = PREFIX + "MAX" + POSTFIX; 1102 static { 1103 beforeMatchingNameRegex(MAX, "Max(I|L|F|D)"); 1104 } 1105 1106 public static final String MAX_D = PREFIX + "MAX_D" + POSTFIX; 1107 static { 1108 beforeMatchingNameRegex(MAX_D, "MaxD"); 1109 } 1110 1111 public static final String MAX_D_REDUCTION_REG = PREFIX + "MAX_D_REDUCTION_REG" + POSTFIX; 1112 static { 1113 machOnlyNameRegex(MAX_D_REDUCTION_REG, "maxD_reduction_reg"); 1114 } 1115 1116 public static final String MAX_D_REG = PREFIX + "MAX_D_REG" + POSTFIX; 1117 static { 1118 machOnlyNameRegex(MAX_D_REG, "maxD_reg"); 1119 } 1120 1121 public static final String MAX_F = PREFIX + "MAX_F" + POSTFIX; 1122 static { 1123 beforeMatchingNameRegex(MAX_F, "MaxF"); 1124 } 1125 1126 public static final String MAX_F_REDUCTION_REG = PREFIX + "MAX_F_REDUCTION_REG" + POSTFIX; 1127 static { 1128 machOnlyNameRegex(MAX_F_REDUCTION_REG, "maxF_reduction_reg"); 1129 } 1130 1131 public static final String MAX_F_REG = PREFIX + "MAX_F_REG" + POSTFIX; 1132 static { 1133 machOnlyNameRegex(MAX_F_REG, "maxF_reg"); 1134 } 1135 1136 public static final String MAX_I = PREFIX + "MAX_I" + POSTFIX; 1137 static { 1138 beforeMatchingNameRegex(MAX_I, "MaxI"); 1139 } 1140 1141 public static final String MAX_L = PREFIX + "MAX_L" + POSTFIX; 1142 static { 1143 beforeMatchingNameRegex(MAX_L, "MaxL"); 1144 } 1145 1146 public static final String MAX_VI = VECTOR_PREFIX + "MAX_VI" + POSTFIX; 1147 static { 1148 vectorNode(MAX_VI, "MaxV", TYPE_INT); 1149 } 1150 1151 public static final String MAX_VF = VECTOR_PREFIX + "MAX_VF" + POSTFIX; 1152 static { 1153 vectorNode(MAX_VF, "MaxV", TYPE_FLOAT); 1154 } 1155 1156 public static final String MAX_VD = VECTOR_PREFIX + "MAX_VD" + POSTFIX; 1157 static { 1158 vectorNode(MAX_VD, "MaxV", TYPE_DOUBLE); 1159 } 1160 1161 public static final String MAX_VL = VECTOR_PREFIX + "MAX_VL" + POSTFIX; 1162 static { 1163 vectorNode(MAX_VL, "MaxV", TYPE_LONG); 1164 } 1165 1166 public static final String MEMBAR = PREFIX + "MEMBAR" + POSTFIX; 1167 static { 1168 beforeMatchingNameRegex(MEMBAR, "MemBar"); 1169 } 1170 1171 public static final String MEMBAR_ACQUIRE = PREFIX + "MEMBAR_ACQUIRE" + POSTFIX; 1172 static { 1173 beforeMatchingNameRegex(MEMBAR_ACQUIRE, "MemBarAcquire"); 1174 } 1175 1176 public static final String MEMBAR_RELEASE = PREFIX + "MEMBAR_RELEASE" + POSTFIX; 1177 static { 1178 beforeMatchingNameRegex(MEMBAR_RELEASE, "MemBarRelease"); 1179 } 1180 1181 public static final String MEMBAR_STORESTORE = PREFIX + "MEMBAR_STORESTORE" + POSTFIX; 1182 static { 1183 beforeMatchingNameRegex(MEMBAR_STORESTORE, "MemBarStoreStore"); 1184 } 1185 1186 public static final String MEMBAR_VOLATILE = PREFIX + "MEMBAR_VOLATILE" + POSTFIX; 1187 static { 1188 beforeMatchingNameRegex(MEMBAR_VOLATILE, "MemBarVolatile"); 1189 } 1190 1191 public static final String MIN = PREFIX + "MIN" + POSTFIX; 1192 static { 1193 beforeMatchingNameRegex(MIN, "Min(I|L)"); 1194 } 1195 1196 public static final String MIN_D = PREFIX + "MIN_D" + POSTFIX; 1197 static { 1198 beforeMatchingNameRegex(MIN_D, "MinD"); 1199 } 1200 1201 public static final String MIN_D_REDUCTION_REG = PREFIX + "MIN_D_REDUCTION_REG" + POSTFIX; 1202 static { 1203 machOnlyNameRegex(MIN_D_REDUCTION_REG, "minD_reduction_reg"); 1204 } 1205 1206 public static final String MIN_D_REG = PREFIX + "MIN_D_REG" + POSTFIX; 1207 static { 1208 machOnlyNameRegex(MIN_D_REG, "minD_reg"); 1209 } 1210 1211 public static final String MIN_F = PREFIX + "MIN_F" + POSTFIX; 1212 static { 1213 beforeMatchingNameRegex(MIN_F, "MinF"); 1214 } 1215 1216 public static final String MIN_F_REDUCTION_REG = PREFIX + "MIN_F_REDUCTION_REG" + POSTFIX; 1217 static { 1218 machOnlyNameRegex(MIN_F_REDUCTION_REG, "minF_reduction_reg"); 1219 } 1220 1221 public static final String MIN_F_REG = PREFIX + "MIN_F_REG" + POSTFIX; 1222 static { 1223 machOnlyNameRegex(MIN_F_REG, "minF_reg"); 1224 } 1225 1226 public static final String MIN_I = PREFIX + "MIN_I" + POSTFIX; 1227 static { 1228 beforeMatchingNameRegex(MIN_I, "MinI"); 1229 } 1230 1231 public static final String MIN_L = PREFIX + "MIN_L" + POSTFIX; 1232 static { 1233 beforeMatchingNameRegex(MIN_L, "MinL"); 1234 } 1235 1236 public static final String MIN_HF = PREFIX + "MIN_HF" + POSTFIX; 1237 static { 1238 beforeMatchingNameRegex(MIN_HF, "MinHF"); 1239 } 1240 1241 public static final String MAX_HF = PREFIX + "MAX_HF" + POSTFIX; 1242 static { 1243 beforeMatchingNameRegex(MAX_HF, "MaxHF"); 1244 } 1245 1246 public static final String MIN_VI = VECTOR_PREFIX + "MIN_VI" + POSTFIX; 1247 static { 1248 vectorNode(MIN_VI, "MinV", TYPE_INT); 1249 } 1250 1251 public static final String MIN_VF = VECTOR_PREFIX + "MIN_VF" + POSTFIX; 1252 static { 1253 vectorNode(MIN_VF, "MinV", TYPE_FLOAT); 1254 } 1255 1256 public static final String MIN_VD = VECTOR_PREFIX + "MIN_VD" + POSTFIX; 1257 static { 1258 vectorNode(MIN_VD, "MinV", TYPE_DOUBLE); 1259 } 1260 1261 public static final String MIN_VL = VECTOR_PREFIX + "MIN_VL" + POSTFIX; 1262 static { 1263 vectorNode(MIN_VL, "MinV", TYPE_LONG); 1264 } 1265 1266 public static final String MOD_I = PREFIX + "MOD_I" + POSTFIX; 1267 static { 1268 beforeMatchingNameRegex(MOD_I, "ModI"); 1269 } 1270 1271 public static final String MOD_L = PREFIX + "MOD_L" + POSTFIX; 1272 static { 1273 beforeMatchingNameRegex(MOD_L, "ModL"); 1274 } 1275 1276 public static final String MOV_F2I = PREFIX + "MOV_F2I" + POSTFIX; 1277 static { 1278 beforeMatchingNameRegex(MOV_F2I, "MoveF2I"); 1279 } 1280 1281 public static final String MOV_I2F = PREFIX + "MOV_I2F" + POSTFIX; 1282 static { 1283 beforeMatchingNameRegex(MOV_I2F, "MoveI2F"); 1284 } 1285 1286 public static final String MOV_D2L = PREFIX + "MOV_D2L" + POSTFIX; 1287 static { 1288 beforeMatchingNameRegex(MOV_D2L, "MoveD2L"); 1289 } 1290 1291 public static final String MOV_L2D = PREFIX + "MOD_L2D" + POSTFIX; 1292 static { 1293 beforeMatchingNameRegex(MOV_L2D, "MoveL2D"); 1294 } 1295 1296 public static final String MUL = PREFIX + "MUL" + POSTFIX; 1297 static { 1298 beforeMatchingNameRegex(MUL, "Mul(I|L|F|D)"); 1299 } 1300 1301 public static final String MUL_ADD_S2I = PREFIX + "MUL_ADD_S2I" + POSTFIX; 1302 static { 1303 beforeMatchingNameRegex(MUL_ADD_S2I, "MulAddS2I"); 1304 } 1305 1306 public static final String MUL_ADD_VS2VI = VECTOR_PREFIX + "MUL_ADD_VS2VI" + POSTFIX; 1307 static { 1308 vectorNode(MUL_ADD_VS2VI, "MulAddVS2VI", TYPE_INT); 1309 } 1310 1311 // Can only be used if avx512_vnni is available. 1312 public static final String MUL_ADD_VS2VI_VNNI = PREFIX + "MUL_ADD_VS2VI_VNNI" + POSTFIX; 1313 static { 1314 machOnly(MUL_ADD_VS2VI_VNNI, "vmuladdaddS2I_reg"); 1315 } 1316 1317 public static final String MUL_D = PREFIX + "MUL_D" + POSTFIX; 1318 static { 1319 beforeMatchingNameRegex(MUL_D, "MulD"); 1320 } 1321 1322 public static final String MUL_F = PREFIX + "MUL_F" + POSTFIX; 1323 static { 1324 beforeMatchingNameRegex(MUL_F, "MulF"); 1325 } 1326 1327 public static final String MUL_HF = PREFIX + "MUL_HF" + POSTFIX; 1328 static { 1329 beforeMatchingNameRegex(MUL_HF, "MulHF"); 1330 } 1331 1332 public static final String MUL_I = PREFIX + "MUL_I" + POSTFIX; 1333 static { 1334 beforeMatchingNameRegex(MUL_I, "MulI"); 1335 } 1336 1337 public static final String MUL_L = PREFIX + "MUL_L" + POSTFIX; 1338 static { 1339 beforeMatchingNameRegex(MUL_L, "MulL"); 1340 } 1341 1342 public static final String MUL_VL = VECTOR_PREFIX + "MUL_VL" + POSTFIX; 1343 static { 1344 vectorNode(MUL_VL, "MulVL", TYPE_LONG); 1345 } 1346 1347 public static final String MUL_VI = VECTOR_PREFIX + "MUL_VI" + POSTFIX; 1348 static { 1349 vectorNode(MUL_VI, "MulVI", TYPE_INT); 1350 } 1351 1352 public static final String MUL_VF = VECTOR_PREFIX + "MUL_VF" + POSTFIX; 1353 static { 1354 vectorNode(MUL_VF, "MulVF", TYPE_FLOAT); 1355 } 1356 1357 public static final String MUL_VD = VECTOR_PREFIX + "MUL_VD" + POSTFIX; 1358 static { 1359 vectorNode(MUL_VD, "MulVD", TYPE_DOUBLE); 1360 } 1361 1362 public static final String MUL_VB = VECTOR_PREFIX + "MUL_VB" + POSTFIX; 1363 static { 1364 vectorNode(MUL_VB, "MulVB", TYPE_BYTE); 1365 } 1366 1367 public static final String MUL_VS = VECTOR_PREFIX + "MUL_VS" + POSTFIX; 1368 static { 1369 vectorNode(MUL_VS, "MulVS", TYPE_SHORT); 1370 } 1371 1372 public static final String MUL_REDUCTION_VD = PREFIX + "MUL_REDUCTION_VD" + POSTFIX; 1373 static { 1374 superWordNodes(MUL_REDUCTION_VD, "MulReductionVD"); 1375 } 1376 1377 public static final String MUL_REDUCTION_VF = PREFIX + "MUL_REDUCTION_VF" + POSTFIX; 1378 static { 1379 superWordNodes(MUL_REDUCTION_VF, "MulReductionVF"); 1380 } 1381 1382 public static final String MUL_REDUCTION_VI = PREFIX + "MUL_REDUCTION_VI" + POSTFIX; 1383 static { 1384 superWordNodes(MUL_REDUCTION_VI, "MulReductionVI"); 1385 } 1386 1387 public static final String MUL_REDUCTION_VL = PREFIX + "MUL_REDUCTION_VL" + POSTFIX; 1388 static { 1389 superWordNodes(MUL_REDUCTION_VL, "MulReductionVL"); 1390 } 1391 1392 public static final String MIN_REDUCTION_V = PREFIX + "MIN_REDUCTION_V" + POSTFIX; 1393 static { 1394 superWordNodes(MIN_REDUCTION_V, "MinReductionV"); 1395 } 1396 1397 public static final String MAX_REDUCTION_V = PREFIX + "MAX_REDUCTION_V" + POSTFIX; 1398 static { 1399 superWordNodes(MAX_REDUCTION_V, "MaxReductionV"); 1400 } 1401 1402 public static final String NEG_F = PREFIX + "NEG_F" + POSTFIX; 1403 static { 1404 beforeMatchingNameRegex(NEG_F, "NegF"); 1405 } 1406 1407 public static final String NEG_D = PREFIX + "NEG_D" + POSTFIX; 1408 static { 1409 beforeMatchingNameRegex(NEG_D, "NegD"); 1410 } 1411 1412 public static final String NEG_VF = VECTOR_PREFIX + "NEG_VF" + POSTFIX; 1413 static { 1414 vectorNode(NEG_VF, "NegVF", TYPE_FLOAT); 1415 } 1416 1417 public static final String NEG_VD = VECTOR_PREFIX + "NEG_VD" + POSTFIX; 1418 static { 1419 vectorNode(NEG_VD, "NegVD", TYPE_DOUBLE); 1420 } 1421 1422 public static final String NOP = PREFIX + "NOP" + POSTFIX; 1423 static { 1424 machOnlyNameRegex(NOP, "Nop"); 1425 } 1426 1427 public static final String NULL_ASSERT_TRAP = PREFIX + "NULL_ASSERT_TRAP" + POSTFIX; 1428 static { 1429 trapNodes(NULL_ASSERT_TRAP, "null_assert"); 1430 } 1431 1432 public static final String NULL_CHECK_TRAP = PREFIX + "NULL_CHECK_TRAP" + POSTFIX; 1433 static { 1434 trapNodes(NULL_CHECK_TRAP, "null_check"); 1435 } 1436 1437 public static final String OOPMAP_WITH = COMPOSITE_PREFIX + "OOPMAP_WITH" + POSTFIX; 1438 static { 1439 String regex = "(#\\s*OopMap\\s*\\{.*" + IS_REPLACED + ".*\\})"; 1440 optoOnly(OOPMAP_WITH, regex); 1441 } 1442 1443 public static final String OR_I = PREFIX + "OR_I" + POSTFIX; 1444 static { 1445 beforeMatchingNameRegex(OR_I, "OrI"); 1446 } 1447 1448 public static final String OR_L = PREFIX + "OR_L" + POSTFIX; 1449 static { 1450 beforeMatchingNameRegex(OR_L, "OrL"); 1451 } 1452 1453 public static final String OR_VB = VECTOR_PREFIX + "OR_VB" + POSTFIX; 1454 static { 1455 vectorNode(OR_VB, "OrV", TYPE_BYTE); 1456 } 1457 1458 public static final String OR_VS = VECTOR_PREFIX + "OR_VS" + POSTFIX; 1459 static { 1460 vectorNode(OR_VS, "OrV", TYPE_SHORT); 1461 } 1462 1463 public static final String OR_VI = VECTOR_PREFIX + "OR_VI" + POSTFIX; 1464 static { 1465 vectorNode(OR_VI, "OrV", TYPE_INT); 1466 } 1467 1468 public static final String OR_VL = VECTOR_PREFIX + "OR_VL" + POSTFIX; 1469 static { 1470 vectorNode(OR_VL, "OrV", TYPE_LONG); 1471 } 1472 1473 public static final String OR_V_MASK = PREFIX + "OR_V_MASK" + POSTFIX; 1474 static { 1475 beforeMatchingNameRegex(OR_V_MASK, "OrVMask"); 1476 } 1477 1478 public static final String OR_REDUCTION_V = PREFIX + "OR_REDUCTION_V" + POSTFIX; 1479 static { 1480 superWordNodes(OR_REDUCTION_V, "OrReductionV"); 1481 } 1482 1483 public static final String OUTER_STRIP_MINED_LOOP = PREFIX + "OUTER_STRIP_MINED_LOOP" + POSTFIX; 1484 static { 1485 String regex = START + "OuterStripMinedLoop\\b" + MID + END; 1486 fromAfterCountedLoops(OUTER_STRIP_MINED_LOOP, regex); 1487 } 1488 1489 public static final String PARTIAL_SUBTYPE_CHECK = PREFIX + "PARTIAL_SUBTYPE_CHECK" + POSTFIX; 1490 static { 1491 beforeMatchingNameRegex(PARTIAL_SUBTYPE_CHECK, "PartialSubtypeCheck"); 1492 } 1493 1494 public static final String PHI = PREFIX + "PHI" + POSTFIX; 1495 static { 1496 beforeMatchingNameRegex(PHI, "Phi"); 1497 } 1498 1499 public static final String POPCOUNT_L = PREFIX + "POPCOUNT_L" + POSTFIX; 1500 static { 1501 beforeMatchingNameRegex(POPCOUNT_L, "PopCountL"); 1502 } 1503 1504 public static final String POPCOUNT_VI = VECTOR_PREFIX + "POPCOUNT_VI" + POSTFIX; 1505 static { 1506 vectorNode(POPCOUNT_VI, "PopCountVI", TYPE_INT); 1507 } 1508 1509 public static final String POPCOUNT_VL = VECTOR_PREFIX + "POPCOUNT_VL" + POSTFIX; 1510 static { 1511 vectorNode(POPCOUNT_VL, "PopCountVL", TYPE_LONG); 1512 } 1513 1514 public static final String COUNT_TRAILING_ZEROS_VL = VECTOR_PREFIX + "COUNT_TRAILING_ZEROS_VL" + POSTFIX; 1515 static { 1516 vectorNode(COUNT_TRAILING_ZEROS_VL, "CountTrailingZerosV", TYPE_LONG); 1517 } 1518 1519 public static final String COUNT_TRAILING_ZEROS_VI = VECTOR_PREFIX + "COUNT_TRAILING_ZEROS_VI" + POSTFIX; 1520 static { 1521 vectorNode(COUNT_TRAILING_ZEROS_VI, "CountTrailingZerosV", TYPE_INT); 1522 } 1523 1524 public static final String COUNT_LEADING_ZEROS_VL = VECTOR_PREFIX + "COUNT_LEADING_ZEROS_VL" + POSTFIX; 1525 static { 1526 vectorNode(COUNT_LEADING_ZEROS_VL, "CountLeadingZerosV", TYPE_LONG); 1527 } 1528 1529 public static final String COUNT_LEADING_ZEROS_VI = VECTOR_PREFIX + "COUNT_LEADING_ZEROS_VI" + POSTFIX; 1530 static { 1531 vectorNode(COUNT_LEADING_ZEROS_VI, "CountLeadingZerosV", TYPE_INT); 1532 } 1533 1534 public static final String POPULATE_INDEX = PREFIX + "POPULATE_INDEX" + POSTFIX; 1535 static { 1536 String regex = START + "PopulateIndex" + MID + END; 1537 IR_NODE_MAPPINGS.put(POPULATE_INDEX, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 1538 CompilePhase.AFTER_CLOOPS, 1539 CompilePhase.BEFORE_MATCHING)); 1540 } 1541 1542 public static final String LOOP_PARSE_PREDICATE = PREFIX + "LOOP_PARSE_PREDICATE" + POSTFIX; 1543 static { 1544 parsePredicateNodes(LOOP_PARSE_PREDICATE, "Loop"); 1545 } 1546 1547 public static final String LOOP_LIMIT_CHECK_PARSE_PREDICATE = PREFIX + "LOOP_LIMIT_CHECK_PARSE_PREDICATE" + POSTFIX; 1548 static { 1549 parsePredicateNodes(LOOP_LIMIT_CHECK_PARSE_PREDICATE, "Loop Limit Check"); 1550 } 1551 1552 public static final String PROFILED_LOOP_PARSE_PREDICATE = PREFIX + "PROFILED_LOOP_PARSE_PREDICATE" + POSTFIX; 1553 static { 1554 parsePredicateNodes(PROFILED_LOOP_PARSE_PREDICATE, "Profiled Loop"); 1555 } 1556 1557 public static final String PREDICATE_TRAP = PREFIX + "PREDICATE_TRAP" + POSTFIX; 1558 static { 1559 trapNodes(PREDICATE_TRAP, "predicate"); 1560 } 1561 1562 public static final String RANGE_CHECK_TRAP = PREFIX + "RANGE_CHECK_TRAP" + POSTFIX; 1563 static { 1564 trapNodes(RANGE_CHECK_TRAP, "range_check"); 1565 } 1566 1567 public static final String REINTERPRET_S2HF = PREFIX + "REINTERPRET_S2HF" + POSTFIX; 1568 static { 1569 beforeMatchingNameRegex(REINTERPRET_S2HF, "ReinterpretS2HF"); 1570 } 1571 1572 public static final String REINTERPRET_HF2S = PREFIX + "REINTERPRET_HF2S" + POSTFIX; 1573 static { 1574 beforeMatchingNameRegex(REINTERPRET_HF2S, "ReinterpretHF2S"); 1575 } 1576 1577 public static final String REPLICATE_B = VECTOR_PREFIX + "REPLICATE_B" + POSTFIX; 1578 static { 1579 vectorNode(REPLICATE_B, "Replicate", TYPE_BYTE); 1580 } 1581 1582 public static final String REPLICATE_S = VECTOR_PREFIX + "REPLICATE_S" + POSTFIX; 1583 static { 1584 vectorNode(REPLICATE_S, "Replicate", TYPE_SHORT); 1585 } 1586 1587 public static final String REPLICATE_I = VECTOR_PREFIX + "REPLICATE_I" + POSTFIX; 1588 static { 1589 vectorNode(REPLICATE_I, "Replicate", TYPE_INT); 1590 } 1591 1592 public static final String REPLICATE_L = VECTOR_PREFIX + "REPLICATE_L" + POSTFIX; 1593 static { 1594 vectorNode(REPLICATE_L, "Replicate", TYPE_LONG); 1595 } 1596 1597 public static final String REPLICATE_F = VECTOR_PREFIX + "REPLICATE_F" + POSTFIX; 1598 static { 1599 vectorNode(REPLICATE_F, "Replicate", TYPE_FLOAT); 1600 } 1601 1602 public static final String REPLICATE_D = VECTOR_PREFIX + "REPLICATE_D" + POSTFIX; 1603 static { 1604 vectorNode(REPLICATE_D, "Replicate", TYPE_DOUBLE); 1605 } 1606 1607 public static final String REVERSE_BYTES_I = PREFIX + "REVERSE_BYTES_I" + POSTFIX; 1608 static { 1609 beforeMatchingNameRegex(REVERSE_BYTES_I, "ReverseBytesI"); 1610 } 1611 1612 public static final String REVERSE_BYTES_L = PREFIX + "REVERSE_BYTES_L" + POSTFIX; 1613 static { 1614 beforeMatchingNameRegex(REVERSE_BYTES_L, "ReverseBytesL"); 1615 } 1616 1617 public static final String REVERSE_BYTES_S = PREFIX + "REVERSE_BYTES_S" + POSTFIX; 1618 static { 1619 beforeMatchingNameRegex(REVERSE_BYTES_S, "ReverseBytesS"); 1620 } 1621 1622 public static final String REVERSE_BYTES_US = PREFIX + "REVERSE_BYTES_US" + POSTFIX; 1623 static { 1624 beforeMatchingNameRegex(REVERSE_BYTES_US, "ReverseBytesUS"); 1625 } 1626 1627 public static final String REVERSE_BYTES_VB = VECTOR_PREFIX + "REVERSE_BYTES_VB" + POSTFIX; 1628 static { 1629 vectorNode(REVERSE_BYTES_VB, "ReverseBytesV", TYPE_BYTE); 1630 } 1631 1632 public static final String REVERSE_BYTES_VS = VECTOR_PREFIX + "REVERSE_BYTES_VS" + POSTFIX; 1633 static { 1634 vectorNode(REVERSE_BYTES_VS, "ReverseBytesV", TYPE_SHORT); 1635 } 1636 1637 public static final String REVERSE_BYTES_VI = VECTOR_PREFIX + "REVERSE_BYTES_VI" + POSTFIX; 1638 static { 1639 vectorNode(REVERSE_BYTES_VI, "ReverseBytesV", TYPE_INT); 1640 } 1641 1642 public static final String REVERSE_BYTES_VL = VECTOR_PREFIX + "REVERSE_BYTES_VL" + POSTFIX; 1643 static { 1644 vectorNode(REVERSE_BYTES_VL, "ReverseBytesV", TYPE_LONG); 1645 } 1646 1647 public static final String REVERSE_I = PREFIX + "REVERSE_I" + POSTFIX; 1648 static { 1649 beforeMatchingNameRegex(REVERSE_I, "ReverseI"); 1650 } 1651 1652 public static final String REVERSE_L = PREFIX + "REVERSE_L" + POSTFIX; 1653 static { 1654 beforeMatchingNameRegex(REVERSE_L, "ReverseL"); 1655 } 1656 1657 public static final String REVERSE_VI = VECTOR_PREFIX + "REVERSE_VI" + POSTFIX; 1658 static { 1659 vectorNode(REVERSE_VI, "ReverseV", TYPE_INT); 1660 } 1661 1662 public static final String REVERSE_VL = VECTOR_PREFIX + "REVERSE_VL" + POSTFIX; 1663 static { 1664 vectorNode(REVERSE_VL, "ReverseV", TYPE_LONG); 1665 } 1666 1667 public static final String ROUND_VD = VECTOR_PREFIX + "ROUND_VD" + POSTFIX; 1668 static { 1669 vectorNode(ROUND_VD, "RoundVD", TYPE_LONG); 1670 } 1671 1672 public static final String ROUND_VF = VECTOR_PREFIX + "ROUND_VF" + POSTFIX; 1673 static { 1674 vectorNode(ROUND_VF, "RoundVF", TYPE_INT); 1675 } 1676 1677 public static final String ROTATE_LEFT = PREFIX + "ROTATE_LEFT" + POSTFIX; 1678 static { 1679 beforeMatchingNameRegex(ROTATE_LEFT, "RotateLeft"); 1680 } 1681 1682 public static final String ROTATE_RIGHT = PREFIX + "ROTATE_RIGHT" + POSTFIX; 1683 static { 1684 beforeMatchingNameRegex(ROTATE_RIGHT, "RotateRight"); 1685 } 1686 1687 public static final String ROTATE_LEFT_V = PREFIX + "ROTATE_LEFT_V" + POSTFIX; 1688 static { 1689 beforeMatchingNameRegex(ROTATE_LEFT_V, "RotateLeftV"); 1690 } 1691 1692 public static final String ROTATE_RIGHT_V = PREFIX + "ROTATE_RIGHT_V" + POSTFIX; 1693 static { 1694 beforeMatchingNameRegex(ROTATE_RIGHT_V, "RotateRightV"); 1695 } 1696 1697 public static final String ROUND_DOUBLE_MODE_V = VECTOR_PREFIX + "ROUND_DOUBLE_MODE_V" + POSTFIX; 1698 static { 1699 vectorNode(ROUND_DOUBLE_MODE_V, "RoundDoubleModeV", TYPE_DOUBLE); 1700 } 1701 1702 public static final String RSHIFT = PREFIX + "RSHIFT" + POSTFIX; 1703 static { 1704 beforeMatchingNameRegex(RSHIFT, "RShift(I|L)"); 1705 } 1706 1707 public static final String RSHIFT_I = PREFIX + "RSHIFT_I" + POSTFIX; 1708 static { 1709 beforeMatchingNameRegex(RSHIFT_I, "RShiftI"); 1710 } 1711 1712 public static final String RSHIFT_L = PREFIX + "RSHIFT_L" + POSTFIX; 1713 static { 1714 beforeMatchingNameRegex(RSHIFT_L, "RShiftL"); 1715 } 1716 1717 public static final String RSHIFT_VB = VECTOR_PREFIX + "RSHIFT_VB" + POSTFIX; 1718 static { 1719 vectorNode(RSHIFT_VB, "RShiftVB", TYPE_BYTE); 1720 } 1721 1722 public static final String RSHIFT_VS = VECTOR_PREFIX + "RSHIFT_VS" + POSTFIX; 1723 static { 1724 vectorNode(RSHIFT_VS, "RShiftVS", TYPE_SHORT); 1725 } 1726 1727 public static final String RSHIFT_VC = VECTOR_PREFIX + "RSHIFT_VC" + POSTFIX; 1728 static { 1729 vectorNode(RSHIFT_VC, "RShiftVS", TYPE_CHAR); // short computation with char type 1730 } 1731 1732 public static final String RSHIFT_VI = VECTOR_PREFIX + "RSHIFT_VI" + POSTFIX; 1733 static { 1734 vectorNode(RSHIFT_VI, "RShiftVI", TYPE_INT); 1735 } 1736 1737 public static final String RSHIFT_VL = VECTOR_PREFIX + "RSHIFT_VL" + POSTFIX; 1738 static { 1739 vectorNode(RSHIFT_VL, "RShiftVL", TYPE_LONG); 1740 } 1741 1742 public static final String SAFEPOINT = PREFIX + "SAFEPOINT" + POSTFIX; 1743 static { 1744 beforeMatchingNameRegex(SAFEPOINT, "SafePoint"); 1745 } 1746 1747 public static final String SCOPE_OBJECT = PREFIX + "SCOPE_OBJECT" + POSTFIX; 1748 static { 1749 String regex = "(.*# ScObj.*" + END; 1750 optoOnly(SCOPE_OBJECT, regex); 1751 } 1752 1753 public static final String SIGNUM_VD = VECTOR_PREFIX + "SIGNUM_VD" + POSTFIX; 1754 static { 1755 vectorNode(SIGNUM_VD, "SignumVD", TYPE_DOUBLE); 1756 } 1757 1758 public static final String SIGNUM_VF = VECTOR_PREFIX + "SIGNUM_VF" + POSTFIX; 1759 static { 1760 vectorNode(SIGNUM_VF, "SignumVF", TYPE_FLOAT); 1761 } 1762 1763 public static final String SQRT_HF = PREFIX + "SQRT_HF" + POSTFIX; 1764 static { 1765 beforeMatchingNameRegex(SQRT_HF, "SqrtHF"); 1766 } 1767 1768 public static final String SQRT_F = PREFIX + "SQRT_F" + POSTFIX; 1769 static { 1770 beforeMatchingNameRegex(SQRT_F, "SqrtF"); 1771 } 1772 1773 public static final String SQRT_VF = VECTOR_PREFIX + "SQRT_VF" + POSTFIX; 1774 static { 1775 vectorNode(SQRT_VF, "SqrtVF", TYPE_FLOAT); 1776 } 1777 1778 public static final String SQRT_VD = VECTOR_PREFIX + "SQRT_VD" + POSTFIX; 1779 static { 1780 vectorNode(SQRT_VD, "SqrtVD", TYPE_DOUBLE); 1781 } 1782 1783 public static final String STORE = PREFIX + "STORE" + POSTFIX; 1784 static { 1785 beforeMatchingNameRegex(STORE, "Store(B|C|S|I|L|F|D|P|N)"); 1786 } 1787 1788 public static final String STORE_B = PREFIX + "STORE_B" + POSTFIX; 1789 static { 1790 beforeMatchingNameRegex(STORE_B, "StoreB"); 1791 } 1792 1793 public static final String STORE_B_OF_CLASS = COMPOSITE_PREFIX + "STORE_B_OF_CLASS" + POSTFIX; 1794 static { 1795 storeOfNodes(STORE_B_OF_CLASS, "StoreB"); 1796 } 1797 1798 public static final String STORE_C = PREFIX + "STORE_C" + POSTFIX; 1799 static { 1800 beforeMatchingNameRegex(STORE_C, "StoreC"); 1801 } 1802 1803 public static final String STORE_C_OF_CLASS = COMPOSITE_PREFIX + "STORE_C_OF_CLASS" + POSTFIX; 1804 static { 1805 storeOfNodes(STORE_C_OF_CLASS, "StoreC"); 1806 } 1807 1808 public static final String STORE_D = PREFIX + "STORE_D" + POSTFIX; 1809 static { 1810 beforeMatchingNameRegex(STORE_D, "StoreD"); 1811 } 1812 1813 public static final String STORE_D_OF_CLASS = COMPOSITE_PREFIX + "STORE_D_OF_CLASS" + POSTFIX; 1814 static { 1815 storeOfNodes(STORE_D_OF_CLASS, "StoreD"); 1816 } 1817 1818 public static final String STORE_F = PREFIX + "STORE_F" + POSTFIX; 1819 static { 1820 beforeMatchingNameRegex(STORE_F, "StoreF"); 1821 } 1822 1823 public static final String STORE_F_OF_CLASS = COMPOSITE_PREFIX + "STORE_F_OF_CLASS" + POSTFIX; 1824 static { 1825 storeOfNodes(STORE_F_OF_CLASS, "StoreF"); 1826 } 1827 1828 public static final String STORE_I = PREFIX + "STORE_I" + POSTFIX; 1829 static { 1830 beforeMatchingNameRegex(STORE_I, "StoreI"); 1831 } 1832 1833 public static final String STORE_I_OF_CLASS = COMPOSITE_PREFIX + "STORE_I_OF_CLASS" + POSTFIX; 1834 static { 1835 storeOfNodes(STORE_I_OF_CLASS, "StoreI"); 1836 } 1837 1838 public static final String STORE_L = PREFIX + "STORE_L" + POSTFIX; 1839 static { 1840 beforeMatchingNameRegex(STORE_L, "StoreL"); 1841 } 1842 1843 public static final String STORE_L_OF_CLASS = COMPOSITE_PREFIX + "STORE_L_OF_CLASS" + POSTFIX; 1844 static { 1845 storeOfNodes(STORE_L_OF_CLASS, "StoreL"); 1846 } 1847 1848 public static final String STORE_N = PREFIX + "STORE_N" + POSTFIX; 1849 static { 1850 beforeMatchingNameRegex(STORE_N, "StoreN"); 1851 } 1852 1853 public static final String STORE_N_OF_CLASS = COMPOSITE_PREFIX + "STORE_N_OF_CLASS" + POSTFIX; 1854 static { 1855 storeOfNodes(STORE_N_OF_CLASS, "StoreN"); 1856 } 1857 1858 public static final String STORE_OF_CLASS = COMPOSITE_PREFIX + "STORE_OF_CLASS" + POSTFIX; 1859 static { 1860 storeOfNodes(STORE_OF_CLASS, "Store(B|C|S|I|L|F|D|P|N)"); 1861 } 1862 1863 public static final String STORE_OF_FIELD = COMPOSITE_PREFIX + "STORE_OF_FIELD" + POSTFIX; 1864 static { 1865 String regex = START + "Store(B|C|S|I|L|F|D|P|N)" + MID + "@.*name=" + IS_REPLACED + ",.*" + END; 1866 beforeMatching(STORE_OF_FIELD, regex); 1867 } 1868 1869 public static final String STORE_P = PREFIX + "STORE_P" + POSTFIX; 1870 static { 1871 beforeMatchingNameRegex(STORE_P, "StoreP"); 1872 } 1873 1874 public static final String STORE_P_OF_CLASS = COMPOSITE_PREFIX + "STORE_P_OF_CLASS" + POSTFIX; 1875 static { 1876 storeOfNodes(STORE_P_OF_CLASS, "StoreP"); 1877 } 1878 1879 public static final String STORE_VECTOR = PREFIX + "STORE_VECTOR" + POSTFIX; 1880 static { 1881 beforeMatchingNameRegex(STORE_VECTOR, "StoreVector"); 1882 } 1883 1884 public static final String STORE_VECTOR_SCATTER = PREFIX + "STORE_VECTOR_SCATTER" + POSTFIX; 1885 static { 1886 beforeMatchingNameRegex(STORE_VECTOR_SCATTER, "StoreVectorScatter"); 1887 } 1888 1889 public static final String STORE_VECTOR_MASKED = PREFIX + "STORE_VECTOR_MASKED" + POSTFIX; 1890 static { 1891 beforeMatchingNameRegex(STORE_VECTOR_MASKED, "StoreVectorMasked"); 1892 } 1893 1894 public static final String STORE_VECTOR_SCATTER_MASKED = PREFIX + "STORE_VECTOR_SCATTER_MASKED" + POSTFIX; 1895 static { 1896 beforeMatchingNameRegex(STORE_VECTOR_SCATTER_MASKED, "StoreVectorScatterMasked"); 1897 } 1898 1899 public static final String SUB = PREFIX + "SUB" + POSTFIX; 1900 static { 1901 beforeMatchingNameRegex(SUB, "Sub(I|L|F|D|HF)"); 1902 } 1903 1904 public static final String SUB_D = PREFIX + "SUB_D" + POSTFIX; 1905 static { 1906 beforeMatchingNameRegex(SUB_D, "SubD"); 1907 } 1908 1909 public static final String SUB_F = PREFIX + "SUB_F" + POSTFIX; 1910 static { 1911 beforeMatchingNameRegex(SUB_F, "SubF"); 1912 } 1913 1914 public static final String SUB_HF = PREFIX + "SUB_HF" + POSTFIX; 1915 static { 1916 beforeMatchingNameRegex(SUB_HF, "SubHF"); 1917 } 1918 1919 public static final String SUB_I = PREFIX + "SUB_I" + POSTFIX; 1920 static { 1921 beforeMatchingNameRegex(SUB_I, "SubI"); 1922 } 1923 1924 public static final String SUB_L = PREFIX + "SUB_L" + POSTFIX; 1925 static { 1926 beforeMatchingNameRegex(SUB_L, "SubL"); 1927 } 1928 1929 public static final String SUB_VB = VECTOR_PREFIX + "SUB_VB" + POSTFIX; 1930 static { 1931 vectorNode(SUB_VB, "SubVB", TYPE_BYTE); 1932 } 1933 1934 public static final String SUB_VS = VECTOR_PREFIX + "SUB_VS" + POSTFIX; 1935 static { 1936 vectorNode(SUB_VS, "SubVS", TYPE_SHORT); 1937 } 1938 1939 public static final String SUB_VI = VECTOR_PREFIX + "SUB_VI" + POSTFIX; 1940 static { 1941 vectorNode(SUB_VI, "SubVI", TYPE_INT); 1942 } 1943 1944 public static final String SUB_VL = VECTOR_PREFIX + "SUB_VL" + POSTFIX; 1945 static { 1946 vectorNode(SUB_VL, "SubVL", TYPE_LONG); 1947 } 1948 1949 public static final String SUB_VF = VECTOR_PREFIX + "SUB_VF" + POSTFIX; 1950 static { 1951 vectorNode(SUB_VF, "SubVF", TYPE_FLOAT); 1952 } 1953 1954 public static final String SUB_VD = VECTOR_PREFIX + "SUB_VD" + POSTFIX; 1955 static { 1956 vectorNode(SUB_VD, "SubVD", TYPE_DOUBLE); 1957 } 1958 1959 public static final String SUBTYPE_CHECK = PREFIX + "SUBTYPE_CHECK" + POSTFIX; 1960 static { 1961 beforeMatchingNameRegex(SUBTYPE_CHECK, "SubTypeCheck"); 1962 } 1963 1964 public static final String TRAP = PREFIX + "TRAP" + POSTFIX; 1965 static { 1966 trapNodes(TRAP, "reason"); 1967 } 1968 1969 public static final String DIV_HF = PREFIX + "DIV_HF" + POSTFIX; 1970 static { 1971 beforeMatchingNameRegex(DIV_HF, "DivHF"); 1972 } 1973 1974 public static final String UDIV_I = PREFIX + "UDIV_I" + POSTFIX; 1975 static { 1976 beforeMatchingNameRegex(UDIV_I, "UDivI"); 1977 } 1978 1979 public static final String UDIV_L = PREFIX + "UDIV_L" + POSTFIX; 1980 static { 1981 beforeMatchingNameRegex(UDIV_L, "UDivL"); 1982 } 1983 1984 public static final String UDIV_MOD_I = PREFIX + "UDIV_MOD_I" + POSTFIX; 1985 static { 1986 beforeMatchingNameRegex(UDIV_MOD_I, "UDivModI"); 1987 } 1988 1989 public static final String UDIV_MOD_L = PREFIX + "UDIV_MOD_L" + POSTFIX; 1990 static { 1991 beforeMatchingNameRegex(UDIV_MOD_L, "UDivModL"); 1992 } 1993 1994 public static final String UMOD_I = PREFIX + "UMOD_I" + POSTFIX; 1995 static { 1996 beforeMatchingNameRegex(UMOD_I, "UModI"); 1997 } 1998 1999 public static final String UMOD_L = PREFIX + "UMOD_L" + POSTFIX; 2000 static { 2001 beforeMatchingNameRegex(UMOD_L, "UModL"); 2002 } 2003 2004 public static final String UNHANDLED_TRAP = PREFIX + "UNHANDLED_TRAP" + POSTFIX; 2005 static { 2006 trapNodes(UNHANDLED_TRAP, "unhandled"); 2007 } 2008 2009 public static final String UNSTABLE_IF_TRAP = PREFIX + "UNSTABLE_IF_TRAP" + POSTFIX; 2010 static { 2011 trapNodes(UNSTABLE_IF_TRAP, "unstable_if"); 2012 } 2013 2014 public static final String UNREACHED_TRAP = PREFIX + "UNREACHED_TRAP" + POSTFIX; 2015 static { 2016 trapNodes(UNREACHED_TRAP, "unreached"); 2017 } 2018 2019 public static final String URSHIFT = PREFIX + "URSHIFT" + POSTFIX; 2020 static { 2021 beforeMatchingNameRegex(URSHIFT, "URShift(B|S|I|L)"); 2022 } 2023 2024 public static final String URSHIFT_B = PREFIX + "URSHIFT_B" + POSTFIX; 2025 static { 2026 beforeMatchingNameRegex(URSHIFT_B, "URShiftB"); 2027 } 2028 2029 public static final String URSHIFT_I = PREFIX + "URSHIFT_I" + POSTFIX; 2030 static { 2031 beforeMatchingNameRegex(URSHIFT_I, "URShiftI"); 2032 } 2033 2034 public static final String URSHIFT_L = PREFIX + "URSHIFT_L" + POSTFIX; 2035 static { 2036 beforeMatchingNameRegex(URSHIFT_L, "URShiftL"); 2037 } 2038 2039 public static final String URSHIFT_S = PREFIX + "URSHIFT_S" + POSTFIX; 2040 static { 2041 beforeMatchingNameRegex(URSHIFT_S, "URShiftS"); 2042 } 2043 2044 public static final String URSHIFT_VB = VECTOR_PREFIX + "URSHIFT_VB" + POSTFIX; 2045 static { 2046 vectorNode(URSHIFT_VB, "URShiftVB", TYPE_BYTE); 2047 } 2048 2049 public static final String URSHIFT_VS = VECTOR_PREFIX + "URSHIFT_VS" + POSTFIX; 2050 static { 2051 vectorNode(URSHIFT_VS, "URShiftVS", TYPE_SHORT); 2052 } 2053 2054 public static final String URSHIFT_VC = VECTOR_PREFIX + "URSHIFT_VC" + POSTFIX; 2055 static { 2056 vectorNode(URSHIFT_VC, "URShiftVS", TYPE_CHAR); // short computation with char type 2057 } 2058 2059 public static final String URSHIFT_VI = VECTOR_PREFIX + "URSHIFT_VI" + POSTFIX; 2060 static { 2061 vectorNode(URSHIFT_VI, "URShiftVI", TYPE_INT); 2062 } 2063 2064 public static final String URSHIFT_VL = VECTOR_PREFIX + "URSHIFT_VL" + POSTFIX; 2065 static { 2066 vectorNode(URSHIFT_VL, "URShiftVL", TYPE_LONG); 2067 } 2068 2069 public static final String VAND_NOT_I = PREFIX + "VAND_NOT_I" + POSTFIX; 2070 static { 2071 machOnlyNameRegex(VAND_NOT_I, "vand_notI"); 2072 } 2073 2074 public static final String VAND_NOT_L = PREFIX + "VAND_NOT_L" + POSTFIX; 2075 static { 2076 machOnlyNameRegex(VAND_NOT_L, "vand_notL"); 2077 } 2078 2079 public static final String VECTOR_BLEND_B = VECTOR_PREFIX + "VECTOR_BLEND_B" + POSTFIX; 2080 static { 2081 vectorNode(VECTOR_BLEND_B, "VectorBlend", TYPE_BYTE); 2082 } 2083 2084 public static final String VECTOR_BLEND_S = VECTOR_PREFIX + "VECTOR_BLEND_S" + POSTFIX; 2085 static { 2086 vectorNode(VECTOR_BLEND_S, "VectorBlend", TYPE_SHORT); 2087 } 2088 2089 public static final String VECTOR_BLEND_I = VECTOR_PREFIX + "VECTOR_BLEND_I" + POSTFIX; 2090 static { 2091 vectorNode(VECTOR_BLEND_I, "VectorBlend", TYPE_INT); 2092 } 2093 2094 public static final String VECTOR_BLEND_L = VECTOR_PREFIX + "VECTOR_BLEND_L" + POSTFIX; 2095 static { 2096 vectorNode(VECTOR_BLEND_L, "VectorBlend", TYPE_LONG); 2097 } 2098 2099 public static final String VECTOR_BLEND_F = VECTOR_PREFIX + "VECTOR_BLEND_F" + POSTFIX; 2100 static { 2101 vectorNode(VECTOR_BLEND_F, "VectorBlend", TYPE_FLOAT); 2102 } 2103 2104 public static final String VECTOR_BLEND_D = VECTOR_PREFIX + "VECTOR_BLEND_D" + POSTFIX; 2105 static { 2106 vectorNode(VECTOR_BLEND_D, "VectorBlend", TYPE_DOUBLE); 2107 } 2108 2109 public static final String VECTOR_MASK_CMP_I = VECTOR_PREFIX + "VECTOR_MASK_CMP_I" + POSTFIX; 2110 static { 2111 vectorNode(VECTOR_MASK_CMP_I, "VectorMaskCmp", TYPE_INT); 2112 } 2113 2114 public static final String VECTOR_MASK_CMP_L = VECTOR_PREFIX + "VECTOR_MASK_CMP_L" + POSTFIX; 2115 static { 2116 vectorNode(VECTOR_MASK_CMP_L, "VectorMaskCmp", TYPE_LONG); 2117 } 2118 2119 public static final String VECTOR_MASK_CMP_F = VECTOR_PREFIX + "VECTOR_MASK_CMP_F" + POSTFIX; 2120 static { 2121 vectorNode(VECTOR_MASK_CMP_F, "VectorMaskCmp", TYPE_FLOAT); 2122 } 2123 2124 public static final String VECTOR_MASK_CMP_D = VECTOR_PREFIX + "VECTOR_MASK_CMP_D" + POSTFIX; 2125 static { 2126 vectorNode(VECTOR_MASK_CMP_D, "VectorMaskCmp", TYPE_DOUBLE); 2127 } 2128 2129 public static final String VECTOR_CAST_B2S = VECTOR_PREFIX + "VECTOR_CAST_B2S" + POSTFIX; 2130 static { 2131 vectorNode(VECTOR_CAST_B2S, "VectorCastB2X", TYPE_SHORT); 2132 } 2133 2134 public static final String VECTOR_CAST_B2I = VECTOR_PREFIX + "VECTOR_CAST_B2I" + POSTFIX; 2135 static { 2136 vectorNode(VECTOR_CAST_B2I, "VectorCastB2X", TYPE_INT); 2137 } 2138 2139 public static final String VECTOR_CAST_B2L = VECTOR_PREFIX + "VECTOR_CAST_B2L" + POSTFIX; 2140 static { 2141 vectorNode(VECTOR_CAST_B2L, "VectorCastB2X", TYPE_LONG); 2142 } 2143 2144 public static final String VECTOR_CAST_B2F = VECTOR_PREFIX + "VECTOR_CAST_B2F" + POSTFIX; 2145 static { 2146 vectorNode(VECTOR_CAST_B2F, "VectorCastB2X", TYPE_FLOAT); 2147 } 2148 2149 public static final String VECTOR_CAST_B2D = VECTOR_PREFIX + "VECTOR_CAST_B2D" + POSTFIX; 2150 static { 2151 vectorNode(VECTOR_CAST_B2D, "VectorCastB2X", TYPE_DOUBLE); 2152 } 2153 2154 public static final String VECTOR_CAST_D2B = VECTOR_PREFIX + "VECTOR_CAST_D2B" + POSTFIX; 2155 static { 2156 vectorNode(VECTOR_CAST_D2B, "VectorCastD2X", TYPE_BYTE); 2157 } 2158 2159 public static final String VECTOR_CAST_D2S = VECTOR_PREFIX + "VECTOR_CAST_D2S" + POSTFIX; 2160 static { 2161 vectorNode(VECTOR_CAST_D2S, "VectorCastD2X", TYPE_SHORT); 2162 } 2163 2164 public static final String VECTOR_CAST_D2I = VECTOR_PREFIX + "VECTOR_CAST_D2I" + POSTFIX; 2165 static { 2166 vectorNode(VECTOR_CAST_D2I, "VectorCastD2X", TYPE_INT); 2167 } 2168 2169 public static final String VECTOR_CAST_D2L = VECTOR_PREFIX + "VECTOR_CAST_D2L" + POSTFIX; 2170 static { 2171 vectorNode(VECTOR_CAST_D2L, "VectorCastD2X", TYPE_LONG); 2172 } 2173 2174 public static final String VECTOR_CAST_D2F = VECTOR_PREFIX + "VECTOR_CAST_D2F" + POSTFIX; 2175 static { 2176 vectorNode(VECTOR_CAST_D2F, "VectorCastD2X", TYPE_FLOAT); 2177 } 2178 2179 public static final String VECTOR_CAST_F2B = VECTOR_PREFIX + "VECTOR_CAST_F2B" + POSTFIX; 2180 static { 2181 vectorNode(VECTOR_CAST_F2B, "VectorCastF2X", TYPE_BYTE); 2182 } 2183 2184 public static final String VECTOR_CAST_F2S = VECTOR_PREFIX + "VECTOR_CAST_F2S" + POSTFIX; 2185 static { 2186 vectorNode(VECTOR_CAST_F2S, "VectorCastF2X", TYPE_SHORT); 2187 } 2188 2189 public static final String VECTOR_CAST_F2I = VECTOR_PREFIX + "VECTOR_CAST_F2I" + POSTFIX; 2190 static { 2191 vectorNode(VECTOR_CAST_F2I, "VectorCastF2X", TYPE_INT); 2192 } 2193 2194 public static final String VECTOR_CAST_F2L = VECTOR_PREFIX + "VECTOR_CAST_F2L" + POSTFIX; 2195 static { 2196 vectorNode(VECTOR_CAST_F2L, "VectorCastF2X", TYPE_LONG); 2197 } 2198 2199 public static final String VECTOR_CAST_F2D = VECTOR_PREFIX + "VECTOR_CAST_F2D" + POSTFIX; 2200 static { 2201 vectorNode(VECTOR_CAST_F2D, "VectorCastF2X", TYPE_DOUBLE); 2202 } 2203 2204 public static final String VECTOR_CAST_I2B = VECTOR_PREFIX + "VECTOR_CAST_I2B" + POSTFIX; 2205 static { 2206 vectorNode(VECTOR_CAST_I2B, "VectorCastI2X", TYPE_BYTE); 2207 } 2208 2209 public static final String VECTOR_CAST_I2S = VECTOR_PREFIX + "VECTOR_CAST_I2S" + POSTFIX; 2210 static { 2211 vectorNode(VECTOR_CAST_I2S, "VectorCastI2X", TYPE_SHORT); 2212 } 2213 2214 public static final String VECTOR_CAST_I2L = VECTOR_PREFIX + "VECTOR_CAST_I2L" + POSTFIX; 2215 static { 2216 vectorNode(VECTOR_CAST_I2L, "VectorCastI2X", TYPE_LONG); 2217 } 2218 2219 public static final String VECTOR_CAST_I2F = VECTOR_PREFIX + "VECTOR_CAST_I2F" + POSTFIX; 2220 static { 2221 vectorNode(VECTOR_CAST_I2F, "VectorCastI2X", TYPE_FLOAT); 2222 } 2223 2224 public static final String VECTOR_CAST_I2D = VECTOR_PREFIX + "VECTOR_CAST_I2D" + POSTFIX; 2225 static { 2226 vectorNode(VECTOR_CAST_I2D, "VectorCastI2X", TYPE_DOUBLE); 2227 } 2228 2229 public static final String VECTOR_CAST_L2B = VECTOR_PREFIX + "VECTOR_CAST_L2B" + POSTFIX; 2230 static { 2231 vectorNode(VECTOR_CAST_L2B, "VectorCastL2X", TYPE_BYTE); 2232 } 2233 2234 public static final String VECTOR_CAST_L2S = VECTOR_PREFIX + "VECTOR_CAST_L2S" + POSTFIX; 2235 static { 2236 vectorNode(VECTOR_CAST_L2S, "VectorCastL2X", TYPE_SHORT); 2237 } 2238 2239 public static final String VECTOR_CAST_L2I = VECTOR_PREFIX + "VECTOR_CAST_L2I" + POSTFIX; 2240 static { 2241 vectorNode(VECTOR_CAST_L2I, "VectorCastL2X", TYPE_INT); 2242 } 2243 2244 public static final String VECTOR_CAST_L2F = VECTOR_PREFIX + "VECTOR_CAST_L2F" + POSTFIX; 2245 static { 2246 vectorNode(VECTOR_CAST_L2F, "VectorCastL2X", TYPE_FLOAT); 2247 } 2248 2249 public static final String VECTOR_CAST_L2D = VECTOR_PREFIX + "VECTOR_CAST_L2D" + POSTFIX; 2250 static { 2251 vectorNode(VECTOR_CAST_L2D, "VectorCastL2X", TYPE_DOUBLE); 2252 } 2253 2254 public static final String VECTOR_CAST_S2B = VECTOR_PREFIX + "VECTOR_CAST_S2B" + POSTFIX; 2255 static { 2256 vectorNode(VECTOR_CAST_S2B, "VectorCastS2X", TYPE_BYTE); 2257 } 2258 2259 public static final String VECTOR_CAST_S2I = VECTOR_PREFIX + "VECTOR_CAST_S2I" + POSTFIX; 2260 static { 2261 vectorNode(VECTOR_CAST_S2I, "VectorCastS2X", TYPE_INT); 2262 } 2263 2264 public static final String VECTOR_CAST_S2L = VECTOR_PREFIX + "VECTOR_CAST_S2L" + POSTFIX; 2265 static { 2266 vectorNode(VECTOR_CAST_S2L, "VectorCastS2X", TYPE_LONG); 2267 } 2268 2269 public static final String VECTOR_CAST_S2F = VECTOR_PREFIX + "VECTOR_CAST_S2F" + POSTFIX; 2270 static { 2271 vectorNode(VECTOR_CAST_S2F, "VectorCastS2X", TYPE_FLOAT); 2272 } 2273 2274 public static final String VECTOR_CAST_S2D = VECTOR_PREFIX + "VECTOR_CAST_S2D" + POSTFIX; 2275 static { 2276 vectorNode(VECTOR_CAST_S2D, "VectorCastS2X", TYPE_DOUBLE); 2277 } 2278 2279 public static final String VECTOR_CAST_F2HF = VECTOR_PREFIX + "VECTOR_CAST_F2HF" + POSTFIX; 2280 static { 2281 vectorNode(VECTOR_CAST_F2HF, "VectorCastF2HF", TYPE_SHORT); 2282 } 2283 2284 public static final String VECTOR_CAST_HF2F = VECTOR_PREFIX + "VECTOR_CAST_HF2F" + POSTFIX; 2285 static { 2286 vectorNode(VECTOR_CAST_HF2F, "VectorCastHF2F", TYPE_FLOAT); 2287 } 2288 2289 public static final String VECTOR_MASK_CAST = PREFIX + "VECTOR_MASK_CAST" + POSTFIX; 2290 static { 2291 beforeMatchingNameRegex(VECTOR_MASK_CAST, "VectorMaskCast"); 2292 } 2293 2294 public static final String VECTOR_REINTERPRET = PREFIX + "VECTOR_REINTERPRET" + POSTFIX; 2295 static { 2296 beforeMatchingNameRegex(VECTOR_REINTERPRET, "VectorReinterpret"); 2297 } 2298 2299 public static final String VECTOR_UCAST_B2S = VECTOR_PREFIX + "VECTOR_UCAST_B2S" + POSTFIX; 2300 static { 2301 vectorNode(VECTOR_UCAST_B2S, "VectorUCastB2X", TYPE_SHORT); 2302 } 2303 2304 public static final String VECTOR_UCAST_B2I = VECTOR_PREFIX + "VECTOR_UCAST_B2I" + POSTFIX; 2305 static { 2306 vectorNode(VECTOR_UCAST_B2I, "VectorUCastB2X", TYPE_INT); 2307 } 2308 2309 public static final String VECTOR_UCAST_B2L = VECTOR_PREFIX + "VECTOR_UCAST_B2L" + POSTFIX; 2310 static { 2311 vectorNode(VECTOR_UCAST_B2L, "VectorUCastB2X", TYPE_LONG); 2312 } 2313 2314 public static final String VECTOR_UCAST_I2L = VECTOR_PREFIX + "VECTOR_UCAST_I2L" + POSTFIX; 2315 static { 2316 vectorNode(VECTOR_UCAST_I2L, "VectorUCastI2X", TYPE_LONG); 2317 } 2318 2319 public static final String VECTOR_UCAST_S2I = VECTOR_PREFIX + "VECTOR_UCAST_S2I" + POSTFIX; 2320 static { 2321 vectorNode(VECTOR_UCAST_S2I, "VectorUCastS2X", TYPE_INT); 2322 } 2323 2324 public static final String VECTOR_UCAST_S2L = VECTOR_PREFIX + "VECTOR_UCAST_S2L" + POSTFIX; 2325 static { 2326 vectorNode(VECTOR_UCAST_S2L, "VectorUCastS2X", TYPE_LONG); 2327 } 2328 2329 public static final String VECTOR_TEST = PREFIX + "VECTOR_TEST" + POSTFIX; 2330 static { 2331 beforeMatchingNameRegex(VECTOR_TEST, "VectorTest"); 2332 } 2333 2334 public static final String VFABD = PREFIX + "VFABD" + POSTFIX; 2335 static { 2336 machOnlyNameRegex(VFABD, "vfabd"); 2337 } 2338 2339 public static final String VFABD_MASKED = PREFIX + "VFABD_MASKED" + POSTFIX; 2340 static { 2341 machOnlyNameRegex(VFABD_MASKED, "vfabd_masked"); 2342 } 2343 2344 public static final String VFMSB_MASKED = PREFIX + "VFMSB_MASKED" + POSTFIX; 2345 static { 2346 machOnlyNameRegex(VFMSB_MASKED, "vfmsb_masked"); 2347 } 2348 2349 public static final String VFNMAD_MASKED = PREFIX + "VFNMAD_MASKED" + POSTFIX; 2350 static { 2351 machOnlyNameRegex(VFNMAD_MASKED, "vfnmad_masked"); 2352 } 2353 2354 public static final String VFNMSB_MASKED = PREFIX + "VFNMSB_MASKED" + POSTFIX; 2355 static { 2356 machOnlyNameRegex(VFNMSB_MASKED, "vfnmsb_masked"); 2357 } 2358 2359 public static final String VFMAD_MASKED = PREFIX + "VFMAD_MASKED" + POSTFIX; 2360 static { 2361 machOnlyNameRegex(VFMAD_MASKED, "vfmad_masked"); 2362 } 2363 2364 public static final String VMASK_AND_NOT_L = PREFIX + "VMASK_AND_NOT_L" + POSTFIX; 2365 static { 2366 machOnlyNameRegex(VMASK_AND_NOT_L, "vmask_and_notL"); 2367 } 2368 2369 public static final String VMLA = PREFIX + "VMLA" + POSTFIX; 2370 static { 2371 machOnlyNameRegex(VMLA, "vmla"); 2372 } 2373 2374 public static final String VMLA_MASKED = PREFIX + "VMLA_MASKED" + POSTFIX; 2375 static { 2376 machOnlyNameRegex(VMLA_MASKED, "vmla_masked"); 2377 } 2378 2379 public static final String FMSUB = PREFIX + "FMSUB" + POSTFIX; 2380 static { 2381 machOnlyNameRegex(FMSUB, "msub(F|D)_reg_reg"); 2382 } 2383 2384 public static final String FNMADD = PREFIX + "FNMADD" + POSTFIX; 2385 static { 2386 machOnlyNameRegex(FNMADD, "mnadd(F|D)_reg_reg"); 2387 } 2388 2389 public static final String FNMSUB = PREFIX + "FNMSUB" + POSTFIX; 2390 static { 2391 machOnlyNameRegex(FNMSUB, "mnsub(F|D)_reg_reg"); 2392 } 2393 2394 public static final String VFMLA = PREFIX + "VFMLA" + POSTFIX; 2395 static { 2396 machOnlyNameRegex(VFMLA, "vfmla"); 2397 } 2398 2399 public static final String VFMLS = PREFIX + "VFMLS" + POSTFIX; 2400 static { 2401 machOnlyNameRegex(VFMLS, "vfmls"); 2402 } 2403 2404 public static final String VFNMLA = PREFIX + "VFNMLA" + POSTFIX; 2405 static { 2406 machOnlyNameRegex(VFNMLA, "vfnmla"); 2407 } 2408 2409 public static final String VMLS = PREFIX + "VMLS" + POSTFIX; 2410 static { 2411 machOnlyNameRegex(VMLS, "vmls"); 2412 } 2413 2414 public static final String VMLS_MASKED = PREFIX + "VMLS_MASKED" + POSTFIX; 2415 static { 2416 machOnlyNameRegex(VMLS_MASKED, "vmls_masked"); 2417 } 2418 2419 public static final String VMASK_CMP_ZERO_I_NEON = PREFIX + "VMASK_CMP_ZERO_I_NEON" + POSTFIX; 2420 static { 2421 machOnlyNameRegex(VMASK_CMP_ZERO_I_NEON, "vmaskcmp_zeroI_neon"); 2422 } 2423 2424 public static final String VMASK_CMP_ZERO_L_NEON = PREFIX + "VMASK_CMP_ZERO_L_NEON" + POSTFIX; 2425 static { 2426 machOnlyNameRegex(VMASK_CMP_ZERO_L_NEON, "vmaskcmp_zeroL_neon"); 2427 } 2428 2429 public static final String VMASK_CMP_ZERO_F_NEON = PREFIX + "VMASK_CMP_ZERO_F_NEON" + POSTFIX; 2430 static { 2431 machOnlyNameRegex(VMASK_CMP_ZERO_F_NEON, "vmaskcmp_zeroF_neon"); 2432 } 2433 2434 public static final String VMASK_CMP_ZERO_D_NEON = PREFIX + "VMASK_CMP_ZERO_D_NEON" + POSTFIX; 2435 static { 2436 machOnlyNameRegex(VMASK_CMP_ZERO_D_NEON, "vmaskcmp_zeroD_neon"); 2437 } 2438 2439 public static final String VMASK_CMP_IMM_I_SVE = PREFIX + "VMASK_CMP_IMM_I_SVE" + POSTFIX; 2440 static { 2441 machOnlyNameRegex(VMASK_CMP_IMM_I_SVE, "vmaskcmp_immI_sve"); 2442 } 2443 2444 public static final String VMASK_CMPU_IMM_I_SVE = PREFIX + "VMASK_CMPU_IMM_I_SVE" + POSTFIX; 2445 static { 2446 machOnlyNameRegex(VMASK_CMPU_IMM_I_SVE, "vmaskcmpU_immI_sve"); 2447 } 2448 2449 public static final String VMASK_CMP_IMM_L_SVE = PREFIX + "VMASK_CMP_IMM_L_SVE" + POSTFIX; 2450 static { 2451 machOnlyNameRegex(VMASK_CMP_IMM_L_SVE, "vmaskcmp_immL_sve"); 2452 } 2453 2454 public static final String VMASK_CMPU_IMM_L_SVE = PREFIX + "VMASK_CMPU_IMM_L_SVE" + POSTFIX; 2455 static { 2456 machOnlyNameRegex(VMASK_CMPU_IMM_L_SVE, "vmaskcmpU_immL_sve"); 2457 } 2458 2459 public static final String VNOT_I_MASKED = PREFIX + "VNOT_I_MASKED" + POSTFIX; 2460 static { 2461 machOnlyNameRegex(VNOT_I_MASKED, "vnotI_masked"); 2462 } 2463 2464 public static final String VNOT_L_MASKED = PREFIX + "VNOT_L_MASKED" + POSTFIX; 2465 static { 2466 machOnlyNameRegex(VNOT_L_MASKED, "vnotL_masked"); 2467 } 2468 2469 public static final String VSTOREMASK_TRUECOUNT = PREFIX + "VSTOREMASK_TRUECOUNT" + POSTFIX; 2470 static { 2471 machOnlyNameRegex(VSTOREMASK_TRUECOUNT, "vstoremask_truecount_neon"); 2472 } 2473 2474 public static final String XOR = PREFIX + "XOR" + POSTFIX; 2475 static { 2476 beforeMatchingNameRegex(XOR, "Xor(I|L)"); 2477 } 2478 2479 public static final String XOR_I = PREFIX + "XOR_I" + POSTFIX; 2480 static { 2481 beforeMatchingNameRegex(XOR_I, "XorI"); 2482 } 2483 2484 public static final String XOR_L = PREFIX + "XOR_L" + POSTFIX; 2485 static { 2486 beforeMatchingNameRegex(XOR_L, "XorL"); 2487 } 2488 2489 public static final String XOR_VB = VECTOR_PREFIX + "XOR_VB" + POSTFIX; 2490 static { 2491 vectorNode(XOR_VB, "XorV", TYPE_BYTE); 2492 } 2493 2494 public static final String XOR_VS = VECTOR_PREFIX + "XOR_VS" + POSTFIX; 2495 static { 2496 vectorNode(XOR_VS, "XorV", TYPE_SHORT); 2497 } 2498 2499 public static final String XOR_VI = VECTOR_PREFIX + "XOR_VI" + POSTFIX; 2500 static { 2501 vectorNode(XOR_VI, "XorV", TYPE_INT); 2502 } 2503 2504 public static final String XOR_VL = VECTOR_PREFIX + "XOR_VL" + POSTFIX; 2505 static { 2506 vectorNode(XOR_VL, "XorV", TYPE_LONG); 2507 } 2508 2509 public static final String XOR_V_MASK = PREFIX + "XOR_V_MASK" + POSTFIX; 2510 static { 2511 beforeMatchingNameRegex(XOR_V_MASK, "XorVMask"); 2512 } 2513 2514 public static final String XOR_REDUCTION_V = PREFIX + "XOR_REDUCTION_V" + POSTFIX; 2515 static { 2516 superWordNodes(XOR_REDUCTION_V, "XorReductionV"); 2517 } 2518 2519 public static final String XOR3_NEON = PREFIX + "XOR3_NEON" + POSTFIX; 2520 static { 2521 machOnlyNameRegex(XOR3_NEON, "veor3_neon"); 2522 } 2523 2524 public static final String XOR3_SVE = PREFIX + "XOR3_SVE" + POSTFIX; 2525 static { 2526 machOnlyNameRegex(XOR3_SVE, "veor3_sve"); 2527 } 2528 2529 public static final String COMPRESS_BITS_VI = VECTOR_PREFIX + "COMPRESS_BITS_VI" + POSTFIX; 2530 static { 2531 vectorNode(COMPRESS_BITS_VI, "CompressBitsV", TYPE_INT); 2532 } 2533 2534 public static final String COMPRESS_BITS_VL = VECTOR_PREFIX + "COMPRESS_BITS_VL" + POSTFIX; 2535 static { 2536 vectorNode(COMPRESS_BITS_VL, "CompressBitsV", TYPE_LONG); 2537 } 2538 2539 public static final String EXPAND_BITS_VI = VECTOR_PREFIX + "EXPAND_BITS_VI" + POSTFIX; 2540 static { 2541 vectorNode(EXPAND_BITS_VI, "ExpandBitsV", TYPE_INT); 2542 } 2543 2544 public static final String EXPAND_BITS_VL = VECTOR_PREFIX + "EXPAND_BITS_VL" + POSTFIX; 2545 static { 2546 vectorNode(EXPAND_BITS_VL, "ExpandBitsV", TYPE_LONG); 2547 } 2548 2549 public static final String Z_LOAD_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_LOAD_P_WITH_BARRIER_FLAG" + POSTFIX; 2550 static { 2551 String regex = START + "zLoadP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 2552 machOnly(Z_LOAD_P_WITH_BARRIER_FLAG, regex); 2553 } 2554 2555 public static final String Z_STORE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_STORE_P_WITH_BARRIER_FLAG" + POSTFIX; 2556 static { 2557 String regex = START + "zStoreP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 2558 machOnly(Z_STORE_P_WITH_BARRIER_FLAG, regex); 2559 } 2560 2561 public static final String Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG" + POSTFIX; 2562 static { 2563 String regex = START + "zCompareAndSwapP" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 2564 machOnly(Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, regex); 2565 } 2566 2567 public static final String Z_GET_AND_SET_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_GET_AND_SET_P_WITH_BARRIER_FLAG" + POSTFIX; 2568 static { 2569 String regex = START + "(zXChgP)|(zGetAndSetP\\S*)" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; 2570 machOnly(Z_GET_AND_SET_P_WITH_BARRIER_FLAG, regex); 2571 } 2572 2573 public static final String X86_LOCK_ADDB_REG = PREFIX + "X86_LOCK_ADDB_REG" + POSTFIX; 2574 static { 2575 machOnlyNameRegex(X86_LOCK_ADDB_REG, "xaddB_reg_no_res"); 2576 } 2577 2578 public static final String X86_LOCK_ADDB_IMM = PREFIX + "X86_LOCK_ADDB_IMM" + POSTFIX; 2579 static { 2580 machOnlyNameRegex(X86_LOCK_ADDB_IMM, "xaddB_imm_no_res"); 2581 } 2582 2583 public static final String X86_LOCK_XADDB = PREFIX + "X86_LOCK_XADDB" + POSTFIX; 2584 static { 2585 machOnlyNameRegex(X86_LOCK_XADDB, "xaddB"); 2586 } 2587 2588 public static final String X86_LOCK_ADDS_REG = PREFIX + "X86_LOCK_ADDS_REG" + POSTFIX; 2589 static { 2590 machOnlyNameRegex(X86_LOCK_ADDS_REG, "xaddS_reg_no_res"); 2591 } 2592 2593 public static final String X86_LOCK_ADDS_IMM = PREFIX + "X86_LOCK_ADDS_IMM" + POSTFIX; 2594 static { 2595 machOnlyNameRegex(X86_LOCK_ADDS_IMM, "xaddS_imm_no_res"); 2596 } 2597 2598 public static final String X86_LOCK_XADDS = PREFIX + "X86_LOCK_XADDS" + POSTFIX; 2599 static { 2600 machOnlyNameRegex(X86_LOCK_XADDS, "xaddS"); 2601 } 2602 2603 public static final String X86_LOCK_ADDI_REG = PREFIX + "X86_LOCK_ADDI_REG" + POSTFIX; 2604 static { 2605 machOnlyNameRegex(X86_LOCK_ADDI_REG, "xaddI_reg_no_res"); 2606 } 2607 2608 public static final String X86_LOCK_ADDI_IMM = PREFIX + "X86_LOCK_ADDI_IMM" + POSTFIX; 2609 static { 2610 machOnlyNameRegex(X86_LOCK_ADDI_IMM, "xaddI_imm_no_res"); 2611 } 2612 2613 public static final String X86_LOCK_XADDI = PREFIX + "X86_LOCK_XADDI" + POSTFIX; 2614 static { 2615 machOnlyNameRegex(X86_LOCK_XADDI, "xaddI"); 2616 } 2617 2618 public static final String X86_LOCK_ADDL_REG = PREFIX + "X86_LOCK_ADDL_REG" + POSTFIX; 2619 static { 2620 machOnlyNameRegex(X86_LOCK_ADDL_REG, "xaddL_reg_no_res"); 2621 } 2622 2623 public static final String X86_LOCK_ADDL_IMM = PREFIX + "X86_LOCK_ADDL_IMM" + POSTFIX; 2624 static { 2625 machOnlyNameRegex(X86_LOCK_ADDL_IMM, "xaddL_imm_no_res"); 2626 } 2627 2628 public static final String X86_LOCK_XADDL = PREFIX + "X86_LOCK_XADDL" + POSTFIX; 2629 static { 2630 machOnlyNameRegex(X86_LOCK_XADDL, "xaddL"); 2631 } 2632 2633 public static final String X86_TESTI_REG = PREFIX + "X86_TESTI_REG" + POSTFIX; 2634 static { 2635 machOnlyNameRegex(X86_TESTI_REG, "testI_reg"); 2636 } 2637 2638 public static final String X86_TESTL_REG = PREFIX + "X86_TESTL_REG" + POSTFIX; 2639 static { 2640 machOnlyNameRegex(X86_TESTL_REG, "testL_reg"); 2641 } 2642 2643 public static final String X86_CMOVEL_IMM01 = PREFIX + "X86_CMOVEL_IMM01" + POSTFIX; 2644 static { 2645 machOnlyNameRegex(X86_CMOVEL_IMM01, "cmovL_imm_01"); 2646 } 2647 2648 public static final String X86_CMOVEL_IMM01U = PREFIX + "X86_CMOVEL_IMM01U" + POSTFIX; 2649 static { 2650 machOnlyNameRegex(X86_CMOVEL_IMM01U, "cmovL_imm_01U"); 2651 } 2652 2653 public static final String X86_CMOVEL_IMM01UCF = PREFIX + "X86_CMOVEL_IMM01UCF" + POSTFIX; 2654 static { 2655 machOnlyNameRegex(X86_CMOVEL_IMM01UCF, "cmovL_imm_01UCF"); 2656 } 2657 2658 public static final String MOD_F = PREFIX + "MOD_F" + POSTFIX; 2659 static { 2660 String regex = START + "ModF" + MID + END; 2661 macroNodes(MOD_F, regex); 2662 } 2663 2664 public static final String MOD_D = PREFIX + "MOD_D" + POSTFIX; 2665 static { 2666 String regex = START + "ModD" + MID + END; 2667 macroNodes(MOD_D, regex); 2668 } 2669 2670 /* 2671 * Utility methods to set up IR_NODE_MAPPINGS. 2672 */ 2673 2674 /** 2675 * Apply {@code regex} on all machine independent ideal graph phases up to and including 2676 * {@link CompilePhase#BEFORE_MATCHING}. 2677 */ 2678 private static void beforeMatching(String irNodePlaceholder, String regex) { 2679 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex)); 2680 } 2681 2682 /** 2683 * Apply {@code irNodeRegex} as regex for the IR node name on all machine independent ideal graph phases up to and 2684 * including {@link CompilePhase#BEFORE_MATCHING}. 2685 */ 2686 private static void beforeMatchingNameRegex(String irNodePlaceholder, String irNodeRegex) { 2687 String regex = START + irNodeRegex + MID + END; 2688 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex)); 2689 } 2690 2691 /** 2692 * Apply {@code irNodeRegex} as regex for the IR vector node name on all machine independent ideal graph phases up to and 2693 * including {@link CompilePhase#BEFORE_MATCHING}. Since this is a vector node, we can also check the vector element 2694 * type {@code typeString} and the vector size (number of elements), {@see VECTOR_SIZE}. 2695 */ 2696 private static void vectorNode(String irNodePlaceholder, String irNodeRegex, String typeString) { 2697 TestFramework.check(isVectorIRNode(irNodePlaceholder), "vectorNode: failed prefix check for irNodePlaceholder " 2698 + irNodePlaceholder + " -> did you use VECTOR_PREFIX?"); 2699 // IS_REPLACED is later replaced with the specific type and size of the vector. 2700 String regex = START + irNodeRegex + MID + IS_REPLACED + END; 2701 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex)); 2702 VECTOR_NODE_TYPE.put(irNodePlaceholder, typeString); 2703 } 2704 2705 /** 2706 * Apply {@code regex} on all ideal graph phases up to and including {@link CompilePhase#BEFORE_MACRO_EXPANSION}. 2707 */ 2708 private static void macroNodes(String irNodePlaceholder, String regex) { 2709 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.BEFORE_MACRO_EXPANSION, regex, 2710 CompilePhase.BEFORE_STRINGOPTS, 2711 CompilePhase.BEFORE_MACRO_EXPANSION)); 2712 } 2713 2714 private static void callOfNodes(String irNodePlaceholder, String callRegex) { 2715 String regex = START + callRegex + MID + IS_REPLACED + " " + END; 2716 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex)); 2717 } 2718 2719 /** 2720 * Apply {@code regex} on all machine dependant ideal graph phases (i.e. on the mach graph) starting from 2721 * {@link CompilePhase#MATCHING}. 2722 */ 2723 private static void optoOnly(String irNodePlaceholder, String regex) { 2724 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.OPTO_ASSEMBLY, regex)); 2725 } 2726 2727 private static void machOnly(String irNodePlaceholder, String regex) { 2728 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex)); 2729 } 2730 2731 private static void machOnlyNameRegex(String irNodePlaceholder, String irNodeRegex) { 2732 String regex = START + irNodeRegex + MID + END; 2733 IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex)); 2734 } 2735 2736 /** 2737 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#AFTER_CLOOPS}. 2738 */ 2739 private static void fromAfterCountedLoops(String irNodePlaceholder, String regex) { 2740 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 2741 CompilePhase.AFTER_CLOOPS, 2742 CompilePhase.FINAL_CODE)); 2743 } 2744 2745 /** 2746 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS}. 2747 */ 2748 private static void fromBeforeCountedLoops(String irNodePlaceholder, String regex) { 2749 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 2750 CompilePhase.BEFORE_CLOOPS, 2751 CompilePhase.FINAL_CODE)); 2752 } 2753 2754 /** 2755 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS} up to and 2756 * including {@link CompilePhase#BEFORE_MATCHING} 2757 */ 2758 private static void fromMacroToBeforeMatching(String irNodePlaceholder, String regex) { 2759 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 2760 CompilePhase.AFTER_MACRO_EXPANSION, 2761 CompilePhase.BEFORE_MATCHING)); 2762 } 2763 2764 /** 2765 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS} up to and 2766 * including {@link CompilePhase#BEFORE_MATCHING} 2767 */ 2768 private static void afterBarrierExpansionToBeforeMatching(String irNodePlaceholder, String regex) { 2769 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 2770 CompilePhase.OPTIMIZE_FINISHED, 2771 CompilePhase.BEFORE_MATCHING)); 2772 } 2773 2774 private static void trapNodes(String irNodePlaceholder, String trapReason) { 2775 String regex = START + "CallStaticJava" + MID + "uncommon_trap.*" + trapReason + END; 2776 beforeMatching(irNodePlaceholder, regex); 2777 } 2778 2779 private static void parsePredicateNodes(String irNodePlaceholder, String label) { 2780 String regex = START + "ParsePredicate" + MID + "#" + label + "[ ]*!jvms:" + END; 2781 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.AFTER_PARSING, regex, 2782 CompilePhase.AFTER_PARSING, 2783 CompilePhase.PHASEIDEALLOOP_ITERATIONS)); 2784 } 2785 2786 private static void loadOfNodes(String irNodePlaceholder, String irNodeRegex) { 2787 String regex = START + irNodeRegex + MID + "@\\S*" + IS_REPLACED + LOAD_OF_CLASS_POSTFIX; 2788 beforeMatching(irNodePlaceholder, regex); 2789 } 2790 2791 private static void storeOfNodes(String irNodePlaceholder, String irNodeRegex) { 2792 String regex = START + irNodeRegex + MID + "@\\S*" + IS_REPLACED + STORE_OF_CLASS_POSTFIX; 2793 beforeMatching(irNodePlaceholder, regex); 2794 } 2795 2796 /** 2797 * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#PHASEIDEALLOOP1} which is the 2798 * first phase that could contain vector nodes from super word. 2799 */ 2800 private static void superWordNodes(String irNodePlaceholder, String irNodeRegex) { 2801 String regex = START + irNodeRegex + MID + END; 2802 IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex, 2803 CompilePhase.PHASEIDEALLOOP1, 2804 CompilePhase.BEFORE_MATCHING)); 2805 } 2806 2807 2808 /* 2809 * Methods used internally by the IR framework. 2810 */ 2811 2812 /** 2813 * Is {@code irNodeString} an IR node placeholder string? 2814 */ 2815 public static boolean isIRNode(String irNodeString) { 2816 return irNodeString.startsWith(PREFIX); 2817 } 2818 2819 /** 2820 * Is {@code irCompositeNodeString} an IR composite node placeholder string? 2821 */ 2822 public static boolean isCompositeIRNode(String irCompositeNodeString) { 2823 return irCompositeNodeString.startsWith(COMPOSITE_PREFIX); 2824 } 2825 2826 /** 2827 * Is {@code irVectorNodeString} an IR vector node placeholder string? 2828 */ 2829 public static boolean isVectorIRNode(String irVectorNodeString) { 2830 return irVectorNodeString.startsWith(VECTOR_PREFIX); 2831 } 2832 2833 /** 2834 * Is {@code irVectorSizeString} a vector size string? 2835 */ 2836 public static boolean isVectorSize(String irVectorSizeString) { 2837 return irVectorSizeString.startsWith(VECTOR_SIZE); 2838 } 2839 2840 /** 2841 * Parse {@code sizeString} and generate a regex pattern to match for the size in the IR dump. 2842 */ 2843 public static String parseVectorNodeSize(String sizeString, String typeString, VMInfo vmInfo) { 2844 if (sizeString.equals(VECTOR_SIZE_TAG_ANY)) { 2845 return "\\\\d+"; // match with any number 2846 } 2847 // Try to parse any tags, convert to comma separated list of ints 2848 sizeString = parseVectorNodeSizeTag(sizeString, typeString, vmInfo); 2849 // Parse comma separated list of numbers 2850 String[] sizes = sizeString.split(","); 2851 String regex = ""; 2852 for (int i = 0; i < sizes.length; i++) { 2853 int size = 0; 2854 try { 2855 size = Integer.parseInt(sizes[i]); 2856 } catch (NumberFormatException e) { 2857 throw new TestFormatException("Vector node has invalid size \"" + sizes[i] + "\", in \"" + sizeString + "\""); 2858 } 2859 TestFormat.checkNoReport(size > 1, "Vector node size must be 2 or larger, but got \"" + sizes[i] + "\", in \"" + sizeString + "\""); 2860 regex += ((i > 0) ? "|" : "") + size; 2861 } 2862 if (sizes.length > 1) { 2863 regex = "(" + regex + ")"; 2864 } 2865 return regex; 2866 } 2867 2868 /** 2869 * If {@code sizeTagString} is a size tag, return the list of accepted sizes, else return sizeTagString. 2870 */ 2871 public static String parseVectorNodeSizeTag(String sizeTagString, String typeString, VMInfo vmInfo) { 2872 // Parse out "min(a,b,c,...)" 2873 if (sizeTagString.startsWith("min(") && sizeTagString.endsWith(")")) { 2874 return parseVectorNodeSizeTagMin(sizeTagString, typeString, vmInfo); 2875 } 2876 2877 // Parse individual tags 2878 return switch (sizeTagString) { 2879 case VECTOR_SIZE_TAG_MAX -> String.valueOf(getMaxElementsForType(typeString, vmInfo)); 2880 case "max_byte" -> String.valueOf(getMaxElementsForType(TYPE_BYTE, vmInfo)); 2881 case "max_char" -> String.valueOf(getMaxElementsForType(TYPE_CHAR, vmInfo)); 2882 case "max_short" -> String.valueOf(getMaxElementsForType(TYPE_SHORT, vmInfo)); 2883 case "max_int" -> String.valueOf(getMaxElementsForType(TYPE_INT, vmInfo)); 2884 case "max_long" -> String.valueOf(getMaxElementsForType(TYPE_LONG, vmInfo)); 2885 case "max_float" -> String.valueOf(getMaxElementsForType(TYPE_FLOAT, vmInfo)); 2886 case "max_double" -> String.valueOf(getMaxElementsForType(TYPE_DOUBLE, vmInfo)); 2887 case "LoopMaxUnroll" -> String.valueOf(vmInfo.getLongValue("LoopMaxUnroll")); 2888 default -> sizeTagString; 2889 }; 2890 } 2891 2892 /** 2893 * Parse {@code sizeTagString}, which must be a min-clause. 2894 */ 2895 public static String parseVectorNodeSizeTagMin(String sizeTagString, String typeString, VMInfo vmInfo) { 2896 String[] tags = sizeTagString.substring(4, sizeTagString.length() - 1).split(","); 2897 TestFormat.checkNoReport(tags.length > 1, "Vector node size \"min(...)\" must have at least 2 comma separated arguments, got \"" + sizeTagString + "\""); 2898 int minVal = 1024; 2899 for (int i = 0; i < tags.length; i++) { 2900 String tag = parseVectorNodeSizeTag(tags[i].trim(), typeString, vmInfo); 2901 int tag_val = 0; 2902 try { 2903 tag_val = Integer.parseInt(tag); 2904 } catch (NumberFormatException e) { 2905 throw new TestFormatException("Vector node has invalid size in \"min(...)\", argument " + i + ", \"" + tag + "\", in \"" + sizeTagString + "\""); 2906 } 2907 minVal = Math.min(minVal, tag_val); 2908 } 2909 return String.valueOf(minVal); 2910 } 2911 2912 /** 2913 * Return maximal number of elements that can fit in a vector of the specified type. 2914 */ 2915 public static long getMaxElementsForType(String typeString, VMInfo vmInfo) { 2916 long maxVectorSize = vmInfo.getLongValue("MaxVectorSize"); 2917 TestFormat.checkNoReport(maxVectorSize > 0, "VMInfo: MaxVectorSize is not larger than zero"); 2918 long maxBytes = maxVectorSize; 2919 2920 if (Platform.isX64() || Platform.isX86()) { 2921 maxBytes = Math.min(maxBytes, getMaxElementsForTypeOnX86(typeString, vmInfo)); 2922 } 2923 2924 // compute elements per vector: vector bytes divided by bytes per element 2925 int bytes = getTypeSizeInBytes(typeString); 2926 return maxBytes / bytes; 2927 } 2928 2929 /** 2930 * Return maximal number of elements that can fit in a vector of the specified type, on x86 / x64. 2931 */ 2932 public static long getMaxElementsForTypeOnX86(String typeString, VMInfo vmInfo) { 2933 // restrict maxBytes for specific features, see Matcher::vector_width_in_bytes in x86.ad: 2934 boolean avx1 = vmInfo.hasCPUFeature("avx"); 2935 boolean avx2 = vmInfo.hasCPUFeature("avx2"); 2936 boolean avx512 = vmInfo.hasCPUFeature("avx512f"); 2937 boolean avx512bw = vmInfo.hasCPUFeature("avx512bw"); 2938 long maxBytes; 2939 if (avx512) { 2940 maxBytes = 64; 2941 } else if (avx2) { 2942 maxBytes = 32; 2943 } else { 2944 maxBytes = 16; 2945 } 2946 if (avx1 && (typeString.equals(TYPE_FLOAT) || typeString.equals(TYPE_DOUBLE))) { 2947 maxBytes = avx512 ? 64 : 32; 2948 } 2949 if (avx512 && (typeString.equals(TYPE_BYTE) || typeString.equals(TYPE_SHORT) || typeString.equals(TYPE_CHAR))) { 2950 maxBytes = avx512bw ? 64 : 32; 2951 } 2952 2953 return maxBytes; 2954 } 2955 2956 /** 2957 * Return size in bytes of type named by {@code typeString}, return 0 if it does not name a type. 2958 */ 2959 public static int getTypeSizeInBytes(String typeString) { 2960 return switch (typeString) { 2961 case TYPE_BYTE -> 1; 2962 case TYPE_CHAR, TYPE_SHORT -> 2; 2963 case TYPE_INT, TYPE_FLOAT -> 4; 2964 case TYPE_LONG, TYPE_DOUBLE -> 8; 2965 default -> 0; 2966 }; 2967 } 2968 2969 /** 2970 * Returns "IRNode.XYZ", where XYZ is one of the IR node placeholder variable names defined above. 2971 */ 2972 public static String getIRNodeAccessString(String irNodeString) { 2973 int prefixLength; 2974 if (isCompositeIRNode(irNodeString)) { 2975 TestFramework.check(irNodeString.length() > COMPOSITE_PREFIX.length() + POSTFIX.length(), 2976 "Invalid composite node placeholder: " + irNodeString); 2977 prefixLength = COMPOSITE_PREFIX.length(); 2978 } else if (isVectorIRNode(irNodeString)) { 2979 TestFramework.check(irNodeString.length() > VECTOR_PREFIX.length() + POSTFIX.length(), 2980 "Invalid vector node placeholder: " + irNodeString); 2981 prefixLength = VECTOR_PREFIX.length(); 2982 } else { 2983 prefixLength = PREFIX.length(); 2984 } 2985 return "IRNode." + irNodeString.substring(prefixLength, irNodeString.length() - POSTFIX.length()); 2986 } 2987 2988 /** 2989 * Is this IR node supported on current platform, used VM build, etc.? 2990 * Throws a {@link CheckedTestFrameworkException} if the IR node is unsupported. 2991 */ 2992 public static void checkIRNodeSupported(String node) throws CheckedTestFrameworkException { 2993 switch (node) { 2994 case INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP -> { 2995 if (!WhiteBox.getWhiteBox().isJVMCISupportedByGC()) { 2996 throw new CheckedTestFrameworkException("INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP is unsupported " + 2997 "in builds without JVMCI."); 2998 } 2999 } 3000 case CHECKCAST_ARRAYCOPY -> { 3001 if (Platform.isS390x()) { 3002 throw new CheckedTestFrameworkException("CHECKCAST_ARRAYCOPY is unsupported on s390."); 3003 } 3004 } 3005 case IS_FINITE_D, IS_FINITE_F -> { 3006 if (!Platform.isRISCV64()) { 3007 throw new CheckedTestFrameworkException("IS_FINITE_* is only supported on riscv64."); 3008 } 3009 } 3010 // default: do nothing -> IR node is supported and can be used by the user. 3011 } 3012 } 3013 3014 /** 3015 * Get the regex of an IR node for a specific compile phase. If {@code irNode} is not an IR node placeholder string 3016 * or if there is no regex specified for {@code compilePhase}, a {@link TestFormatException} is reported. 3017 */ 3018 public static String getRegexForCompilePhase(String irNode, CompilePhase compilePhase) { 3019 IRNodeMapEntry entry = IR_NODE_MAPPINGS.get(irNode); 3020 String failMsg = "IR Node \"" + irNode + "\" defined in class IRNode has no regex/compiler phase mapping " + 3021 "(i.e. no static initializer block that adds a mapping entry to IRNode.IR_NODE_MAPPINGS)." + 3022 System.lineSeparator() + 3023 " Have you just created the entry \"" + irNode + "\" in class IRNode and forgot to add a " + 3024 "mapping?" + System.lineSeparator() + 3025 " Violation"; 3026 TestFormat.checkNoReport(entry != null, failMsg); 3027 String regex = entry.regexForCompilePhase(compilePhase); 3028 failMsg = "IR Node \"" + irNode + "\" defined in class IRNode has no regex defined for compile phase " 3029 + compilePhase + "." + System.lineSeparator() + 3030 " If you think this compile phase should be supported, update the mapping for \"" + irNode + 3031 "\" in class IRNode (i.e the static initializer block immediately following the definition of \"" + 3032 irNode + "\")." + System.lineSeparator() + 3033 " Violation"; 3034 TestFormat.checkNoReport(regex != null, failMsg); 3035 return regex; 3036 } 3037 3038 /** 3039 * Get the default phase of an IR node. If {@code irNode} is not an IR node placeholder string, a 3040 * {@link TestFormatException} is reported. 3041 */ 3042 public static CompilePhase getDefaultPhase(String irNode) { 3043 IRNodeMapEntry entry = IR_NODE_MAPPINGS.get(irNode); 3044 String failMsg = "\"" + irNode + "\" is not an IR node defined in class IRNode and " + 3045 "has therefore no default compile phase specified." + System.lineSeparator() + 3046 " If your regex represents a C2 IR node, consider adding an entry to class IRNode together " + 3047 "with a static initializer block that adds a mapping to IRNode.IR_NODE_MAPPINGS." + 3048 System.lineSeparator() + 3049 " Otherwise, set the @IR \"phase\" attribute to a compile phase different from " + 3050 "CompilePhase.DEFAULT to explicitly tell the IR framework on which compile phase your rule" + 3051 " should be applied on." + System.lineSeparator() + 3052 " Violation"; 3053 TestFormat.checkNoReport(entry != null, failMsg); 3054 return entry.defaultCompilePhase(); 3055 } 3056 3057 public static String getVectorNodeType(String irNode) { 3058 String typeString = VECTOR_NODE_TYPE.get(irNode); 3059 String failMsg = "\"" + irNode + "\" is not a Vector IR node defined in class IRNode"; 3060 TestFormat.check(typeString != null, failMsg); 3061 return typeString; 3062 } 3063 }