EmitDeoptimize, EmitForignCall "createOutOfBoundsException"
Deneau, Tom
tom.deneau at amd.com
Tue Jul 2 11:01:42 PDT 2013
Here is the background for my visualizer question:
We have a junit test (part of the webrev) called StaticNBodyTest and the HSAIL backend is able
to compile the fairly large run method without problem.
Now to test inlining decisions, I moved the logic to a separate updateBody method, and had the
run method (the target of the compile) call the updateBody method. By default, updateBody has too
many nodes to be inlined, but I raised the MaximumInliningSize and now graal does indeed inline it.
With the inlining completed, the HSAILLirGenerator is now passed several emitForeignCall requests
with the target being "createOutOfBoundsException". Yet in the original StaticNBodyTest (same code,
just not behind a second layer of method call), there were no emitForeignCall requests.
Instead there were emitDeoptimize requests for the path taken when an array index was out of bounds.
Question 1: Why would there be emitDeoptimize in one case, and emitForeignCall after inlining?
As a followup question...
We have not decided how to handle exceptions yet in the HSAIL backend, so the emitDeoptimize request
is turned into a request to return early from the HSAIL kernel. With this strategy, code generation
completes.
However, if I use similar logic with the emitForeignCall request, i.e. just generate a return,
or even just ignore the ForeignCall request completely, I hit the following error later in the codegen:
java.lang.AssertionError: using fixed register that is not defined in this block
at com.oracle.graal.compiler.alloc.LinearScan.verifyInput(LinearScan.java:791)
Question 2: Why would this register assertion occur when emitForeignCall is replaced by a return, but not when emitDeoptimize
is similarly replaced by a return?
-- Tom Deneau
-----Original Message-----
From: graal-dev-bounces at openjdk.java.net [mailto:graal-dev-bounces at openjdk.java.net] On Behalf Of Deneau, Tom
Sent: Tuesday, July 02, 2013 11:53 AM
To: graal-dev at openjdk.java.net
Subject: mx igv or mx gv commands
When I try to use
mx igv &
as described on the wiki page, I get the splash screen for the visualize but then it dies.
Similarly with mx gv &
Is there some other command that must be run first before using these?
-- Tom
More information about the graal-dev
mailing list