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
@Override
public void generate(LIRGeneratorTool gen) {
gen.emitUnwind(gen.operand(exception()));
}
So the LIRGenerators then have
@Override
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
@Override
public void generate(LIRGeneratorTool gen) {
gen.emitUnwind(exception());
}
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