This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bootstrap failure for target AVR, probably linked to Patch "2005-05-19 Jan Hubicka <jh@suse.cz>"


> Hi, 
> 
> I am observing a bootstrap failure for the avr target that seems to be related 
> to the patch
> 
> 2005-05-19  Jan Hubicka  <jh@suse.cz>
> ...
>         * basic-block.h (REG_BR_PROB_BASE): Define.
> ...
>         * rtl.h (REG_BR_PROB_BASE): Kill.
> 
> . Bootstrap using the switches 
> configure --target=avr --with-dwarf2 --enable-languages="c,c++" --disable-nls
> failed with the error message
> 
> gcc   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings 
> -Wstrict-prototypes -Wmissing-prototypes  -fno-common   -DHAVE_CONFIG_H    
> -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include 
> -I../../gcc/gcc/../libcpp/include  -c insn-emit.c \
>   -o insn-emit.o
> ../../gcc/gcc/config/avr/avr.md: In function `gen_movmemhi':
> ../../gcc/gcc/config/avr/avr.md:380: error: `REG_BR_PROB_BASE' undeclared 
> (first use in this function)
> ../../gcc/gcc/config/avr/avr.md:380: error: (Each undeclared identifier is 
> reported only once
> ../../gcc/gcc/config/avr/avr.md:380: error: for each function it appears in.)
> make[1]: *** [insn-emit.o] Fehler 1
> make[1]: Leaving directory `/home/bmh/gnucvs/cleanhead/build/gcc'
> make: *** [all-gcc] Fehler 2
> 
> The code causing the problems is enclosed in the prepration statements of a 
> define_expand pattern:
> 
> (define_expand "movmemhi"
>   [(parallel [(set (match_operand:BLK 0 "memory_operand" "")
>           (match_operand:BLK 1 "memory_operand" ""))
>           (use (match_operand:HI 2 "const_int_operand" ""))
>           (use (match_operand:HI 3 "const_int_operand" ""))])]
>   ""
>   "{
>   
> ...
> 
>   /* Work out branch probability for latter use.  */
>   prob = REG_BR_PROB_BASE - REG_BR_PROB_BASE / count;
> 
> 
> Since the missing macros seem to have moved from rtl.h to basic-block.h, I'd 
> like to know at which place one would need gcc make include the additional 
> header. IIUC, instruction-emit.c is the machine-generated source file that is 
> generated by the machine-description parsers.
> 
> Simply adding basic-block.h to the include list of the generated emit-insn.c 
> does not solve the problem but causes follow-up failures.
> 
> I'd appreciate help.

I am looking into that now.  I would preffer the way of adding
basic-block.h and friends into includes of insn-emit.c as in general I
would like to make expanders/splitters/output templates aware of the
profile (and thus BB they are in) so we can switch in between -O2/-Os on
local basis.
I must admit I am not 100% sure how to reach this elegantly as all the
ingerfaces are bit interwinded (even for the splitters we split in
final.c where we no longer have CFG available for all targets)

Honza
> 
> Yours,
> 
> Björn


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]