Potential Graal Regression: The location argument could not be resolved to a constant.

Stefan Marr java at stefan-marr.de
Mon May 26 22:45:41 UTC 2014


Hi Gilles:

On 24 May 2014, at 16:45, Stefan Marr <java at stefan-marr.de> wrote:

> Adopting the latest version of Graal, I am having trouble with failing optimization passes because of “The location argument could not be resolved to a constant.”

I think, my problem starts with one of your commits, most likely: http://hg.openjdk.java.net/graal/graal/rev/ef6b8d1898e6
Well, actually that one doesn’t yield a working VM for me.
But the last good commit is: http://hg.openjdk.java.net/graal/graal/rev/a9f969e65b61
Afterwards, I get the “The location argument could not be resolved to a constant” issues described below.
And http://hg.openjdk.java.net/graal/graal/rev/fa66540676ce is definitely broken.

Thanks
Stefan

> 
> For all case I investigated so far, I get a stack trace like the following:
> 
> 	at com.oracle.graal.truffle.FrameWithoutBoxing.getObjectUnsafe(FrameWithoutBoxing.java:84)
> 	at com.oracle.graal.truffle.FrameWithoutBoxing.getObject(FrameWithoutBoxing.java:68)
> 	at com.oracle.truffle.api.frame.FrameUtil.getObjectSafe(FrameUtil.java:38)
> 	at som.interpreter.nodes.literals.BlockNode$BlockNodeWithContext.getOuterSelf(BlockNode.java:67)
> 	at som.vmobjects.SBlock.getOuterSelf(SBlock.java:103)
> 	at som.interpreter.nodes.ContextualNode.determineContext(ContextualNode.java:61)
> 
> Now, the location in question, i.e., the frame slot, is used like this [1]:
> 
>    public Object getOuterSelf(final MaterializedFrame frame) {
>      return FrameUtil.getObjectSafe(frame, outerSelfSlot);
>    }
> 
> And defined as `private final FrameSlot outerSelfSlot;`
> 
> This reminds me of a change I did in March [2] based on Andreas’ comment [3].
> But, now this problem seems to be back, and since I didn’t change anything in my code, but just updated Graal, it looks like there might be either a regression or an old problem exposed.
> However, I don’t really see how I could get the frame slot ‘even more constant’ than what I have now.
> Perhaps, I am reading the stack trace wrong, or there is something else going on?
> 
> 
> 
> To reproduce, the following should give an up-to-date TruffleSOM (note the recursive git submodule checkout, core-lib probably needs an update if you got an older copy):
> 
> git clone --recursive https://github.com/SOM-st/TruffleSOM.git
> ant jar
> ant test
> ./graal.sh -cp Smalltalk Examples/Benchmarks/BenchmarkHarness.som TreeSort 100 0 100
> 
> Thanks
> Stefan
> 
> [1] https://github.com/SOM-st/TruffleSOM/blob/master/src/som/interpreter/nodes/literals/BlockNode.java#L67
> [2] https://github.com/SOM-st/TruffleSOM/commit/c002b9be8bbed2ecf0c7a3fce93f9c108563e73e
> [3] http://markmail.org/message/ad7jd2ewopheqo2l
> 
> 
> -- 
> Stefan Marr
> INRIA Lille - Nord Europe
> http://stefan-marr.de/research/
> 
> 
> 

-- 
Stefan Marr
INRIA Lille - Nord Europe
http://stefan-marr.de/research/





More information about the graal-dev mailing list