[llvm-commits] [llvm-gcc-4.2] r67711 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Dale Johannesen
dalej at apple.com
Wed Mar 25 15:26:09 PDT 2009
Author: johannes
Date: Wed Mar 25 17:26:09 2009
New Revision: 67711
URL: http://llvm.org/viewvc/llvm-project?rev=67711&view=rev
Log:
For now, don't emit global variable debug info when
optimization is on; this affects some optimizations.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=67711&r1=67710&r2=67711&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Wed Mar 25 17:26:09 2009
@@ -1364,7 +1364,10 @@
#endif
}
- if (TheDebugInfo) TheDebugInfo->EmitGlobalVariable(GV, decl);
+ // No debug info for globals when optimization is on. While this is
+ // something that would be accurate and useful to a user, it currently
+ // affects some optimizations that, e.g., count uses.
+ if (TheDebugInfo && !optimize) TheDebugInfo->EmitGlobalVariable(GV, decl);
TREE_ASM_WRITTEN(decl) = 1;
timevar_pop(TV_LLVM_GLOBALS);
More information about the llvm-commits
mailing list