The current implementation of the IRMatcher class makes it difficult to add IR matching on different compile phases (JDK-8280378). There is a lack of separation of concerns. Multiple things are tightly mixed together:
- IR encoding parsing
- hotspot_pid* file parsing
- IR matching
- IR annotation format checking
- Failure reporting
This RFE splits the single IRMatcher class into multiple classes to separate different phases (parsing, matching, reporting) and better structure the involved components (methods, rules, IR annotation attributes and its contraints etc.). This should make it easier to implement JDK-8280378 and possibly more IR matching features in the future.