A Noob Question of C1 LIR branch
tianle qiu
letianqiu at gmail.com
Wed Mar 8 01:14:52 UTC 2023
Hi,
In my Phd project, I am messing around with barriers and notice a weird
behavior of branching. It might be that I am doing it wrong. Typically, a
barrier will do a check and then jump to slow case if necessary. The code
often looks like:
__ branch(lir_cond_notEqual, T_INT, slow);
__ branch_destination(slow->continuation());
(These two lines are copied from G1BarrierSetC1::pre_barrier).
But if I changed those two lines to:
__ branch(lir_cond_equal, T_INT, slow->continuation());
__ jump(slow);
__ branch_destination(slow->continuation());
Then hotspot cannot bootstrap, causing build failure. I know in practice no
one is going to write code like that, but it does look weird. They should
be logically equivalent.
By the way, I am using the latest jdk11u master branch. Any suggestions
would be appreciated. Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-compiler-dev/attachments/20230308/8785f3d1/attachment.htm>
More information about the hotspot-compiler-dev
mailing list