[llvm] r225275 - R600/SI: Remove MachineFunction dump from AsmPrinter

Tom Stellard thomas.stellard at amd.com
Tue Jan 6 09:59:57 PST 2015


Author: tstellar
Date: Tue Jan  6 11:59:56 2015
New Revision: 225275

URL: http://llvm.org/viewvc/llvm-project?rev=225275&view=rev
Log:
R600/SI: Remove MachineFunction dump from AsmPrinter

The dump was dependent on a feature string, which meant that it couldn't
be disabled or enable on a per compile basis.

Modified:
    llvm/trunk/lib/Target/R600/AMDGPUAsmPrinter.cpp

Modified: llvm/trunk/lib/Target/R600/AMDGPUAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUAsmPrinter.cpp?rev=225275&r1=225274&r2=225275&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUAsmPrinter.cpp Tue Jan  6 11:59:56 2015
@@ -161,23 +161,18 @@ bool AMDGPUAsmPrinter::runOnMachineFunct
     }
   }
 
-  if (STM.dumpCode()) {
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-    MF.dump();
-#endif
+  if (STM.dumpCode() && DisasmEnabled) {
 
-    if (DisasmEnabled) {
-      OutStreamer.SwitchSection(Context.getELFSection(".AMDGPU.disasm",
-                                                  ELF::SHT_NOTE, 0,
-                                                  SectionKind::getReadOnly()));
+    OutStreamer.SwitchSection(Context.getELFSection(".AMDGPU.disasm",
+                                                ELF::SHT_NOTE, 0,
+                                                SectionKind::getReadOnly()));
 
-      for (size_t i = 0; i < DisasmLines.size(); ++i) {
-        std::string Comment(DisasmLineMaxLen - DisasmLines[i].size(), ' ');
-        Comment += " ; " + HexLines[i] + "\n";
+    for (size_t i = 0; i < DisasmLines.size(); ++i) {
+      std::string Comment(DisasmLineMaxLen - DisasmLines[i].size(), ' ');
+      Comment += " ; " + HexLines[i] + "\n";
 
-        OutStreamer.EmitBytes(StringRef(DisasmLines[i]));
-        OutStreamer.EmitBytes(StringRef(Comment));
-      }
+      OutStreamer.EmitBytes(StringRef(DisasmLines[i]));
+      OutStreamer.EmitBytes(StringRef(Comment));
     }
   }
 





More information about the llvm-commits mailing list