[PATCH] D92385: [ARM] Add a pass that re-arranges blocks when there is a backwards WLS branch
Sam Tebbs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 03:12:18 PST 2021
samtebbs added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMBlockPlacement.cpp:213
+ // Fix fall-through to the moved BB from the one that used to be before it
+ if (BBPrevious && BBPrevious->isSuccessor(BB))
+ FixFallthrough(BBPrevious, BB);
----------------
SjoerdMeijer wrote:
> I guess `BBPrevious` is a nullptr when the WLS is in the Entry block? Is this covered with a test? I guess that will never happen, so we will always fix this fall through, and never skip over which is then not covered by a test.
> I am not even sure that makes sense, i.e. the WLS in the entry block, because then we would move the entry block. So, does this need to be an assert that BBprevious is not a nullptr?
I could make it an assertion and make sure it isn't the entry block in the main loop.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92385/new/
https://reviews.llvm.org/D92385
More information about the llvm-commits
mailing list