[llvm] dee9b01 - [riscv] Add some minimal tracing output to InsertVSETVLI

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri May 6 13:08:16 PDT 2022


Author: Philip Reames
Date: 2022-05-06T13:08:11-07:00
New Revision: dee9b01d83df8a20db7b983d0f3cc6dce65e022f

URL: https://github.com/llvm/llvm-project/commit/dee9b01d83df8a20db7b983d0f3cc6dce65e022f
DIFF: https://github.com/llvm/llvm-project/commit/dee9b01d83df8a20db7b983d0f3cc6dce65e022f.diff

LOG: [riscv] Add some minimal tracing output to InsertVSETVLI

Only available with -debug.  Main purpose is simplifying an upcoming change, and providing tools for debugging problems.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
index ddb4b5c9ef976..3224a342949ef 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -1015,6 +1015,8 @@ void RISCVInsertVSETVLI::computeIncomingVLVTYPE(const MachineBasicBlock &MBB) {
     return;
 
   BBInfo.Exit = TmpStatus;
+  LLVM_DEBUG(dbgs() << "Exit state of " << printMBBReference(MBB)
+                    << " changed to " << BBInfo.Exit << "\n");
 
   // Add the successors to the work list so we can propagate the changed exit
   // status.
@@ -1201,6 +1203,8 @@ bool RISCVInsertVSETVLI::runOnMachineFunction(MachineFunction &MF) {
   if (!ST.hasVInstructions())
     return false;
 
+  LLVM_DEBUG(dbgs() << "Entering InsertVSETVLI for " << MF.getName() << "\n");
+
   TII = ST.getInstrInfo();
   MRI = &MF.getRegInfo();
 


        


More information about the llvm-commits mailing list