NeverPartOfCompilation node slipping through the cracks
Bernhard Urban
bernhard.urban at jku.at
Wed Jul 9 08:41:11 UTC 2014
Hi Stefan,
I believe the following happened: You have annotated some method with
@SlowPath, which then was not inlined by the partial evaluator, but is
still using some compiler directives that would be turned into a
NeverPartOfCompilationNode. The verification that such nodes do not exist
is done after partial evaluation. After that, the graph is passed to the
normal Graal compiler. Its inliner can then still decide to inline your
method annotated with @SlowPath. If this happens, it's quite unlikely that
such NeverPartOfCompilationNodes will constant fold away.
Do you think this could have happen in your Truffle interpreter?
Anyway, I'll push a change that will turn this into a more friendly failure.
Thanks for the report,
Bernhard
On Fri, Jul 4, 2014 at 10:37 PM, Stefan Marr <java at stefan-marr.de> wrote:
> Hi:
>
> I encountered an issue where a NeverPartOfCompilation node actually made
> it to a lowering phase (see output below).
>
> I would guess there are constellations were inlining or so can lead to
> NeverPartOfCompilation becoming part of the graph after the check that
> verifies there are none.
> In my case, I first saw hard crashes, and after investigating with
> assertions enabled, I was seeing ‘AssertionError: cannot lower to invoke
> without state’.
>
> Best regards
> Stefan
>
> [thread:1] scope:
> [thread:1] scope: Truffle
> [thread:1] scope: Truffle.TruffleGraal.GraalCompiler
> [thread:1] scope: Truffle.TruffleGraal.GraalCompiler.GraalCompiler
> [thread:1] scope:
> Truffle.TruffleGraal.GraalCompiler.GraalCompiler.FrontEnd
> [thread:1] scope:
> Truffle.TruffleGraal.GraalCompiler.GraalCompiler.FrontEnd.HighTier
> [thread:1] scope:
> Truffle.TruffleGraal.GraalCompiler.GraalCompiler.FrontEnd.HighTier.LoweringPhase
> [thread:1] scope:
> Truffle.TruffleGraal.GraalCompiler.GraalCompiler.FrontEnd.HighTier.LoweringPhase.IncrementalCanonicalizerPhase
> [thread:1] scope:
> Truffle.TruffleGraal.GraalCompiler.GraalCompiler.FrontEnd.HighTier.LoweringPhase.IncrementalCanonicalizerPhase.LoweringPhase_Round
> [thread:1] scope:
> Truffle.TruffleGraal.GraalCompiler.GraalCompiler.FrontEnd.HighTier.LoweringPhase.IncrementalCanonicalizerPhase.LoweringPhase_Round.InterceptException
> Exception occurred in scope:
> Truffle.TruffleGraal.GraalCompiler.GraalCompiler.FrontEnd.HighTier.LoweringPhase.IncrementalCanonicalizerPhase.LoweringPhase_Round.InterceptException
> Context obj java.lang.AssertionError: cannot lower to
> invoke without state: -1000013198|NeverPartOfCompilation
> Context obj
> com.oracle.graal.phases.common.LoweringPhase$Round at 7598d675
> Context obj
> com.oracle.graal.phases.common.IncrementalCanonicalizerPhase at 4946485c
> Context obj
> com.oracle.graal.phases.common.LoweringPhase at 4ae958b0
> Context obj
> com.oracle.graal.compiler.phases.HighTier at 7c682e26
> Context obj StructuredGraph:23{Primitive
> PerformEnforcedWithArgumentsInSuperclassPrimObjectObjectArrayNode at 4f18837a,
> HotSpotMethod<OptimizedCallTarget.callRoot(Object[])>}
> Use -G:+DumpOnError to enable dumping of graphs on this
> error
> Context obj
> com.oracle.graal.hotspot.amd64.AMD64HotSpotCodeCacheProvider at 4ff074a0
> Context obj StructuredGraph:23{Primitive
> PerformEnforcedWithArgumentsInSuperclassPrimObjectObjectArrayNode at 4f18837a,
> HotSpotMethod<OptimizedCallTarget.callRoot(Object[])>}
> Use -G:+DumpOnError to enable dumping of graphs on this
> error
> Context obj
> com.oracle.graal.hotspot.amd64.AMD64HotSpotCodeCacheProvider at 4ff074a0
> Context obj
> Truffle<Primitive_PerformEnforcedWithArgumentsInSuperclassPrimObjectObjectArrayNode at 4f18837a
> ()>
> [truffle] opt fail Primitive
> PerformEnforcedWithArgumentsInSuperclassPrimObjectObjectArrayNode at 4f18837a|Reason
> cannot lower to invoke without state: -1000013198|NeverPartOfCompilation
> java.lang.AssertionError: cannot lower to invoke without state:
> -1000013198|NeverPartOfCompilation
>
> --
> Stefan Marr
> INRIA Lille - Nord Europe
> http://stefan-marr.de/research/
>
>
>
>
More information about the graal-dev
mailing list