JDK-8270072 : Add attribute to name an IR rule
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2021-07-08
  • Updated: 2021-08-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Description
Add an optional attribute "name" to allow the user to give a rule a certain name. This name is then showed in an error message instead of "Rule [number]". This could be useful when having multiple IR rules with different purposes to quickly get an idea of what went wrong.

Example:
@Test
@IR(name = "No Store", failOn = IRNode.STORE)
@IR(name = "3 Loads", counts = {IRNode.LOAD, "3"})
public int test() {
    return 3;
}