[PATCH] D121381: [MemorySSA] Support lazy use optimization

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 28 08:07:05 PDT 2022


reames added a comment.

In D121381#3410717 <https://reviews.llvm.org/D121381#3410717>, @nikic wrote:

> In D121381#3410466 <https://reviews.llvm.org/D121381#3410466>, @reames wrote:
>
>> I noticed by accident that MemCpyOpt does not call ensureOptimizedUses, and thus changes behavior after this change.  Not sure if that's good or bad, but it doesn't seem to have been explicitly noted in the review.  For call slot optimization, we do perform a lot of clobber walks from loads.
>
> I'm surprised that this would cause a change in behavior. MemCpyOpt always does clobber walks (without any limit that falls back to getDefiningAccess), so it really shouldn't care whether uses are optimized or not. Possibly our optimization cutoffs work slightly different between the eager use optimization and the clobber walk, and that can cause differences?

Er, sorry, was apparently sloppy in my wording.

I did *not* see a functional difference.  I saw a compile time difference.  On at least one example, not having the eager use optimization caused a significant shift in where we spend time.  I'm not even saying it slowed down (the results were too noisy to tell), just that it was different and that doesn't seem obviously expected from the review.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121381



More information about the llvm-commits mailing list