RFR: 8272315: Improve assert_different_registers

Kim Barrett kbarrett at openjdk.java.net
Thu Aug 12 03:55:25 UTC 2021


On Wed, 11 Aug 2021 21:20:57 GMT, Dean Long <dlong at openjdk.org> wrote:

> Isn't this macro only used for integer registers? I have an alternative implementation for arm somewhere that uses RegisterSet, but you can just use an array of bytes or bits and check for duplicates as you go in O(n) time, right?

Probably, but that would require knowing the value range or dynamic allocation of the vector.  And this is debug-only code, so keeping it simple would be nice.  I don't think the N^2 behavior (which is what the old code had too) is a problem for the values of N we're dealing with.

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

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


More information about the hotspot-compiler-dev mailing list