[PATCH] D72131: [ARM][LowOverheadLoops] Update liveness info

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 02:35:58 PST 2020


samparker marked an inline comment as done.
samparker added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:577
   bool isReturnBlock() const {
-    return !empty() && back().isReturn();
+    for (auto &MI : reverse(Insts))
+      if (MI.isReturn())
----------------
dmgreen wrote:
> This doesn't match the description above.
> 
> isReturnBlock seems to be used in a number of other places too. Would they all be OK with this change?
> 
> The one in addLiveOuts seems to mark the CSR's as live out of the block, with isn't really true. They are live out of POP the instruction. The live out's of the block are not modified. Can we modify recomputeLivenessFlags to consider isReturn instructions instead?
The rest of code base seems ok with the change, but yes, trying it in LivePhysRegs sounds better, I'll give it a go.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72131/new/

https://reviews.llvm.org/D72131





More information about the llvm-commits mailing list