Truffle CallNode API
Stefan Marr
java at stefan-marr.de
Sun Mar 9 19:42:01 UTC 2014
Hi Christian:
On 05 Mar 2014, at 19:38, Christian Humer <christian.humer at gmail.com> wrote:
> I have to admit that the current heuristic for splitting is quite rough. So I can recommend you to enforce inlining and splitting with CallNode#inline and CallNode#split on the important calls for now. Is that good enough for you, for now?
Yes, works well, I think. Thanks. At least the DeltaBlue and Richards are back to the same performance as before.
> In the future this decision will be based on the polymorphism of the called method. Therefore we also introduced a new method to Node getKind. getKind returns whether the actual node is specialized/monomorphic, polymorphic or generic/megamorphic. By counting polymorphic/megamorphic nodes we can do a good guess if a split could be worthwhile or not. For this heuristic to work you have to implement #getKind() in your specializations. Nodes that use Truffle DSL automatically get support for that.
Ok, what exactly are the implications for the different node kinds?
For some of the nodes I am not entirely sure whether they are ’specialized’ or ‘generic’.
For instance, the lookup of globals goes from uninitialized to cached, because it simply looks up the association object (key, global value). So, is the ‘cached’ class a specialized or generic one? Does the distinction have an influence on your heuristic?
Thanks
Stefan
--
Stefan Marr
INRIA Lille - Nord Europe
http://stefan-marr.de/research/
More information about the graal-dev
mailing list