This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r220949 - in /branches/google/gcc-4_9/gcc: comm...


Author: ccoutant
Date: Tue Feb 24 21:36:08 2015
New Revision: 220949

URL: https://gcc.gnu.org/viewcvs?rev=220949&root=gcc&view=rev
Log:
Minor changes to -ftwo-level-line-tables.

This patch is for the google/gcc-4_9 branch.

Originally, -ftwo-level-line-tables would output .subprog directives
only for inlined subprograms, and not for non-inlined ones. This was
to save space, on the assumption that the subprogram name for
non-inlined subprograms is available from the symbol table, and line
info can be reconstructed using the address obtained from there.
Unfortunately, the decl_line attribute from the subprogram DIE cannot
be reconstructed reliably, so if -gline-tables-only is given, and the
subprogram DIE is not available, we have no way of getting the decl_line
attribute for non-inlined subprograms.

This patch changes -ftwo-level-line-tables to output .subprog directives
for all subprograms, unless the new -fno-two-level-all-subprogs flag is
used to revert to the old behavior (this is meant to be temporary flag
while we're still experimenting with two-level line tables).

The cost is about 7.5% additional space in -gline-tables-only output
(after compression), or about 2 percentage points in a typical binary.

This patch also clears the logicals table at the beginning of each
function, to prevent reusing a logical from a previous function (which
could happen when compiling both C1 and C2 constructors, for example).

2015-02-24  Cary Coutant  <ccoutant@google.com>

	* common.opt (ftwo-level-all-subprogs): New option.
	* dwarf2out.c (scan_blocks_for_inlined_calls): Add more info to
        debugging output.
	(dwarf2out_begin_function): Empty logicals table at start of
        each function.
	(out_logical_entry): Output subprogram directives for non-inlined
        subprograms unless -fno-two-level-all-subprogs.

Modified:
    branches/google/gcc-4_9/gcc/common.opt
    branches/google/gcc-4_9/gcc/dwarf2out.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]