[LLVMdev] conditional flow resulting in "Instruction does not dominate all uses!"

edA-qa mort-ora-y eda-qa at disemia.com
Mon Nov 4 10:21:10 PST 2013


On 04/11/13 11:31, Henrique Santos wrote:
> But the incoming value from the landing pad will always be null, won't it?
> If so, just iterate through the predecessors and add the terminator as the
> incoming value if it's an invoke instruction and add the null value it's
> not.
> Won't that work?

I never thought of that option. I could do post-processing and simply
add the missing predecessors to the PHI statement. I'd use undefined
instead of null however. I'm not sure if it is a simple thing to
experiment with however. My example was nice in clean, but in reality
that result value is used at some arbitrary place later in the code --
it isn't clear (from my compiler's viewpoint) where the values come
together in a phi. But the idea makes sense, so I'll see if I can use it
somehow.

The other option I've toyed with before was actually creating distinct
landing pad paths. I just duplicated all the deferred code, once into
the normal path, once into the exception path. I'm still too far away
from a version where I can test if this is helpful. It's certainly more
code, but the non-exception path and can be heavily optimized then.

Thanks.



-- 
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.



More information about the llvm-dev mailing list