[llvm] 50f846d - [FastISel] Add some debug output (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 12 03:25:28 PDT 2022
Author: Nikita Popov
Date: 2022-05-12T12:25:20+02:00
New Revision: 50f846d63443781a5c00ec7022c381c4f09f543d
URL: https://github.com/llvm/llvm-project/commit/50f846d63443781a5c00ec7022c381c4f09f543d
DIFF: https://github.com/llvm/llvm-project/commit/50f846d63443781a5c00ec7022c381c4f09f543d.diff
LOG: [FastISel] Add some debug output (NFC)
Print a debug message when aborting isel (next to the ORE report)
and when folding a load.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index dab5d3fe68a80..cd1d63086edc4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -706,6 +706,7 @@ static void reportFastISelFailure(MachineFunction &MF,
report_fatal_error(Twine(R.getMsg()));
ORE.emit(R);
+ LLVM_DEBUG(dbgs() << R.getMsg() << "\n");
}
void SelectionDAGISel::SelectBasicBlock(BasicBlock::const_iterator Begin,
@@ -1524,6 +1525,8 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
BeforeInst->hasOneUse() &&
FastIS->tryToFoldLoad(cast<LoadInst>(BeforeInst), Inst)) {
// If we succeeded, don't re-select the load.
+ LLVM_DEBUG(dbgs()
+ << "FastISel folded load: " << *BeforeInst << "\n");
BI = std::next(BasicBlock::const_iterator(BeforeInst));
--NumFastIselRemaining;
++NumFastIselSuccess;
More information about the llvm-commits
mailing list