[llvm] r193681 - [mips] MipsSETargetLowering now reports DAGCombiner changes when using -debug-only=mips-isel

Daniel Sanders daniel.sanders at imgtec.com
Wed Oct 30 06:31:27 PDT 2013


Author: dsanders
Date: Wed Oct 30 08:31:27 2013
New Revision: 193681

URL: http://llvm.org/viewvc/llvm-project?rev=193681&view=rev
Log:
[mips] MipsSETargetLowering now reports DAGCombiner changes when using -debug-only=mips-isel

No test since -debug output is intended for developers and not end-users.


Modified:
    llvm/trunk/lib/Target/Mips/MipsSEISelLowering.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsSEISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsSEISelLowering.cpp?rev=193681&r1=193680&r2=193681&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsSEISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsSEISelLowering.cpp Wed Oct 30 08:31:27 2013
@@ -10,6 +10,7 @@
 // Subclass of MipsTargetLowering specialized for mips32/64.
 //
 //===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "mips-isel"
 #include "MipsSEISelLowering.h"
 #include "MipsRegisterInfo.h"
 #include "MipsTargetMachine.h"
@@ -17,6 +18,7 @@
 #include "llvm/CodeGen/MachineRegisterInfo.h"
 #include "llvm/IR/Intrinsics.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Target/TargetInstrInfo.h"
 
 using namespace llvm;
@@ -795,8 +797,14 @@ MipsSETargetLowering::PerformDAGCombine(
     break;
   }
 
-  if (Val.getNode())
+  if (Val.getNode()) {
+    DEBUG(dbgs() << "\nMipsSE DAG Combine:\n";
+          N->printrWithDepth(dbgs(), &DAG);
+          dbgs() << "\n=> \n";
+          Val.getNode()->printrWithDepth(dbgs(), &DAG);
+          dbgs() << "\n");
     return Val;
+  }
 
   return MipsTargetLowering::PerformDAGCombine(N, DCI);
 }





More information about the llvm-commits mailing list