[LLVMdev] Jump Theading/GVN bug - moving discussion to llvm-dev

Sanjoy Das sanjoy at playingwithpointers.com
Mon Feb 23 21:52:32 PST 2015


> Programmers don't usually write code like this directly, but it is common
> for it to happen as a result of the expansion of macros or inline functions.
> You would not want to require that a compiler front end *not* produce this.

I meant to say that whatever mechanism we use to track dead blocks
that may exhibit edge-cases of SSA def-use behavior does *not* need to
be clever enough to deal with this example, since the verifier rejects
this snippet (def of %m does not dominate its use).  If all we care
about are blocks that have to follow def-dominates-use in the
intuitive sense then a super simple succ_begin()/succ_end() based DFS
is sufficient.  What I don't know is whether such a thing will be fast
enough.

In any case, I don't have enough experience with LLVM to have a strong
/ defensible opinion on this, and I'll defer to the decision taken by
people who do.

-- Sanjoy



More information about the llvm-dev mailing list