This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: define_constraints patch, re-revised
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Bernd Schmidt <bernds_cb1 at t-online dot de>
- Date: Sun, 19 Mar 2006 22:30:10 -0500
- Subject: Re: define_constraints patch, re-revised
- References: <20060227065229.GA18445@panix.com> <200603192340.k2JNe2D25364@makai.watson.ibm.com> <20060320031041.GA11599@panix.com>
>>>>> Zack Weinberg writes:
Zack> I have no better suggestion than that you move the #include "tm_p.h"
Zack> to the very bottom of the #include stack in every file that trips over
Zack> this. I believe this is safe, since the only things in CPU-protos.h
Zack> and tm-preds.h are function declarations + these inlines, and nothing
Zack> in other headers should need to see them.
Unfortunately, this creates a bigger mess. tm_p.h is included in
many files, not just generated files and not just files that actually need
the constraint functions. Not all of those files include the headers that
declare the function and variables referenced by tm_p.h. This means that
one needs to start including more and more header files in all source
files that include tm_p.h to satisfy those functions. Pretty soon every
source file in GCC is including lots of unnecessary headers.
I doubt this is the proper direction for a solution. Why can't
genpreds.c define the static functions at the top of insn-preds.c?
Thanks, David