replacing nodes with DeoptimizeNodes
Deneau, Tom
tom.deneau at amd.com
Thu Mar 6 12:21:07 PST 2014
OK, and if I get an error like
lowering of NodeA produced lowerable NodeB that should have been
recursively lowered as it introduces these new nodes: [171|Deopt]
does that mean I have to write my own lowering for NodeA which as part of that also lowers the replacement nodeB?
-- Tom
> -----Original Message-----
> From: gilwooden at gmail.com [mailto:gilwooden at gmail.com] On Behalf Of
> Gilles Duboscq
> Sent: Wednesday, March 05, 2014 4:29 AM
> To: Doug Simon
> Cc: Deneau, Tom; graal-dev at openjdk.java.net
> Subject: Re: replacing nodes with DeoptimizeNodes
>
> On Wed, Mar 5, 2014 at 11:18 AM, Doug Simon <doug.simon at oracle.com>
> wrote:
> >
> > On Mar 5, 2014, at 1:27 AM, Deneau, Tom <tom.deneau at amd.com> wrote:
> >
> >> Let's say there is some random graal node that you choose not to
> implement so you want it to be replaced by a DeoptimizeNode. How does
> one do that if the original node is not a terminal node, ie, it has
> usages?
> >
> > The subgraph rooted at that node has to be removed (probably through
> use of
> com.oracle.graal.nodes.util.GraphUtil.killWithUnusedFloatingInputs(Node)
> ).
>
> Rather GraphUtil.killCFG(Node).
> As an example, you can look at CanonicalizerPhase.performReplacement
> (around line 297):
> //case 7
> fixed.predecessor().replaceFirstSuccessor(fixed, canonical);
> GraphUtil.killCFG(fixed);
>
> even better would be:
> fixed.replaceAtPredecessor(canonical);
> GraphUtil.killCFG(fixed);
>
> where in you case fixed is the node you want to replace and canonical is
> the DeoptimizeNode.
>
> >
> > -Doug
More information about the graal-dev
mailing list