[PATCH] D49023: [MachineOutliner] Assert that Liveness tracking is accurate (NFC)

Yvan Roux via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 6 12:16:41 PDT 2018


yroux updated this revision to Diff 154445.

Repository:
  rL LLVM

https://reviews.llvm.org/D49023

Files:
  include/llvm/CodeGen/MachineOutliner.h
  lib/Target/AArch64/AArch64InstrInfo.cpp


Index: lib/Target/AArch64/AArch64InstrInfo.cpp
===================================================================
--- lib/Target/AArch64/AArch64InstrInfo.cpp
+++ lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -5065,6 +5065,8 @@
 
   // Check if LR is available through all of the MBB. If it's not, then set
   // a flag.
+  assert(MBB.getParent()->getRegInfo().tracksLiveness() &&
+         "Suitable Machine Function for outlining must track liveness");
   LiveRegUnits LRU(getRegisterInfo());
   LRU.addLiveOuts(MBB);
 
Index: include/llvm/CodeGen/MachineOutliner.h
===================================================================
--- include/llvm/CodeGen/MachineOutliner.h
+++ include/llvm/CodeGen/MachineOutliner.h
@@ -142,6 +142,8 @@
   /// If a target does not need this information, then this should not be
   /// called.
   void initLRU(const TargetRegisterInfo &TRI) {
+    assert(MBB->getParent()->getRegInfo().tracksLiveness() &&
+           "Candidate's Machine Function must track liveness");
     LRU.init(TRI);
     LRU.addLiveOuts(*MBB);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49023.154445.patch
Type: text/x-patch
Size: 1056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180706/562e35f8/attachment.bin>


More information about the llvm-commits mailing list