[LLVMdev] Inferring dependencies in phi instructions
Daniel Berlin
dberlin at dberlin.org
Mon Jun 29 10:22:53 PDT 2015
On Mon, Jun 29, 2015 at 10:16 AM, Evgeny Astigeevich
<Evgeny.Astigeevich at arm.com> wrote:
> Hi Anirudh,
>
>
>
> I hope these lecture slides about SSA and the dominance frontier will help
> you with SSA and control flow analysis:
>
>
>
> http://www.seas.harvard.edu/courses/cs252/2011sp/slides/Lec04-SSA.pdf
>
>
>
> Unfortunately a use of DominanceFrontierBase is deprecated in LLVM.
>
>
>
>>Thank you for your response. Going by your definition, x is control
>> dependent on y.
>
>> To extract this control dependency, do I need to maintain path conditions
>> for each basic block or can I do something simpler?
>
>>Also, I feel like this should be a recurring problem. Could you point me to
>> any code example that identifies all dependencies (control and data) for phi
>> instructions?
>
> You won’t have any of this problems if you build dominance frontiers in the
> reverse CFG (ReverseDominanceFrontiers).
>
You actually don't even need reverse dominance frontiers, you can do
it with a post-dominator tree.
More information about the llvm-dev
mailing list