This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Do not refer directly to gen_lowpart_xxx
- From: "Paolo Bonzini" <bonzini at gnu dot org>
- To: "Zack Weinberg" <zack at codesourcery dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 Jan 2004 20:14:41 +0100
- Subject: Re: [PATCH] Do not refer directly to gen_lowpart_xxx
- References: <4017CDF1.6070605@polimi.it><8765ew9cll.fsf@egil.codesourcery.com><000701c3e5d0$c59c02c0$68dc1d97@philo> <87llnr996l.fsf@egil.codesourcery.com>
> [Please make your mailer wordwrap before 80 columns.]
My mailer setup is a mess. :-( On the GNU machines I have mutt+Nano which
wordwraps at the window size. At home everything's fine but I have a 56k
Winmodem which I cannot use from Linux. Outside home I cannot read my ISP's
mail except by webmail, and this means that I cannot answer without showing
publicly my ISP's address (not spamfiltered, unlike the GNU address). Sigh.
> The ChangeLog needs to reflect the capitalization of the symbols in
> the source code.
A new ChangeLog is at the end of this message.
> I wasn't clear on whether gen_lowpart should be set to *anything*
> outside combine and CSE. Now it makes more sense. I think you should
> set and reset gen_lowpart in rest_of_handle_{combine,cse} instead of
> combine_instructions and cse_main; that way we are guaranteed not to
> miss early exit paths from the lower-level routines.
I tried that but it is more of a mess than this way. For example you should
duplicate code in rest_of_handle_cse2. It may be feasible (but is it a good
change?) if you move rest_of_handle_xxx to the files that actually implement
the pass; otherwise you end up with very deep implementation detail in
toplev.c.
Here is the fixed ChangeLog.
2004-01-28 Paolo Bonzini <bonzini@gnu.org>
* combine.c (cse_main): Set gen_lowpart to gen_lowpart_for_combine
and restore it to gen_lowpart_general on exit.
(gen_lowpart_for_combine): Adjust all callers to go through
gen_lowpart.
* cse.c (cse_main): Set gen_lowpart to gen_lowpart_if_possible
and restore it to gen_lowpart_general on exit.
(gen_lowpart_if_possible): Adjust all callers to go through
gen_lowpart.
* emit-rtl.c (gen_lowpart_general): New name of gen_lowpart.
(gen_lowpart): Declare as pointer to function, initialized to
gen_lowpart_general.
* rtl.h (gen_lowpart): Declare as pointer to function.
Paolo