An unexplained 10% speed-up with gcc-4.8

2013-12-23 Thread Michael Veksler

Hello All,

When I started using gcc-4.8.1 I was glad to observe a substantial
speed-up of about 10% in my code, as compared with gcc-4.7.3.

Usually, switching to newer compilers has a relatively minor effect
and definitely not a 10% speed-up. Was there anything significant
in gcc-4.8.1 which may explain this dramatic improvement?

My code is C++98 which is compiled with profile-driven optimizations,
with -O2. My target is generic 32 bit Intel architecture. The result is run
on Intel Xeon. The application is CPU intensive.

Michael



Re: An unexplained 10% speed-up with gcc-4.8

2013-12-23 Thread Michael Veksler

On 23/12/13 12:40, Michael Veksler wrote:

Hello All,

When I started using gcc-4.8.1 I was glad to observe a substantial
speed-up of about 10% in my code, as compared with gcc-4.7.3.

Usually, switching to newer compilers has a relatively minor effect
and definitely not a 10% speed-up. Was there anything significant
in gcc-4.8.1 which may explain this dramatic improvement?

My code is C++98 which is compiled with profile-driven optimizations,
with -O2. My target is generic 32 bit Intel architecture. The result 
is run

on Intel Xeon. The application is CPU intensive.


After some more testing, I found out that there is about 12% improvement
even when comparing two executables compiled without profile-driven
optimization.

Unfortunately, the vast improvement is observed only for x86, not for
x86-64. The speed-up on x86-64 is "only" 2-3%.

Michael.


error in converting macro IS_EXPR_CODE_CLASS() to function

2013-12-23 Thread Prathamesh Kulkarni
IS_EXPR_CODE_CLASS() is called at 18 places within gcc subdirectory,
and except for expr_check(), tree_block(), tree_set_block() all the
other callers pass argument of type enum tree_code_class to
IS_EXPR_CODE_CLASS().

These four callers (expr_check is overloaded) assign value of
TREE_CODE_CLASS() to variable of type char const, and then pass it as
argument to IS_EXPR_CODE_CLASS()

For example: tree_block():
tree
tree_block (tree t)
{
  char const c = TREE_CODE_CLASS (TREE_CODE (t));

  if (IS_EXPR_CODE_CLASS (c))
return LOCATION_BLOCK (t->exp.locus);
  gcc_unreachable ();
  return NULL;
}

Should type of "c" be changed to const enum tree_code_class instead
(similarly in other callers) ? Also, TREE_CODE_CLASS()'s value is of
type enum tree_code_class.

This gave a compile-error: invalid conversion from ‘char’ to ‘tree_code_class’
when i changed the macro IS_EXPR_CODE_CLASS() to the following function:

static inline bool
IS_EXPR_CODE_CLASS(enum tree_code_class code_class)
{
  return (code_class >= tcc_reference) && (code_class <= tcc_expression);
}

Thanks and Regards,
Prathamesh


Re: Remove spam in GCC mailing list

2013-12-23 Thread Tae Wong
Someone on Launchpad has suspended ~seotaewong40 as a spammer.

Please enable the account ~seotaewong40.

Log off in Launchpad and email information will be removed.
Log on to Launchpad and email information will be added.

Launchpad has a facility that replaces all email addresses with .

-- 
Tae-Wong Seo
Korea, Republic of