This is the mail archive of the gcc-patches@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: [Patch,avr]: PR target/52692: Imlpement TARGET_BUILTIN_DECL


2012/3/26 Georg-Johann Lay <avr@gjlay.de>:
> This implements TARGET_BUILTIN_DECL which is needed to make
> LTO work with target-specific built-ins.
>
> struct avr_builtin_description gets a new field .fndecl which is
> initialized during avr_init_builtins and looked up in new hook
> avr_builtin_decl.
>
> The built-ins are initialized in such a way that there is always
> Âavr_bdesc[x].id == x
> i.e. .id is superfluous and avr_expand_builtin can use id to access
> the array and need no search loop to find built-in id.
>
> Johann
>
> Ok?
>
> gcc/
> Â Â Â ÂPR target/52692
> Â Â Â Â* config/avr/avr.c (TARGET_BUILTIN_DECL): New define.
> Â Â Â Â(avr_builtin_decl): New static function.
> Â Â Â Â(struct avr_builtin_description, avr_bdesc): Move up.
> Â Â Â ÂAdd GTY marker. Add field fndecl. Remove redundant field id.
> Â Â Â Â(avr_init_builtins): Initialize avr_bdesc[ID].fndecl.
> Â Â Â Â(avr_expand_builtin): Code cleanup because .id is removed.
>
> testsuite/
> Â Â Â Â* gcc.target/avr/torture/builtins-2.c: New test.

Please, apply.

Denis.


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