[PATCH] D31821: Remove redundant copy in recurrences

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 10:22:06 PDT 2017


On Sat, Jun 10, 2017 at 9:46 PM, Taewook Oh via Phabricator
<reviews at reviews.llvm.org> wrote:
> twoh added a comment.
>
> @wmi Not at all! Thanks for your comments.
>
> You're right. I should've considered the case where the operands involved in the recurrence cycle live beyond the use in the recurrence cycle. You're suggestion sounds great, but my concern is that computing live range might be expensive because live interval analysis is performed after peephole optimization, What do you think of limit it to the case of operands involved in the recurrence cycle have no use outside of the cycle?

I don't oppose to add the constraint. I think it is a step forward
compared with current status since it can handle cases across bbs. I
just suggest we can try the general approach if it is not too
difficult. If it turns out to be difficult right now, we can leave it
to the next step.

I saw the discussion here:
https://groups.google.com/forum/#!topic/llvm-dev/w0tMRBW23vU, showing
we can use live interval analysis in SSA form. It is just the matter
of cost to maintain it. The maintainance work of live interval
analysis is trivial for the transformation in this patch since it only
commutes operands, but it maybe more complex for peephole
optimization. Maybe we can make it a separate pass, after peephole but
still before phi-elimination? How much cost to just run the analysis?
We may need to collect some data, or Mattias and Quentin can give some
suggestions directly.

Thanks,
Wei.

>
>
> https://reviews.llvm.org/D31821
>
>
>


More information about the llvm-commits mailing list