ActiveNodes = nullptr;
return Perfect;
}
+
+void SpillPlacement::BlockConstraint::print(raw_ostream &OS) const {
+ auto toString = [](BorderConstraint C) -> StringRef {
+ switch(C) {
+ case DontCare: return "DontCare";
+ case PrefReg: return "PrefReg";
+ case PrefSpill: return "PrefSpill";
+ case PrefBoth: return "PrefBoth";
+ case MustSpill: return "MustSpill";
+ default:
+ llvm_unreachable("uncovered switch");
+ };
+ };
+
+ dbgs() << "{" << Number << ", "
+ << toString(Entry) << ", "
+ << toString(Exit) << ", "
+ << (ChangesValue ? "changes" : "no change") << "}";
+}
+
+void SpillPlacement::BlockConstraint::dump() const {
+ print(dbgs());
+ dbgs() << "\n";
+}
/// the block has a non-PHI def. When this is false, a live-in value on
/// the stack can be live-out on the stack without inserting a spill.
bool ChangesValue;
+
+ void print(raw_ostream &OS) const;
+ void dump() const;
};
/// prepare - Reset state and prepare for a new spill placement computation.
SlotIndex From = enterIntvBefore(std::min(Idx, BI.FirstInstr));
useIntv(From, Idx);
}
+
+void SplitAnalysis::BlockInfo::print(raw_ostream &OS) const {
+ OS << "{" << printMBBReference(*MBB) << ", "
+ << "uses " << FirstInstr << " to " << LastInstr << ", "
+ << "1st def " << FirstDef << ", "
+ << (LiveIn ? "live in" : "dead in") << ", "
+ << (LiveOut ? "live out" : "dead out") << "}";
+}
+
+void SplitAnalysis::BlockInfo::dump() const {
+ print(dbgs());
+ dbgs() << "\n";
+}
bool isOneInstr() const {
return SlotIndex::isSameInstr(FirstInstr, LastInstr);
}
+
+ void print(raw_ostream &OS) const;
+ void dump() const;
};
private: