Patchwork [committed] Handle BUILT_IN_ASSUME_ALIGNED in tree-object-size.c

login
register
mail settings
Submitter Jakub Jelinek
Date July 1, 2011, 9:16 p.m.
Message ID <20110701211617.GJ16443@tyan-ft48-01.lab.bos.redhat.com>
Download mbox | patch
Permalink /patch/102969/
State New
Headers show

Comments

Jakub Jelinek - July 1, 2011, 9:16 p.m.
Hi!

__builtin_assume_aligned is a pass thru call, preserves
object size.

Bootstrapped/regtested on x86_64-linux and i686-linux, committed
as obvious.

2011-07-01  Jakub Jelinek  <jakub@redhat.com>

	* tree-object-size.c (pass_through_call): Handle
	BUILT_IN_ASSUME_ALIGNED.


	Jakub

Patch

--- gcc/tree-object-size.c.jj	2011-06-15 11:54:43.000000000 +0200
+++ gcc/tree-object-size.c	2011-07-01 10:23:53.361527213 +0200
@@ -1,5 +1,5 @@ 
 /* __builtin_object_size (ptr, object_size_type) computation
-   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Jakub Jelinek <jakub@redhat.com>
 
@@ -464,6 +464,7 @@  pass_through_call (const_gimple call)
       case BUILT_IN_STRNCPY_CHK:
       case BUILT_IN_STRCAT_CHK:
       case BUILT_IN_STRNCAT_CHK:
+      case BUILT_IN_ASSUME_ALIGNED:
 	if (gimple_call_num_args (call) >= 1)
 	  return gimple_call_arg (call, 0);
 	break;