Message ID | AANLkTikWdqpG7-PCMAwYD4KlurgBWrGwlXl5RE9RS3uw@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Wed, Jun 30, 2010 at 4:17 PM, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote: > BTW, is there a rule against targets including the headers that they > need. Can .md files include headers? rs6000 uses exact_log2 in its constraints.md. This works because genpreds.c creates a source file which includes toplev.h. See genpreds.c:1340. I think someone should go through those includes also. Thanks, Andrew Pinski
On 1 July 2010 01:23, Andrew Pinski <pinskia@gmail.com> wrote: > On Wed, Jun 30, 2010 at 4:17 PM, Manuel López-Ibáñez > <lopezibanez@gmail.com> wrote: >> BTW, is there a rule against targets including the headers that they >> need. Can .md files include headers? > > rs6000 uses exact_log2 in its constraints.md. This works because > genpreds.c creates a source file which includes toplev.h. See > genpreds.c:1340. I think someone should go through those includes > also. But I didn't touch that file and toplev.h still contains exact_log2, so what is going on? Manuel.
On Wed, Jun 30, 2010 at 4:29 PM, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote: > On 1 July 2010 01:23, Andrew Pinski <pinskia@gmail.com> wrote: >> On Wed, Jun 30, 2010 at 4:17 PM, Manuel López-Ibáñez >> <lopezibanez@gmail.com> wrote: >>> BTW, is there a rule against targets including the headers that they >>> need. Can .md files include headers? >> >> rs6000 uses exact_log2 in its constraints.md. This works because >> genpreds.c creates a source file which includes toplev.h. See >> genpreds.c:1340. I think someone should go through those includes >> also. > > But I didn't touch that file and toplev.h still contains exact_log2, > so what is going on? Easy, Cris has not be converted over to use define_constraint yet. Thanks, Andrew Pinski
On Thu, 1 Jul 2010, Manuel López-Ibáñez wrote: > Richard, can I commit the following patch to fix the breakage or you > want me to wait until the merge is over? Richi ok'd this on IRC, so I verified that it fixed the build problem and committed it on behalf of you. Thanks. > 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org> > > * reload.c: Include toplev.h. > * recog.c: Likewise. > * Makefile.in: Adjust dependencies. brgds, H-P
Index: gcc/recog.c =================================================================== --- gcc/recog.c (revision 161633) +++ gcc/recog.c (working copy) @@ -42,6 +42,7 @@ #include "timevar.h" #include "tree-pass.h" #include "df.h" +#include "toplev.h" /* exact_log2 may be used by targets */ #ifndef STACK_PUSH_CODE #ifdef STACK_GROWS_DOWNWARD Index: gcc/reload.c =================================================================== --- gcc/reload.c (revision 161633) +++ gcc/reload.c (working copy) @@ -111,6 +111,7 @@ #include "params.h" #include "target.h" #include "ira.h" +#include "toplev.h" /* exact_log2 may be used by targets */ /* True if X is a constant that can be forced into the constant pool. */ #define CONST_POOL_OK_P(X) \ Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 161633) +++ gcc/Makefile.in (working copy) @@ -3269,7 +3269,7 @@ reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \ $(FLAGS_H) output.h $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) \ hard-reg-set.h insn-config.h $(REGS_H) $(FUNCTION_H) real.h \ - addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h + addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h $(TOPLEV_H) reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \ $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \ $(BASIC_BLOCK_H) $(RECOG_H) output.h $(FUNCTION_H) $(TM_P_H) \ @@ -3409,7 +3409,7 @@ $(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) output.h reload.h \ addresses.h $(TM_P_H) $(TIMEVAR_H) $(TREE_PASS_H) hard-reg-set.h \ - $(DF_H) $(DBGCNT_H) $(TARGET_H) + $(DF_H) $(DBGCNT_H) $(TARGET_H) $(TOPLEV_H) reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_ERROR_H) $(TREE_H) $(RECOG_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \ insn-config.h reload.h $(FUNCTION_H) $(TM_P_H) $(GGC_H) \