public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* help on - adding a new pass to gcc
@ 2009-11-10 16:25 ddmetro
  2009-11-10 16:36 ` Andrew Pinski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ddmetro @ 2009-11-10 16:25 UTC (permalink / raw)
  To: gcc


Hi All,
         We are adding a new pass for - structural hazard optimization - in
gcc.
         We have added a rtl_opt_pass variable(pass_sched3) declaration in
tree-pass.h and defined the same in a new file - sched-by-category.c
         We then added a target in gcc/Makefile.in, as follows:
sched-by-category.o : sched-by-category.c $(CONFIG_H) $(SYSTEM_H)
coretypes.h $(TM_H) \
   $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h
\
   $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) except.h $(PARAMS_H)
\
   $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h  \
   $(DBGCNT_H)

         We are getting an error in passes.c - undefined reference to
'pass_sched3'
         Kindly guide us as to what is wrong in our approach of adding a new
file to gcc build.

Thanking You,
  Dhiraj.
-- 
View this message in context: http://old.nabble.com/help-on---adding-a-new-pass-to-gcc-tp26286452p26286452.html
Sent from the gcc - Dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help on - adding a new pass to gcc
  2009-11-10 16:25 help on - adding a new pass to gcc ddmetro
@ 2009-11-10 16:36 ` Andrew Pinski
  2009-11-10 16:37 ` Bingfeng Mei
  2009-11-10 16:45 ` Basile STARYNKEVITCH
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2009-11-10 16:36 UTC (permalink / raw)
  To: ddmetro; +Cc: gcc

On Tue, Nov 10, 2009 at 8:25 AM, ddmetro <puzzlesdj@gmail.com> wrote:
>
> Hi All,
>         We are adding a new pass for - structural hazard optimization - in
> gcc.
>         We have added a rtl_opt_pass variable(pass_sched3) declaration in
> tree-pass.h and defined the same in a new file - sched-by-category.c
>         We then added a target in gcc/Makefile.in, as follows:
> sched-by-category.o

You forgot to add sched-by-category.o to the OBJS-common variable in
Makefile.in.

Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: help on - adding a new pass to gcc
  2009-11-10 16:25 help on - adding a new pass to gcc ddmetro
  2009-11-10 16:36 ` Andrew Pinski
@ 2009-11-10 16:37 ` Bingfeng Mei
  2009-11-10 16:45 ` Basile STARYNKEVITCH
  2 siblings, 0 replies; 4+ messages in thread
From: Bingfeng Mei @ 2009-11-10 16:37 UTC (permalink / raw)
  To: ddmetro, gcc

Did you add your new object file to OBJS-common list in Makefile.in? 

Bingfeng



> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On 
> Behalf Of ddmetro
> Sent: 10 November 2009 16:25
> To: gcc@gcc.gnu.org
> Subject: help on - adding a new pass to gcc
> 
> 
> Hi All,
>          We are adding a new pass for - structural hazard 
> optimization - in
> gcc.
>          We have added a rtl_opt_pass variable(pass_sched3) 
> declaration in
> tree-pass.h and defined the same in a new file - sched-by-category.c
>          We then added a target in gcc/Makefile.in, as follows:
> sched-by-category.o : sched-by-category.c $(CONFIG_H) $(SYSTEM_H)
> coretypes.h $(TM_H) \
>    $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h 
> $(FLAGS_H) insn-config.h
> \
>    $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) 
> except.h $(PARAMS_H)
> \
>    $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h  \
>    $(DBGCNT_H)
> 
>          We are getting an error in passes.c - undefined reference to
> 'pass_sched3'
>          Kindly guide us as to what is wrong in our approach 
> of adding a new
> file to gcc build.
> 
> Thanking You,
>   Dhiraj.
> -- 
> View this message in context: 
> http://old.nabble.com/help-on---adding-a-new-pass-to-gcc-tp262
> 86452p26286452.html
> Sent from the gcc - Dev mailing list archive at Nabble.com.
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help on - adding a new pass to gcc
  2009-11-10 16:25 help on - adding a new pass to gcc ddmetro
  2009-11-10 16:36 ` Andrew Pinski
  2009-11-10 16:37 ` Bingfeng Mei
@ 2009-11-10 16:45 ` Basile STARYNKEVITCH
  2 siblings, 0 replies; 4+ messages in thread
From: Basile STARYNKEVITCH @ 2009-11-10 16:45 UTC (permalink / raw)
  To: ddmetro; +Cc: gcc

ddmetro wrote:
> Hi All,
>          We are adding a new pass for - structural hazard optimization - in
> gcc.
>          We have added a rtl_opt_pass variable(pass_sched3) declaration in
> tree-pass.h and defined the same in a new file - sched-by-category.c

In addition of all the other good hints, you might perhaps try to make your pass a plugin of GCC; your use is a good 
case for a plugin.

Plugins are available in the latest GCC trunk (future 4.5) and should be enabled at configure (& also gcc use) time.

See http://gcc.gnu.org/onlinedocs/gccint/Plugins.html

Regards.
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-10 16:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-10 16:25 help on - adding a new pass to gcc ddmetro
2009-11-10 16:36 ` Andrew Pinski
2009-11-10 16:37 ` Bingfeng Mei
2009-11-10 16:45 ` Basile STARYNKEVITCH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).