On 2012-09-17 09:25 , Richard Guenther wrote:

This makes use of the new builtin functions for FILE, LINE and FUNCTION
to turn gimple_build_assign_with_ops/gimple_build_assign_with_ops3 into
two overloads of gimple_build_assign_with_ops (in theory the _stats
function can go and we could move the inlines to gimple.c instead,
eventually removing the assert and simply calling the 3-op overload
from the 2-op overload?)

Sounds like a good next step, yes.

The patch merely serves as an example on how to transform mem-stat
code to non-macros.

Quickly build-tested with --disable-gather-detailed-mem-stats,
stage1 with --enable-gather-detailed-mem-stats and host GCC 4.6
prints

gimple.h:766 ((null))                                         112: 0.0%
0: 0.0%          0: 0.0%          0: 0.0%

for a former gimple_build_assign_with_ops3 call, stage2 (or stage1
with a GCC 4.8 host compiler) prints

tree-ssa-math-opts.c:2610 (convert_mult_to_fma)         112: 0.0%
0: 0.0%          0: 0.0%          0: 0.0%          1

so it effectively cripples -fmem-report when not compiled with
a compiler supporting the builtins.

But for a bootstrapped 4.8+ compiler, this won't matter, right? It's only when using a host compiler that doesn't support the builtins.

Any comments/objections?

Looks good to me.  Thanks.


Diego.

Reply via email to