special handling for UnwindNode

Deneau, Tom tom.deneau at amd.com
Thu Dec 5 14:06:52 PST 2013

Hi --

For the hsail backend, we wanted to do some special handling for UnwindNode.

The current UnwindNode has

    public void generate(LIRGeneratorTool gen) {

So the LIRGenerators then have

    public void emitUnwind(Value exception) {

In our hsail handling, we would like to have access to the original exception ValueNode rather than the Value.  (I don't really know, can one get back to the ValueNode given the Value?)

As a dirty solution, we could stick some special handling in UnwindNode but for the long run I was thinking of how to do this without changing any of the base classes.

I thought in the lowering stage we could replace UnwindNode with our own HSAILUnwindNode with its own generate routine that did something like
    public void generate(LIRGeneratorTool gen) {

but saw that graph.replaceFixedWithFixed could not be used in this case because UnwindNode is not a FixedWithNextNode.

Any other suggestions of how this could be done without changing the base classes?

-- Tom

More information about the graal-dev mailing list