[PATCH] D106001: [WIP][NFC] factor out unrolling decision logic
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 15 07:58:48 PDT 2021
mtrofin added a comment.
Thanks for fixing the commits! Please don't forget to add a commit message, both in git (i.e. git --ammend and add a message), and then copy it in the summary here.
Like discussed offline, I think we should explore next splitting the logic of shouldUnroll into its constituent sub-pieces, i.e. shouldFullyUnroll, shouldPartiallyUnroll, etc; that will simplify their interface - the output of one of these can be an Optional<unsigned>, where the unsigned is the decided trip count (and None means 'no' such unrolling)
But maybe we can do that in a next patch - @jdoerfert , WDYT?
================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp:1025
+ // UP.Runtime |= PragmaEnableUnroll || PragmaCount > 0 || UserUnrollCount;
+
if (!UP.Runtime) {
----------------
remove the commented line altogether, also the free space.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106001/new/
https://reviews.llvm.org/D106001
More information about the llvm-commits
mailing list