[llvm] [GlobalISel] Dump the machine function after each legalization iteration. NFC (PR #83401)

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 29 09:54:52 PST 2024


================
@@ -223,6 +223,7 @@ Legalizer::legalizeMachineFunction(MachineFunction &MF, const LegalizerInfo &LI,
   SmallVector<MachineInstr *, 128> RetryList;
   do {
     LLVM_DEBUG(dbgs() << "=== New Iteration ===\n");
+    LLVM_DEBUG(MF.dump());
----------------
aemerson wrote:

Yeah this will be way too verbose, maybe just printing the block is likely to be enough to see what's going on most of the time.

Adding this guarded under a special debug flag like `-gisel-legalizer-print-after-iter` should be ok.

https://github.com/llvm/llvm-project/pull/83401


More information about the llvm-commits mailing list