RFR(S): 8241900: Loop unswitching may cause dependence on null check to be lost

Roland Westrelin rwestrel at redhat.com
Mon Apr 6 08:34:42 UTC 2020


Hi Tobias,

Thanks for looking at this.

> This seems reasonable but I'm wondering if that doesn't enable incorrect re-ordering of dependent
> data nodes with other tests in-between the original and the hoisted test? I.e., without your fix,
> data nodes are made dependent on the test "just above" the unswitched test. With your fix, they are
> dependent on the hoisted test outside of the loop body.

I've been wondering about that too but couldn't find a scenario where it
would go wrong. dominated_by() is what's used when a if is replaced by a
dominating if with the same condition in
PhaseIdealLoop::split_if_with_blocks_post(). Loop switching is similar:
we add a dominating if, and then remove the loop copies because they are
redundant.


> Please add the appropriate affects versions to the bug. Also, please add a link to the JBS bug to
> your RFRs.

Sorry about that, I keep forgetting.

Roland.



More information about the hotspot-compiler-dev mailing list