RFR: 8253524: C2: Refactor code that clones predicates during loop unswitching [v2]
Tobias Hartmann
thartmann at openjdk.java.net
Thu Sep 24 05:54:00 UTC 2020
On Wed, 23 Sep 2020 12:14:01 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> During unswitching, PhaseIdealLoop::create_slow_version_of_loop()
>> calls PhaseIdealLoop::clone_predicates_to_unswitched_loop() twice, one
>> for each loops, to clone some predicates above each loop. That code is
>> fragile as it (implicitly) requires the fast loop to be processed
>> first. I propose calling
>> PhaseIdealLoop::clone_predicates_to_unswitched_loop() a single time
>> and have it handle both loops in a single pass.
>
> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>
> code style
Looks good.
src/hotspot/share/opto/loopPredicate.cpp line 298:
> 296: // Clone loop predicates to cloned loops when unswitching a loop.
> 297: void PhaseIdealLoop::clone_predicates_to_unswitched_loop(IdealLoopTree* loop, const Node_List& old_new, ProjNode*&
> iffast, ProjNode*& ifslow) { 298: LoopNode* head = loop->_head->as_Loop();
Extra whitespace after `head`
-------------
Marked as reviewed by thartmann (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/317
More information about the hotspot-compiler-dev
mailing list