RFR: 8254129: IR Test Framework to support regex-based matching on the IR in JTreg compiler tests [v2]

Christian Hagedorn chagedorn at openjdk.java.net
Tue Apr 20 13:41:09 UTC 2021

On Mon, 19 Apr 2021 23:30:16 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

>> Have I understood this correctly that you suggest to just remove this check completely and just specifying in the Javadocs that duplicates are ignore (due to using a `Set`)?
> you don't have to ignore duplicates, you can still throw an exception if you encounter one. I, personally, don't think we should force users to avoid dups (as I don't yet? see any issues w/ duplicated helpers), but if you think we need to enforce that *and* make it users' responsibilities then you should continue to throw an exception. in both cases, javadoc should be updated to reflect that duplicates are ignored or that an exception is raised in case a duplicate was encountered.

>From a correctness point of view, it should not make a difference if a helper class is added twice. We will just apply all the annotations twice (enqueue a method for compilation, set a method to be not inlined etc.). But I think it's unnecessary work for the framework to walk through all methods and process them twice. So, I tend towards just ignoring dups without an exception and mention that in the Javadocs.


PR: https://git.openjdk.java.net/jdk/pull/3508

More information about the hotspot-compiler-dev mailing list