PATCH: optimise call graph for coverage data

Michael Matz matz@suse.de
Fri Apr 4 01:22:00 GMT 2008


Hi,

On Fri, 4 Apr 2008, Ben Elliston wrote:

> Compiling a test case that makes many calls to builtins with
> -fprofile-arcs -ftest-coverage, generates code that consumes a lot of
> space in the corresponding LPBX record.
> 
> tree-cfg.c creates a fake edge from a call to a builtin to the exit
> block of the enclosing function because the call is not a noreturn
> function (ie. it may longjmp).  Thus, the builtin is treated as a
> regular function call.  Many of the GCC builtins are neither const nor
> pure, so a new ECF constant seems to be needed.  I chose
> ECF_RETURNS_ONCE.

Isn't this the same as ECF_NOTHROW && !ECF_NORETURN && !ECF_RETURNS_TWICE?  
After all, if a function doesn't throw, does return, but doesn't return 
twice, it returns exactly once.  Couldn't the predicate for 
need_fake_edge_p be adjusted to take ECF_NOTHROW into account?


Ciao,
Michael.



More information about the Gcc-patches mailing list