mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8280378: [IR Framework] Support IR matching for different compile phases
Reviewed-by: kvn, rcastanedalo
This commit is contained in:
parent
da0ae5128a
commit
f829b5a73f
142 changed files with 7489 additions and 1938 deletions
|
@ -24,6 +24,7 @@
|
|||
package compiler.lib.ir_framework;
|
||||
|
||||
import compiler.lib.ir_framework.driver.irmatching.IRViolationException;
|
||||
import compiler.lib.ir_framework.shared.TestFormatException;
|
||||
|
||||
import java.lang.annotation.Repeatable;
|
||||
import java.lang.annotation.Retention;
|
||||
|
@ -84,6 +85,15 @@ public @interface IR {
|
|||
*/
|
||||
String[] counts() default {};
|
||||
|
||||
/**
|
||||
* Define a list of {@link CompilePhase} enums to apply the IR rule constraint attributes {@link #failOn()} and/or
|
||||
* {@link #counts()} on. By default, IR matching is applied on the predefined default phase of an IR node
|
||||
* placeholder string as defined in {@link IRNode}. For non-IR node constraints (i.e. user-defined regexes with no
|
||||
* definition in {@link IRNode}), a compile phase must explicitly be set. Otherwise, a {@link TestFormatException}
|
||||
* is reported.
|
||||
*/
|
||||
CompilePhase[] phase() default { CompilePhase.DEFAULT };
|
||||
|
||||
/**
|
||||
* Define a single VM flag precondition which <i>must hold</i> when applying the IR rule. If the VM flag precondition
|
||||
* fails, then the IR rule is not applied. This is useful if a commonly used flag alters the IR in such a way that an IR rule
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue