[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-compiler-dev
Subject:    Re: RFR: 8274328: C2: Redundant CFG edges fixup in block ordering
From:       Tobias Hartmann <thartmann () openjdk ! java ! net>
Date:       2021-10-28 7:47:10
Message-ID: zyaSibrBHlrx3msvR6y7yrNsBK2Wveg3snEXPOYuKz4=.a56db89d-2d82-4f90-8cf0-90b1a49c8bc9 () github ! com
[Download RAW message or body]

On Sun, 26 Sep 2021 10:40:43 GMT, Yi Yang <yyang@openjdk.org> wrote:

> I think Trace::fixup_blocks is redundant because PhaseCFG::fixup_flow will \
> nevertheless fix up the CFG flow(i.e. flip successor blocks of IfNode) right after \
> PhaseBlockLayout pass, we can remove this step when doing PhaseBlockLayout \
> pass.(Testing: jtreg/compiler/c2, presubmit test) 
> https://github.com/openjdk/jdk/blob/5ec1cdcaf39229a7d2457313600b0dc2bf8c6453/src/hotspot/share/opto/compile.cpp#L2765
>  
> https://github.com/openjdk/jdk/blob/5ec1cdcaf39229a7d2457313600b0dc2bf8c6453/src/hotspot/share/opto/block.cpp#L1679
>  
> https://github.com/openjdk/jdk/blob/5ec1cdcaf39229a7d2457313600b0dc2bf8c6453/src/hotspot/share/opto/block.cpp#L908-L916
> 

That looks good to me but I'm not an expert in that code. I submitted some testing \
and it all passed.

src/hotspot/share/opto/block.cpp line 916:

> 914:         ProjNode* tmp = proj0;
> 915:         proj0 = proj1;
> 916:         proj1 = tmp;

`swap(proj0, proj1)` can be used here.

-------------

Marked as reviewed by thartmann (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5705


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic