[PATCH] D53876: Preserve loop metadata when splitting exit blocks
Chang Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 2 15:38:05 PDT 2018
clin1 marked 7 inline comments as done.
clin1 added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:39
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
+#include "llvm/IR/InstrTypes.h"
----------------
dmgreen wrote:
> These should be in order. I think running clang-format on the patch will do that for you.
Added by mistake; thanks.
================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:96
+ if (NewExitBB && OuterLoopMD &&
+ LI->getLoopFor(NewExitBB) == LI->getLoopFor(BB)) {
+ // Every pred of the new block should be a latch for the outer loop,
----------------
mkazantsev wrote:
> Is it possible that their loops don't match? If no, please turn it into an assert. If yes, please add a test on this situation.
It's taken care of by the assert below, but it needs a better explanation. Comments have all been rewritten.
Repository:
rL LLVM
https://reviews.llvm.org/D53876
More information about the llvm-commits
mailing list