Other |
---|
tbdUnresolved |
Relates :
|
|
Relates :
|
Investigate "IR test coverage" of C2's loop optimizations, i.e. the ability of existing jtreg tests to detect cases in which an expected loop optimization is not performed. This can be done e.g. using "failure injection": modifying C2 to inhibit one loop optimization at a time (in general or in specific scenarios) and observing how many tests fail. For the loop optimizations that prove to be insufficiently covered, add new IR tests verifying that they are performed as expected in multiple scenarios. Candidate loop optimizations are peeling, unswitching, unrolling, range check elimination, loop predication, counted loop detection, empty loop removal etc. IR node counting might be insufficient, in some cases, to detect the presence/absence of a certain loop optimization. Alternative techniques in this case include: - matching on phases triggered only when the optimization is applied (from [~chagedorn]: "You could match anything on a specific phase. If the optimization is not applied, IR matching will report that the phase could not be found."), - extending the node-specific dumping string with the properties that need to be matched on (e.g. loop nesting depth), and - if necessary, adding IR framework-specific node dumps (disabled except when running IR tests) for the sole purpose of matching. This RFE would make it easier to change fundamental aspects of C2's IR and be confident that loop optimizations are not silently inhibited along the way, see e.g. the following discussion: https://github.com/openjdk/jdk/pull/25717#issuecomment-2969458368.