[PATCH] D95806: [LoopUnrollAndJam] Do not allows loops which have no exit(ing) blocks or multiple exit(ing) blocks
Whitney Tsang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 15:50:59 PST 2021
Whitney added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp:835
+ // If the Loop has multiple exit blocks OR does not have an exit block,
+ // cannot perform unroll and jam
+ if (!L->getExitBlock()) {
----------------
nit: sentence ends with a period.
================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp:842
+
+ // If the Loop has multiple exiting blocks OR does not have an exiting
+ // blocks, cannot perform unroll and jam
----------------
How about:
`Only single exiting block is allowed.`
================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp:843
+ // If the Loop has multiple exiting blocks OR does not have an exiting
+ // blocks, cannot perform unroll and jam
+ if (!L->getExitingBlock()) {
----------------
nit: sentence ends with a period.
================
Comment at: llvm/test/Transforms/LoopUnrollAndJam/multiple_exit_blocks.ll:5
+; CHECK: Loop Unroll and Jam: F[h] Loop %bb8
+; CHECK: Won't unroll-and-jam; Loop has multiple exit blocks OR does not have an exit block
+
----------------
Can you please add a testcase with single exit block, but multiple exiting blocks?
================
Comment at: llvm/test/Transforms/LoopUnrollAndJam/multiple_exit_blocks.ll:13
+
+define i16 @g() {
+bb:
----------------
Is this function used?
================
Comment at: llvm/test/Transforms/LoopUnrollAndJam/multiple_exit_blocks.ll:58
+; Function Attrs: argmemonly nofree nosync nounwind willreturn
+declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
----------------
This is also not used.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95806/new/
https://reviews.llvm.org/D95806
More information about the llvm-commits
mailing list