Added implict operand printing for operator( ostream, MachineInstr&)
authorRuchira Sasanka <sasanka@students.uiuc.edu>
Thu, 18 Oct 2001 22:40:02 +0000 (22:40 +0000)
committerRuchira Sasanka <sasanka@students.uiuc.edu>
Thu, 18 Oct 2001 22:40:02 +0000 (22:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@912 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineInstr.cpp

index 76fd4e7c8357b5a10a852e77dba0bc0cac4ef190..2ec791f11b62c9e0ee49d897b6fe1308185dc0e8 100644 (file)
@@ -19,6 +19,7 @@
 #include "llvm/Instruction.h"
 
 
+
 //************************ Class Implementations **************************/
 
 // Constructor for instructions with fixed #operands (nearly all)
@@ -100,6 +101,25 @@ operator<< (ostream& os, const MachineInstr& minstr)
     }
 #endif
   
+
+#if 1
+  // code for printing implict references
+
+  unsigned NumOfImpRefs =  minstr.getNumImplicitRefs();
+  if(  NumOfImpRefs > 0 ) {
+       
+    os << "\tImplicit:";
+
+    for(unsigned z=0; z < NumOfImpRefs; z++) {
+      os << minstr.getImplicitRef(z);
+         cout << "\t";
+    }
+  }
+
+#endif
+
+
   os << endl;
   
   return os;