[PATCH] D81225: Correctly report modified status for LoopDistribute
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 06:01:38 PDT 2020
foad added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopDistribute.cpp:789
+
+ bool Modified = false;
// We're done forming the partitions set up the reverse mapping from
----------------
It doesn't really matter but... aren't these variables usually called "Changed"?
================
Comment at: llvm/lib/Transforms/Scalar/LoopDistribute.cpp:794-800
// To keep things simple have an empty preheader before we version or clone
// the loop. (Also split if this has no predecessor, i.e. entry, because we
// rely on PH having a predecessor.)
- if (!PH->getSinglePredecessor() || &*PH->begin() != PH->getTerminator())
+ if (!PH->getSinglePredecessor() || &*PH->begin() != PH->getTerminator()) {
+ Modified = true;
SplitBlock(PH, PH->getTerminator(), DT, LI);
+ }
----------------
Would it be possible to delay this splitting until we know that the checks below won't fail? Or is that difficult to do?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81225/new/
https://reviews.llvm.org/D81225
More information about the llvm-commits
mailing list