RFR: 8241502: Migrate x86_64.ad to MacroAssembler

Dean Long dlong at openjdk.java.net
Thu Mar 25 08:57:47 UTC 2021


On Wed, 17 Mar 2021 17:50:52 GMT, John Tortugo <github.com+2249648+JohnTortugo at openjdk.org> wrote:

>> Was -Xcomp one of the flags you tried?  If so, then you may need to write new tests for those instructions without test coverage.  Or you could do the 203 first and file a new RFE for the remaining.
>
> Hi @dean-long, thanks for the suggestions. Yes, "-Xcomp" is among the flags that I tried. In the end, what helped the most was commenting out some optimizations that simplify the IR graph - i.e., I commented out a bunch of <IRNode>::Ideal methods. I also tried commenting out some instructions in the .ad file and also changing `ins_costs`. These things helped quite a lot and I was able to get 26 more conversions validated; now the total of conversions + validations is 239. The conversions that I couldn't validate I didn't include in the PR; I'll follow your suggestion and create an RFE once the current PR is merged.
> 
> So, please consider this PR ready for review. I've tested these changes on Linux, Windows, and macOS with fastdebug and release binaries running jdk_tier1/2/3 and hotspot_all. Tests were also performed with different GCs: ZGC, Shenandoah, and G1.
> 
> I didn't remove the, now unused, `enc_classes` and related code; I think it would be better to keep them for a few more days to make easier any eventual debugging. I'll be happy to remove them if you think that's a better approach.

Hi @JohnTortugo, good job on the instruction validation.  I'm OK with leaving the unused enc_classes for now, but let's see what the other reviewers think.  One option would be to move them to a separate .ad file.

I guess you counted an instruction validated if it was generated at least once (so at least 1 possible encoding)?  On RISC architectures that would probably be enough, but I know on x86/x64, register choice can change the instruction encoding and length, thanks to prefixes, etc.  Unfortunately, I'm out of clever ideas on how to verify _all_ possible encodings of the new AD instructions.

-------------

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


More information about the hotspot-compiler-dev mailing list