public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Disable early inlining while compiling for coverage (issue5173042)
@ 2011-10-01  1:12 Sharad Singhai
  2011-10-01  4:15 ` Xinliang David Li
  0 siblings, 1 reply; 10+ messages in thread
From: Sharad Singhai @ 2011-10-01  1:12 UTC (permalink / raw)
  To: reply, davidxl, gcc-patches

This patch disables early inlining when --coverage option is
specified. This improves coverage data in presence of other
optimizations, specially with -O2 where early inlining changes the
control flow graph sufficiently enough to generate seemingly very odd
source coverage.

Bootstrapped okay and regression tests passed.

Okay for google/gcc-4_6?

2011-09-30   Sharad Singhai  <singhai@google.com>

	* gcc.c (cc1_options): Added -fno-early-inlining for coverage.

Index: gcc.c
===================================================================
--- gcc.c	(revision 179402)
+++ gcc.c	(working copy)
@@ -776,7 +776,7 @@
  %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
  %{fsyntax-only:-o %j} %{-param*}\
  %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}\
- %{coverage:-fprofile-arcs -ftest-coverage}";
+ %{coverage:-fprofile-arcs -ftest-coverage -fno-early-inlining}";
 
 /* If an assembler wrapper is used to invoke post-assembly tools
    like MAO, --save-temps need to be passed to save the output of

--
This patch is available for review at http://codereview.appspot.com/5173042

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-11-07 22:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-01  1:12 Disable early inlining while compiling for coverage (issue5173042) Sharad Singhai
2011-10-01  4:15 ` Xinliang David Li
2011-10-01  5:37   ` Sharad Singhai (शरद सिंघई)
2011-10-01 12:17   ` Jan Hubicka
2011-10-01 17:19     ` Xinliang David Li
2011-10-01 19:49       ` Sharad Singhai (शरद सिंघई)
2011-10-02 10:04       ` Jan Hubicka
2011-10-02 10:09         ` Jan Hubicka
2011-11-07 21:40           ` Sharad Singhai
2011-11-07 22:16             ` Xinliang David Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).