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

Rafael Espíndola
2013-11-04T15:54:12Z

On 4 November 2013 02:31, Henrique Santos
<henrique.nazare.santos at gmail.com> 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?
>


Note that the return value of an invoke is defined on the *edge* of
the successful return. So you cannot have a path to a use that goes
through the exception instead. In your example you have:

landing -> defer_block -> next_step.

This Is a static property, so this code in invalid even if dynamically
this path is never taken.

Cheers,
Rafael