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

Roland Westrelin rwestrel at redhat.com
Fri Aug 31 14:46:36 UTC 2018


> Well... C1 uses CAS in the heap only for the Unsafe CAS intrinsic,
> which is indeed inserted at parse time. And all other GCs alter the
> CFG for the GC barriers in their CAS barriers, using LIR. Except
> Epsilon I suppose.

Are you talking about for instance G1BarrierSetC1::pre_barrier()? That
method adds control flow withing a basic block. It doesn't hack the CFG
(it doesn't add new basic blocks). How can the register allocator
compute liveness without a correct CFG? Either
G1BarrierSetC1::pre_barrier() is a simple enough case that register
allocation is correct or there are some nasty bugs in there. In any
case, building control flow within a block like
G1BarrierSetC1::pre_barrier() does is an ugly hack. Doing anything more
complicated that way is asking for trouble.

Roland.



More information about the hotspot-gc-dev mailing list