summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/CodeGen/MachineOutliner.h2
-rw-r--r--llvm/lib/Target/AArch64/AArch64InstrInfo.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineOutliner.h b/llvm/include/llvm/CodeGen/MachineOutliner.h
index dc6d99bd58b..7847c9f017c 100644
--- a/llvm/include/llvm/CodeGen/MachineOutliner.h
+++ b/llvm/include/llvm/CodeGen/MachineOutliner.h
@@ -142,6 +142,8 @@ public:
/// 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);
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index e60ca72626f..9c7782d7484 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -5065,6 +5065,8 @@ AArch64InstrInfo::getMachineOutlinerMBBFlags(MachineBasicBlock &MBB) const {
// 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);
OpenPOWER on IntegriCloud