[LLVMdev] Multiple successors, single dynamic successor
Michael Ilseman
michael at lunarg.com
Tue Aug 2 11:02:08 PDT 2011
I'm assuming that you're talking about a situation where this can't be
determined statically in the existing LLVM IR, but you know it's true
and want to put it in (e.g. you're the one generating LLVM IR). If
that's not the case, then see if JumpThreading will do it for you.
I'm not familiar with a way to express exactly what you want to say,
but are you opposed to just duplicating the block? That is, you could
duplicate the block, and have the ith predecessor go to the duplicate
which goes to the ith successor. You can use JumpThreading::ThreadEdge
in lib/Transforms/Scalar/JumpThreading.cpp as a guide.
On Tue, Aug 2, 2011 at 10:22 AM, Carlo Alberto Ferraris
<cafxx at strayorange.com> wrote:
> Suppose I have a bb with N predecessors and N successors. What is, in your
> opinion, the best way to express that the bb has (dynamically) only one
> successor (i.e. if coming from the i-th predecessor we will always jump to
> the i-th successor)?
> b.r.,
> --
> Carlo Alberto Ferraris <cafxx at strayorange.com>
> website/blog - +39 333 7643 235
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
More information about the llvm-dev
mailing list