C2: cyclic IR for JVMS

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Dec 18 01:07:06 UTC 2014


Nope, it is illegal. Except for dead code.

There is code in  RegionNode::Ideal which tries to detect dead loops and 
don't do transformation.

     if (this->is_Loop() && (del_it == LoopNode::EntryControl ||
                             del_it == 0 && is_unreachable_region(phase)) ||
        !this->is_Loop() && has_phis && is_unreachable_region(phase)) {

Vladimir K

On 12/17/14 4:01 PM, Vladimir Ivanov wrote:
> Hi!
>
> I stumbled upon the following cyclic Ideal graph shape:
>    21580  CallStaticJava  === ... 21585 ... // some local in JVMS
>    21585  Proj    ===  21580 #5
>
> Is it a legal shape? It looks broken to me.
> Or do we fix such quirks later in the pipeline?
>
> It's a result of a transformation (Phi removal [1]) in RegionNode::Ideal
> from the following shape:
>    21580  CallStaticJava  === ... 21457 ... // some local in JVMS
>    21585  Proj    ===  21580 #5
>    21457  Phi     ===  21454  21585
>
> I'm asking because it breaks compilation during incremental inlining.
>
> Best regards,
> Vladimir Ivanov
>
> [1]
> http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/ff29b5858de6/src/share/vm/opto/cfgnode.cpp#l587
>


More information about the hotspot-compiler-dev mailing list