This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,avr]: PR target/52692: Imlpement TARGET_BUILTIN_DECL
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Mon, 26 Mar 2012 22:55:18 +0400
- Subject: Re: [Patch,avr]: PR target/52692: Imlpement TARGET_BUILTIN_DECL
- References: <4F7079B2.6030009@gjlay.de>
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.