This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Overhaul __builtin_constant_p processing (take 2)
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Cc: roger at www dot eyesopen dot com, rth at redhat dot com
- Date: Wed, 26 Feb 2003 14:57:30 -0500 (EST)
- Subject: Re: [PATCH] Overhaul __builtin_constant_p processing (take 2)
I mentioned previously the regression for gcc.c-torture/execute/20010119-1.c
on hppa2.0w-hp-hpux11* on the trunk. I have tracked this regression to your
2003-01-21 Roger Sayle <roger at eyesopen dot com>
* 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.
Possibly, some of the slow down that you saw was due to this optimization
J. David Anglin dave dot anglin at nrc-cnrc dot gc dot ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)