[LLVMdev] conditional flow resulting in "Instruction does not dominate all uses!"
Rafael EspĂndola
rafael.espindola at gmail.com
Mon Nov 4 07:54:12 PST 2013
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
More information about the llvm-dev
mailing list