Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8311238

[IR Framework] Introduce @IR rule attribute to check if there is at least one occurrence of an IR node

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 22
    • hotspot

    Description

      The pattern "IR node count > 0" is used a lot throughout our IR tests in different variations:

      @IR(counts = {IRNode.LOAD_I, ">=1"})
      @IR(counts = {IRNode.LOAD_I, ">0"})

      We should introduce a new @IR node attribute "hasAny" that does this check. This makes it easier to write and understand rules that assert the existence of certain IR nodes.

      By doing so, we should also bulk update all existing tests and use the new attribute. Additional IR framework internal checks added for "IR node count > 0", for example with JDK-8310308, should also be adopted.

      Attachments

        Issue Links

          Activity

            People

              chagedorn Christian Hagedorn
              chagedorn Christian Hagedorn
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: