This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] expr.h: Speed/clean up store_expr.


On Mon, 2004-12-13 at 19:39 -0500, Kazu Hirata wrote:
> Hi,
> 
> Attached is a patch to speed/clean up store_expr.
> 
> EXPAND_STACK_PARM is defined as 2 (as a micro-optimization) because
> store_expr used to use a construct like so:
> 
>   want_value & 2 ? EXPAND_STACK_PARM : EXPAND_NORMAL
> 
> which was presumably optimized to
> 
>   want_value & 2
> 
> using the fact that EXPAND_NORMAL == 0.
> 
> After I cleaned up store_expr recently, the construct above has become
> 
>   call_param_p ? EXPAND_STACK_PARM : EXPAND_NORMAL
> 
> which is really
> 
>   call_param_p ? 2 : 0
> 
> Note that we cannot use STORE_FLAG_VALUE in a straightforward manner
> on a machine where STORE_FLAG_VALUE is 1.
> 
> The patch removes this special "2" thing as it causes a
> micro-pessimization and doesn't serve any purpose these days.
> 
> Tested on i686-pc-linux-gnu.  OK to apply?
> 
> Kazu Hirata
> 
> 2004-12-13  Kazu Hirata  <kazu@cs.umass.edu>
> 
> 	* expr.h (expand_modifier): Define EXPAND_STACK_PARM as 1.
Approved.
jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]