C++ and gather-detailed-mem-stats

Marc Glisse marc.glisse@inria.fr
Wed Aug 15 10:30:00 GMT 2012

On Wed, 15 Aug 2012, Richard Guenther wrote:

> How would you deal with removing the ops3 variant here:
> -#define gimple_build_assign_with_ops(c,o1,o2,o3)                       \
> -  gimple_build_assign_with_ops_stat (c, o1, o2, o3, NULL_TREE
> -#define gimple_build_assign_with_ops3(c,o1,o2,o3,o4)                   \
> -  gimple_build_assign_with_ops_stat (c, o1, o2, o3, o4 MEM_STAT_INFO)
> via function overloading then?

Macros with ... and __VA_ARGS__ were not in C++03 IIRC :-( Otherwise you 
could have a macro that adds MEM_STAT_INFO and calls an overloaded *_stat 
function. (If you are doing it for gcc only, that could work)

I doubt you would be happy with a solution that requires calling 
gimple_build_assign_with_ops((...)) (double parentheses), might as well 
add MEM_STAT_INFO manually instead.

Nope, sorry :-(

Marc Glisse

More information about the Gcc mailing list