[llvm-commits] [llvm] r151466 - in /llvm/trunk: include/llvm/Analysis/Dominators.h lib/Analysis/InstructionSimplify.cpp

Jay Foad jay.foad at gmail.com
Mon Mar 5 00:17:57 PST 2012


On 4 March 2012 12:49, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> On 2 March 2012 17:44, Duncan Sands <baldrick at free.fr> wrote:
>> Hi Rafael,
>>
>>> Don't call dominates on unreachable instructions.
>>
>> why not?  Is there really no sensible definition of domination in this case?
>
> The textbook book one that I know is that (at least at the BB level),
> an unreachable BB is dominated by anything. Chris points out that it
> is handy to have an API where dominates(A, B) != dominates(B, A)

That's not quite what he said. There are loads of cases where
dominates(A, B) == dominates(B, A) because they are both false. I
think he was only concerned about them both being true.

Jay.




More information about the llvm-commits mailing list