[llvm-commits] [llvm-gcc-4.2] r64713 - in /llvm-gcc-4.2/trunk/gcc: config/darwin.h llvm-backend.cpp llvm-debug.cpp
Bill Wendling
isanbard at gmail.com
Mon Feb 16 17:01:29 PST 2009
Author: void
Date: Mon Feb 16 19:01:29 2009
New Revision: 64713
URL: http://llvm.org/viewvc/llvm-project?rev=64713&view=rev
Log:
Reapply r63639:
Enable debug info at -O1+.
However, for now, do not emit variable and line number info at -O1+.
Modified:
llvm-gcc-4.2/trunk/gcc/config/darwin.h
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.h?rev=64713&r1=64712&r2=64713&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.h Mon Feb 16 19:01:29 2009
@@ -340,7 +340,6 @@
specifying the handling of options understood by generic Unix
linkers, and for positional arguments like libraries. */
/* APPLE LOCAL begin mainline */
-#ifdef ENABLE_LLVM
#define LINK_COMMAND_SPEC "\
%{!fdump=*:%{!fsyntax-only:%{!precomp:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%(linker) %l %X %{d} %{s} %{t} %{Z} %{u*} \
@@ -359,29 +358,7 @@
%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
"/* APPLE LOCAL end mainline 4.3 2006-10-31 4370146 */"\
%{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
- %{!O: %{!O1: %{!O2: %{!O3: %{!O4: %{!Os: \
-"/* LLVM LOCAL do not use dsymutil with -O1 or higher */"\
- %{g*:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}}}}}}}"
-#else
-#define LINK_COMMAND_SPEC "\
-%{!fdump=*:%{!fsyntax-only:%{!precomp:%{!c:%{!M:%{!MM:%{!E:%{!S:\
- %(linker) %l %X %{d} %{s} %{t} %{Z} %{u*} \
- %{A} %{e*} %{m} %{r} %{x} \
- %{o*}%{!o:-o a.out} \
- %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
- %{L*} %{fopenmp:%:include(libgomp.spec)%(link_gomp)} \
-"/* APPLE LOCAL add fcreate-profile */"\
- %(link_libgcc) %o %{fprofile-arcs|fprofile-generate|fcreate-profile|coverage:-lgcov} \
-"/* APPLE LOCAL nested functions 4357979 */"\
- %{fnested-functions: -allow_stack_execute} \
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %G %L}} \
-"/* APPLE LOCAL begin mainline 4.3 2006-10-31 4370146 */"\
- %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}\n\
-%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
-"/* APPLE LOCAL end mainline 4.3 2006-10-31 4370146 */"\
- %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
%{g*:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
-#endif
/* APPLE LOCAL end mainline */
#ifdef TARGET_SYSTEM_ROOT
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=64713&r1=64712&r2=64713&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Mon Feb 16 19:01:29 2009
@@ -250,7 +250,7 @@
// FIXME - Do not disable debug info while writing pch.
if (!flag_pch_file &&
- !optimize && debug_info_level > DINFO_LEVEL_NONE)
+ debug_info_level > DINFO_LEVEL_NONE)
TheDebugInfo = new DebugInfo(TheModule);
}
@@ -287,8 +287,7 @@
delete MB;
// FIXME - Do not disable debug info while writing pch.
- if (!flag_pch_file &&
- !optimize && debug_info_level > DINFO_LEVEL_NONE)
+ if (!flag_pch_file && debug_info_level > DINFO_LEVEL_NONE)
TheDebugInfo = new DebugInfo(TheModule);
if (!TheModule) {
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=64713&r1=64712&r2=64713&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Mon Feb 16 19:01:29 2009
@@ -299,6 +299,11 @@
/// region - "llvm.dbg.declare."
void DebugInfo::EmitDeclare(tree decl, unsigned Tag, const char *Name,
tree type, Value *AI, BasicBlock *CurBB) {
+
+ // Do not emit variable declaration info, for now.
+ if (optimize)
+ return;
+
// Ignore compiler generated temporaries.
if (DECL_IGNORED_P(decl))
return;
@@ -320,6 +325,11 @@
/// EmitStopPoint - Emit a call to llvm.dbg.stoppoint to indicate a change of
/// source line - "llvm.dbg.stoppoint."
void DebugInfo::EmitStopPoint(Function *Fn, BasicBlock *CurBB) {
+
+ // Do not emit line number info, for now.
+ if (optimize)
+ return;
+
// Don't bother if things are the same as last time.
if (PrevLineNo == CurLineNo &&
PrevBB == CurBB &&
More information about the llvm-commits
mailing list