[PATCH] D35754: [ForwardOpTree] Introduce the -polly-optree pass.
Nandini Singhal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 06:04:40 PDT 2017
nandini12396 added a comment.
In https://reviews.llvm.org/D35754#818793, @Meinersbur wrote:
> In https://reviews.llvm.org/D35754#818516, @nandini12396 wrote:
>
> > Could you please explain what is the meaning of 'forwarding' of operand trees?
>
>
> Suppose you have two statements:
>
> StmtA:
> %add = fadd double 21.0,21.0
> bl label %StmtB
>
> StmtB:
> store double %add, double*A
>
>
> This would induce a scalar dependency from %StmtA to %StmtB. To avoid, we can recompute %add in %StmtB instead:
>
> StmtA:
> %add = fadd double 21.0,21.0
> bl label %StmtB
>
> StmtB:
> %add_ = fadd double 21.0,21.0
> store double %add_, double*A
>
>
> This "forwards" %add (and its operand tree/DAG) to StmtB.
Thank you. This is really nice idea. Do you have some cost modeling for when to allow this forwarding?
> I am open to naming it differently. I considered "reverse code motion".
Repository:
rL LLVM
https://reviews.llvm.org/D35754
More information about the llvm-commits
mailing list