R600/SI: Remove MachineFunction dump from AsmPrinter
authorTom Stellard <thomas.stellard@amd.com>
Tue, 6 Jan 2015 17:59:56 +0000 (17:59 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 6 Jan 2015 17:59:56 +0000 (17:59 +0000)
The dump was dependent on a feature string, which meant that it couldn't
be disabled or enable on a per compile basis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225275 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/AMDGPUAsmPrinter.cpp

index 36d4509358b13e6992bcc670ed48950a1d39026c..038bdc6f628d8862cbe88c57db1a73ef92a3ad29 100644 (file)
@@ -161,23 +161,18 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
     }
   }
 
-  if (STM.dumpCode()) {
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-    MF.dump();
-#endif
-
-    if (DisasmEnabled) {
-      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";
-
-        OutStreamer.EmitBytes(StringRef(DisasmLines[i]));
-        OutStreamer.EmitBytes(StringRef(Comment));
-      }
+  if (STM.dumpCode() && DisasmEnabled) {
+
+    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";
+
+      OutStreamer.EmitBytes(StringRef(DisasmLines[i]));
+      OutStreamer.EmitBytes(StringRef(Comment));
     }
   }