RFR: JDK-8207169: X86: Modularize cmpxchg-oop assembler for C1 and C2

Roland Westrelin rwestrel at redhat.com
Fri Aug 31 14:26:51 UTC 2018


Hi Erik,

> So if you have some kind of loop for your CAS, your
> ShenandoahBarrierSetC1 can generate the LIR for that, and allocate
> registers accordingly, letting the register allocator do its thing.

I doubt it's as simple as you make it sound. A loop or any control flow
construct would require us to hack the CFG. In c1, the CFG is
constructed at parse time from the bytecodes of the method being
compiled. There's no code that I know of that changes the CFG once
parsing is over. The c1 way of doing something like that is to implement
the loop (or any control flow) in assembly code in the backend.

Roland.



More information about the hotspot-gc-dev mailing list