[llvm-dev] PHI incoming blocks order
Friedman, Eli via llvm-dev
llvm-dev at lists.llvm.org
Mon Aug 14 11:47:35 PDT 2017
On 8/14/2017 3:58 AM, Anastasiya Ruzhanskaya via llvm-dev wrote:
> Hello,
> Is it a convenient way except of somehow iterating from one block to
> another to find from which block I have initial incoming value and
> from which I have a changing incoming value (this is only for phi
> nodes with two incoming blocks)? Dominator tree requires to know one
> block and one block edge...this is not what I want. Is it valid to
> take two first instructions from two incoming blocks and see what
> dominates what?
You can use Loop::contains() to figure out whether a basic block is
inside a loop. I think that's what you're looking for?
-Eli
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
More information about the llvm-dev
mailing list