[PATCH] D59936: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 01:35:47 PDT 2019


uabelho added a comment.

In D59936#1452754 <https://reviews.llvm.org/D59936#1452754>, @hans wrote:

> In D59936#1452733 <https://reviews.llvm.org/D59936#1452733>, @uabelho wrote:
>
> > When looking at some code changes for my out-of-tree target with this commit I noticed a change that I thought I'd ask if you think
> >  is good or not.
> >
> > With this change we now seem to sink e.g. calls to @llvm.lifetime.end? It returns void, and thus has 0 uses, and as far as I understand
> >  such calls were not sinked before? Is this on purpose and is that good? In general I guess it's good to do lifetime.end at soon as possible?
> >
> > (And I suppose there are also a whole bunch of other intrinsics that also return void that can be sinked now, I've no idea if that
> >  can cause problems somewhere?)
>
>
> It's not on purpose in the sense that I was targeting the lifetime intrinsics, but it's showing my change working as intended.
>
> For the lifetime intrinsics, I don't think this really matters. As you say, it's good to do lifetime.end as soon as possible, so sinking them in general doesn't make sense, but I also don't think this matters much here because they can't be sunk very far, i.e. I don't see how this sinking could actually extend the lifetime.


Ok, yes I don't know, when I saw it it just worried me that perhaps intrinsics like lifetime.end was the "arbitrary" reason that we didn't allow to sink zero-use instructions before.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59936/new/

https://reviews.llvm.org/D59936





More information about the llvm-commits mailing list