[llvm-commits] [dragonegg] r95776 - in /dragonegg/trunk: TODO llvm-backend.cpp

Duncan Sands baldrick at free.fr
Wed Feb 10 04:05:03 PST 2010


Author: baldrick
Date: Wed Feb 10 06:05:02 2010
New Revision: 95776

URL: http://llvm.org/viewvc/llvm-project?rev=95776&view=rev
Log:
Suppress generation of debug info by GCC.  Previously, when compiling with -g,
vast reams of debug output would be created by GCC, for no benefit since it
would all be sent to /dev/null.  With this change, debug sections are still
output, but that's about it.  As well as improving efficiency, this makes the
compiler more stable, since -lfto (turned on internally by the plugin) and -g
are not yet fully supported.

Modified:
    dragonegg/trunk/TODO
    dragonegg/trunk/llvm-backend.cpp

Modified: dragonegg/trunk/TODO
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/TODO?rev=95776&r1=95775&r2=95776&view=diff

==============================================================================
--- dragonegg/trunk/TODO (original)
+++ dragonegg/trunk/TODO Wed Feb 10 06:05:02 2010
@@ -28,10 +28,6 @@
 
 Consider using separate caches for types and globals.
 
-Work out how to stop GCC from outputting debug info for global variables
-when compiling with -g.  The output is all thrown away, so harmless, but it
-would be more efficient not to produce any in the first place.
-
 Correctness
 -----------
 

Modified: dragonegg/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=95776&r1=95775&r2=95776&view=diff

==============================================================================
--- dragonegg/trunk/llvm-backend.cpp (original)
+++ dragonegg/trunk/llvm-backend.cpp Wed Feb 10 06:05:02 2010
@@ -65,6 +65,7 @@
 #include "tree.h"
 
 #include "cgraph.h"
+#include "debug.h"
 #include "diagnostic.h"
 #include "flags.h"
 #include "function.h"
@@ -1498,6 +1499,9 @@
 #else
 # error "LTO support required but not enabled in GCC"
 #endif
+
+  // Stop GCC outputting serious amounts of debug info.
+  debug_hooks = &do_nothing_debug_hooks;
 }
 
 





More information about the llvm-commits mailing list