[PATCH] D104636: [LoopIdiom] [LoopNest] let the pass deal with runtime memset size

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 02:47:39 PDT 2021


lebedev.ri requested changes to this revision.
lebedev.ri added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/test/Transforms/LoopIdiom/memset-runtime.ll:22
+; We need to add runtime checks for this optimization, and version the loop.
+; The optimized IR should be similar to the following:
+; void test(int *ar, long n)
----------------
eopXD wrote:
> xbolva00 wrote:
> > So we have original loops and memset, which could be expanded to series of stores. Nightmare for codesize..
> I think this pass does the opposite. It processes series of store of a loop into a single `memset`.
> 
> The code size increase scenario by this patch is when versioning happens.
> (Original LoopIdiomRecognize doesn't involve versioning)
> The code size increase scenario by this patch is when versioning happens.

Isn't that the @xbolva00's comment in the first place?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104636



More information about the llvm-commits mailing list