Jan Hubicka | 1 Jun 2010 01:25
Picon

Make gen_rtx_fmt_* functions inline

Hi,
looking into -O3 WHOPR compilation build, I noticed that first few thousdand functions
inlined are functions produced by gengenrtl.c.  They looks as follows:
rtx
gen_rtx_fmt_iuuBieie_stat (RTX_CODE code, enum machine_mode mode,
	int arg0,
	rtx arg1,
	rtx arg2,
	struct basic_block_def *arg3,
	int arg4,
	rtx arg5,
	int arg6,
	rtx arg7 MEM_STAT_DECL)
{
  rtx rt;
  rt = rtx_alloc_stat (code PASS_MEM_STAT);

  PUT_MODE (rt, mode);
  XINT (rt, 0) = arg0;
  XEXP (rt, 1) = arg1;
  XEXP (rt, 2) = arg2;
  XBBDEF (rt, 3) = arg3;
  XINT (rt, 4) = arg4;
  XEXP (rt, 5) = arg5;
  XINT (rt, 6) = arg6;
  XEXP (rt, 7) = arg7;

  return rt;
}

(Continue reading)

Jan Hubicka | 1 Jun 2010 02:02
Picon

Fix code size estimates wrt variadic functions

Hi,
another common bogus inlines are trim_filename and rtl_checking_flag_failed.
They are called from error checking code that inliner should refuse to inline
because calls should be hot because of noreturn flag.

The reason for this is more stubble. The checking things takes usually many
arguments and pass them to internal_error.
When counting call cost we look into declaration arguments and thus we count
variadic function calls as cheap.  This leads inliner to think that inlining
those wrappers is going to reduce code size.

Fixed as follows.

Bootstraped/regtested x86_64-linux, OK?

Honza

	* tree-inline.c (estimate_num_insns): For stdarg functions look
	into call statement to count cost of argument passing.
Index: tree-inline.c
===================================================================
--- tree-inline.c	(revision 160079)
+++ tree-inline.c	(working copy)
 <at>  <at>  -3367,6 +3367,7  <at>  <at> 
 	tree decl = gimple_call_fndecl (stmt);
 	tree addr = gimple_call_fn (stmt);
 	tree funtype = TREE_TYPE (addr);
+	bool stdarg = false;

 	if (POINTER_TYPE_P (funtype))
(Continue reading)

Sandra Loosemore | 1 Jun 2010 02:32

PATCH: fix PR tree-optimization/39874

This patch adds some more sophisticated logic for simplifying logical AND and OR 
expressions to fix PR39874, one of the sub-cases of PR28685.

The test case illustrates the problem:

void func();
void test(char *signature)
{
   char ch = signature[0];
   if (ch == 15 || ch == 3)
   {
     if (ch == 15) func();
   }
}

Here, the ifcombine pass was being too stupid to optimize away the outer "if" 
because it was relying on combine_comparisons only to detect when it can do 
that.  So, the basic idea of my patch is to provide better logic for optimizing 
logical ANDs and ORs in the ifcombine pass.  I recently added a patch to 
tree_ssa_reassoc that also used combine_comparisons for a similar purpose to fix 
another one of the PR28685 sub-cases, and my new functions can apply there as well.

This patch didn't really start out being quite this complicated, but once I got 
started I figured I might as well add all the usual boolean identities and 
comparison simplifications.  Much of this duplicates simplifications that are 
performed on trees in fold-const.c, but my code deals with gimple 
representations and simplifications that can be performed by copy-propagating 
SSA variables.  (E.g., in the example above, the "ch == 15" expression is 
PRE'ed coming into the ifcombine pass.)

(Continue reading)

Jan Hubicka | 1 Jun 2010 02:40
Picon

Reorganize missing noreturn warning

Hi,
this patch moves noreturn warning code to same infrastructure as const/pure.
This change wording of the warning by "might be possible candidat" to "might be
candidate" and supress the warning when compiler can do full auto detection
(i.e. for static functions, have patch for that in equeue).

I added Wsuggest-attribute=noreturn and kept existing -Wmissing-noreturn as alias.

Bootstrapped/regtested x86_64-linux, OK?

Honza

	* doc/invoke.texi (Wsuggest-attribute): Document.
	(Wmissing-noreturn): Remove.
	* ipa-pure-const.c (warn_function_noreturn): New function.
	* opts.c (decode_options): Set warn_suggest_attribute_noreturn on
	warn_missing_noreturn.
	* common.opt (Wsuggest-attribute=noreturn): New.
	* tree-flow.h (warn_function_noreturn): Declare.
	* tree-cfg.c (execute_warn_function_noreturn): Use
	warn_function_noreturn.
	(gate_warn_function_noreturn): New.
	(pass_warn_function_noreturn): Update.

	* testsuite/gcc.dg/noreturn-7.c: Update.
	* testsuite/gcc.dg/noreturn-4.c: Update.
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 160077)
+++ doc/invoke.texi	(working copy)
(Continue reading)

Laurynas Biveinis | 1 Jun 2010 07:14
Picon
Gravatar

[PING] Re: [PATCH] gc-improv merge (1/n): new libiberty interfaces

Ping ^3 ?

http://gcc.gnu.org/ml/gcc-patches/2010-05/msg00454.html

I am pinging quite often as this is the last unapproved patch for
gc-improv merge, and because of time constraints I must do the merge
by the middle of end week, or risk having it postponed for about a
month.

>> 2010-05-05  Laurynas Biveinis  <laurynas.biveinis <at> gmail.com>
>>
>>        * splay-tree.h: Update copyright years.
>>        (splay_tree_s): Document fields.
>>        (splay_tree_new_typed_alloc): New.
>>
>>        * hashtab.h: Update copyright years.
>>        (htab_create_typed_alloc): New.
>>
>> libiberty:
>>
>>        * splay-tree.c: Update copyright years.
>>        (splay_tree_new_typed_alloc): New.
>>        (splay_tree_new_with_allocator): Use it.
>>
>>        * hashtab.c: Update copyright years.
>>        (htab_create_typed_alloc): New.
>>        (htab_create_alloc): Use it.
>>
>>        * functions.texi: Regenerate.

(Continue reading)

Basile Starynkevitch | 1 Jun 2010 07:27

Re: [PING] Re: [PATCH] gc-improv merge (1/n): new libiberty interfaces

On Tue, 2010-06-01 at 07:14 +0200, Laurynas Biveinis wrote:
> Ping ^3 ?
> 
> http://gcc.gnu.org/ml/gcc-patches/2010-05/msg00454.html
> 
> I am pinging quite often as this is the last unapproved patch for
> gc-improv merge, and because of time constraints I must do the merge
> by the middle of end week, or risk having it postponed for about a
> month.

I am not permitted to approve, but I hope that this patch will be
approved.

--

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Laurynas Biveinis | 1 Jun 2010 07:29
Picon
Gravatar

Re: [PING] Re: [PATCH] gc-improv merge (1/n): new libiberty interfaces

> http://gcc.gnu.org/ml/gcc-patches/2010-05/msg00454.html
>
> I am pinging quite often as this is the last unapproved patch for
> gc-improv merge, and because of time constraints I must do the merge
> by the middle of end week, or risk having it postponed for about a

Sorry, s/end/next

> month.

--

-- 
Laurynas

Patrick Marlier | 1 Jun 2010 10:08
Picon

Re: [trans-mem] rms-tm bug report

> +/* TM vector builtins.  */
> +static const struct builtin_description bdesc_tm[] =
> +{
> +  { OPTION_MASK_ISA_MMX, 0, "__builtin__ITM_WM64", BUILT_IN_TM_STORE_M64, UNKNOWN,
VOID_FTYPE_PV2SI_V2SI },
> +  { OPTION_MASK_ISA_MMX, 0, "__builtin__ITM_WaRM64", BUILT_IN_TM_STORE_WAR_M64, UNKNOWN,
VOID_FTYPE_PV2SI_V2SI },
> +  { OPTION_MASK_ISA_MMX, 0, "__builtin__ITM_WaWM64", BUILT_IN_TM_STORE_WAW_M64, UNKNOWN,
VOID_FTYPE_PV2SI_V2SI },
> +  { OPTION_MASK_ISA_MMX, 0, "__builtin__ITM_RM64", BUILT_IN_TM_LOAD_M64, UNKNOWN,
V2SI_FTYPE_PCV2SI },
> +  { OPTION_MASK_ISA_MMX, 0, "__builtin__ITM_RaRM64", BUILT_IN_TM_LOAD_RAR_M64, UNKNOWN,
V2SI_FTYPE_PCV2SI },
> +  { OPTION_MASK_ISA_MMX, 0, "__builtin__ITM_RaWM64", BUILT_IN_TM_LOAD_RAW_M64, UNKNOWN,
V2SI_FTYPE_PCV2SI },
> +  { OPTION_MASK_ISA_MMX, 0, "__builtin__ITM_RfWM64", BUILT_IN_TM_LOAD_RFW_M64, UNKNOWN,
V2SI_FTYPE_PCV2SI },
> +
> +  { OPTION_MASK_ISA_SSE, 0, "__builtin__ITM_WM128", BUILT_IN_TM_STORE_M128, UNKNOWN,
VOID_FTYPE_PV4SF_V4SF },
> +  { OPTION_MASK_ISA_SSE, 0, "__builtin__ITM_WaRM128", BUILT_IN_TM_STORE_WAR_M128, UNKNOWN,
VOID_FTYPE_PV4SF_V4SF },
> +  { OPTION_MASK_ISA_SSE, 0, "__builtin__ITM_WaWM128", BUILT_IN_TM_STORE_WAW_M128, UNKNOWN,
VOID_FTYPE_PV4SF_V4SF },
> +  { OPTION_MASK_ISA_SSE, 0, "__builtin__ITM_RM128", BUILT_IN_TM_LOAD_M128, UNKNOWN,
V4SF_FTYPE_PCV4SF },
> +  { OPTION_MASK_ISA_SSE, 0, "__builtin__ITM_RaRM128", BUILT_IN_TM_LOAD_RAR_M128, UNKNOWN,
V4SF_FTYPE_PCV4SF },
> +  { OPTION_MASK_ISA_SSE, 0, "__builtin__ITM_RaWM128", BUILT_IN_TM_LOAD_RAW_M128, UNKNOWN,
V4SF_FTYPE_PCV4SF },
(Continue reading)

Kai Tietz | 1 Jun 2010 10:15

Re: [patch i386 win32]: Fix local symbols for x64

2010/5/31 Kai Tietz <ktietz70 <at> googlemail.com>:
> 2010/5/31 Uros Bizjak <ubizjak <at> gmail.com>:
>> On Mon, May 31, 2010 at 2:26 PM, Kai Tietz <Kai.Tietz <at> onevision.com> wrote:
>>
>>> This patch makes sure, that for x64 non-underscore target the local
>>> symbols having prefix ".L" to avoid collisions with user symbols.
>>> Testcases that have shown this issue are c-c++-common/raw-string-1.c and
>>> c-c++-common/raw-string-2.c . Additional this patch fixes some testcases
>>> in gcc.dg for x64 target.
>>>
>>>
>>> ChangeLog
>>>
>>> gcc/
>>> 2010-05-31  Kai Tietz
>>>
>>>        * config/i386.c (ix86_output_addr_vec_elt): Make LPREFIX
>>>        argument for fprintf.
>>>        (ix86_output_addr_diff_elt): Likewise.
>>>        (x86_function_profiler): Likewise.
>>>        * config/cygming.h (LOCAL_LABEL_PREFIX): Fix
>>>        for x64 no-underscore.
>>>        (LPREFIX): Likewise.
>>>        (ASM_GENERATE_INTERNAL_LABEL): Likewise.
>>>
>>>
>>> gcc/testsuite
>>> 2010-05-31  Kai Tietz
>>>
>>>        * gcc.dg/compound-literal-1.c: Fix for llp64.
(Continue reading)

Steven Bosscher | 1 Jun 2010 10:22
Picon

Re: Fix code size estimates wrt variadic functions

On Tue, Jun 1, 2010 at 2:02 AM, Jan Hubicka <hubicka <at> ucw.cz> wrote:
> -       else if (funtype && prototype_p (funtype))
> +       else if (funtype && prototype_p (funtype) && !stdarg)
>          {
>            tree t;
>            for (t = TYPE_ARG_TYPES (funtype); t && t != void_list_node;

While you're hacking here... FOREACH_FUNCTION_ARGS?

Ciao!
Steven


Gmane