Substitutions in Graal

Doug Simon doug.simon at oracle.com
Thu May 29 13:34:29 UTC 2014


Hi Juan,

What’s in OCLMathSubstitutions? Does it override substitutions provide by MathSubstitutionsX86?

And where is your call to registerSubstitutions(Math.class, OCLMathSubstitutions.class)?

In standard Graal, I don’t think we have a multiple substitutions for a single method so have never thought about which substitution takes precedence in the case of conflicts.

-Doug

On May 29, 2014, at 11:52 AM, Juan Jose Fumero <juan.fumero at ed.ac.uk> wrote:

> Hi,
> 
> after this merge [1]  with my fork, I had to change the replacements
> from this
> 
> registerSubstitutions(OCLMathSubstitutions.class);
> 
> for this one:
> 
> registerSubstitutions(Math.class, OCLMathSubstitutions.class);
> 
> But, when I apply the replacements and inlining,  the MatIntrinsics is
> still my graph. 
> 
> ...
> 114|MathIntrinsic
> 119|Const(0.31938154)
> 120|Const(-0.35656378)
> 121|Const(1.7814779)
> ...
> 
> I want to substitute MathIntrinsic for OCLMathIntrinsic. 
> With my previous version (merge with Graal 839cb35354e8 [2] ) it works. 
> 
> Any idea?
> 
> Many thanks
> 
> 
> [1] http://hg.openjdk.java.net/graal/graal/rev/5c73b162eec2
> [2] http://hg.openjdk.java.net/graal/graal/rev/839cb35354e8
> 
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.



More information about the graal-dev mailing list