[PATCH] Overhaul __builtin_constant_p processing (take 2)

Kazu Hirata kazu@cs.umass.edu
Sun Jan 26 18:08:00 GMT 2003


Hi Roger,

> > 2003-01-21  Roger Sayle  <roger@eyesopen.com>
> > 
> > 	PR optimization/8423
> > 	* cse.c (fold_rtx): Only eliminate a CONSTANT_P_RTX to 1 when
> > 	its argument is constant, or 0 if !flag_gcse.
> > 	* simplify-rtx.c (simplify_rtx): Convert CONSTANT_P_RTX to 1
> > 	if it's argument is constant.
> > 	* gcse.c (want_to_gcse_p): Ignore CONSTANT_P_RTX nodes.
> > 	(hash_scan_set): Don't record CONSTANT_P_RTX expressions.
> > 	(do_local_cprop): Don't propagate CONSTANT_P_RTX constants.
> > 	* builtins.c (purge_builtin_constant_p): New function to force
> > 	instantiation of any remaining CONSTANT_P_RTX nodes.
> > 	* rtl.h (purge_builtin_constant_p): Prototype here.
> > 	* toplev.c (rest_of_compilation): Invoke purge_builtin_constant_p
> > 	pass after GCSE and before loop.
> > 	(flag_gcse): No longer static.
> > 	* flags.h (flag_gcse): Prototype here.
> 
> This seems to cause execute/20010119-1.c to fail on H8 with -O2.  I
> tried the mainline as of 17:00 GMT on 01/26/2002, but it is still
> failing.  Is there anyway you could look at this?  Sorry for reporting
> this a little late.

I'd like to add that the patch also causes XPASS of
execute/builtin-constant.c on H8 with -O2.

Thanks,

Kazu Hirata



More information about the Gcc-patches mailing list