JDK-8265198 : Parse the IR to perform queries on it
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2021-04-14
  • Updated: 2024-01-23
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
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Parsing the IR would allow the possibilities to perform queries on the IR in user code in checked and custom run tests. Queries could include searching, input and output checking of nodes, checks on IR node properties etc.
Comments
It probably really depends on what you want to match and how often. Maybe it's faster to do several regex matches for nested IR nodes instead of parsing the IR. I guess we would need to try things out to see what fits best. I was just thinking that when starting to add extended nested IR node regex matching we can also just go with parsing the entire IR to have a better foundation for future improvement ideas.
23-01-2024

Is it necessary to parse the entire IR? I think it should be possible to do nested regexing. Lets say we want to match an AddNode, where it's 0'th input is a SubNode. ``` 80 AddI === _ 12 34 ``` We can first regex check for the AddI, and get the `12` from regex grouping. Then we can regex check `12 SubI.*`.
22-01-2024