[TruffleDSL] Splitting and Cost of Generic Nodes
Stefan Marr
java at stefan-marr.de
Fri May 30 19:51:03 UTC 2014
Hi:
I am debugging splitting issues in TruffleSOM and found two things, I would like to ask for comments on.
The first thing is one of the splitting conditions:
OptimizedDirectCallNode.java:191
// max one child call and callCount > 2 and kind of small number of nodes
if (isMaxSingleCall()) { return true; }
In which cases would it be useful to split such methods?
For TruffleSOM, this condition causes plenty of issues with microbenchmarks, because it leads to unconditional splitting and the resulting trees do not stabilize.
I have the feeling this should be restricted to methods that contain at least polymorphic nodes and that seems to be covered by the condition afterwards.
The second issue I have is the semantics of @Generic specializations.
Now, it implies a megamorphic cost for nodes, which has an impact on splitting.
For me, Generic can also be just a field access that reads or stores objects, because that is the most generic case, but, does not imply that the node ever saw something other than objects.
So, I wonder whether it would be useful to be able to define a cost parameter for the @Generic annotation, in order to be able to influence the cost of the resulting nodes?
Thanks
Stefan
--
Stefan Marr
INRIA Lille - Nord Europe
http://stefan-marr.de/research/
More information about the graal-dev
mailing list