RFR: 8236181: C2: Remove useless step_over_gc_barrier() in int->bool conversion
Roman Kennke
rkennke at redhat.com
Wed Dec 18 12:40:48 UTC 2019
In cfgnode.cpp, in is_x2logic() that converts a diamond-shape if/else to
simple bool patterns, we have a step_over_gc_barrier() at the end. This
has been introduced by Shenandoah. I believe the intention was to
convert obj vs null check to a simple boolean expression and eliminate
the barrier on the unneeded path. However, it is not needed because
Shenandoah we already eliminate barriers when the only user is a
null-check, and it might actually be counter-productive if the barrier
is needed on other paths, because it keeps the input of the barrier
alive. This is probably a left-over from pre-LRB.
Bug:
https://bugs.openjdk.java.net/browse/JDK-8236181
Webrev:
http://cr.openjdk.java.net/~rkennke/JDK-8236181/webrev.00/
Testing: hotspot_gc_shenandoah, submit-repo (in-progress)
Can I please get a review?
Thanks,
Roman
More information about the hotspot-compiler-dev
mailing list