Summary: | x86 machine builtins do not have any const/pure attributes set | ||
---|---|---|---|
Product: | gcc | Reporter: | Steven Bosscher <steven> |
Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | gcc-bugs, hubicka, pinskia, rth |
Priority: | P2 | Keywords: | missed-optimization |
Version: | 4.1.0 | ||
Target Milestone: | 4.3.0 | ||
Host: | Target: | i?86-*-*, x86_64-*-* | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2006-10-22 21:14:48 | |
Bug Depends on: | 18427 | ||
Bug Blocks: | |||
Attachments: | add const and pure markers for builtins |
Description
Steven Bosscher
2005-05-15 17:50:42 UTC
Confirmed, I cannot remember or not if the rs6000/altivec builtins were fixed or not. True. I remember trying this, though, and in practice all it did was increase register pressure. Created attachment 9382 [details]
add const and pure markers for builtins
I ran across the patch I wrote once upon a time. Again, the couple of test
cases I looked at regressed in absolute code quality due to excessive register
spillage. So applying this may want to wait until we have a new register
allocator. Perhaps sometime in the 2010's for gcc 5.0...
Making this depend on the "need a new ra" bug. Subject: Re: x86 machine builtins do not have any const/pure attributes set > > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-29 04:12 ------- > Making this depend on the "need a new ra" bug. Does the code quality regression still hold even after libcalls was removed? These definitly was one of reason for ineffencities in pure/const function call code generation. Honza > > -- > What |Removed |Added > ---------------------------------------------------------------------------- > BugsThisDependsOn| |18427 > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588 > > ------- You are receiving this mail because: ------- > You are on the CC list for the bug, or are watching someone who is. (In reply to comment #5) > Does the code quality regression still hold even after libcalls was > removed? These definitly was one of reason for ineffencities in > pure/const function call code generation. I doubt it since these expanded into RTL instruction and there is no call at the rtl level. Subject: Re: x86 machine builtins do not have any const/pure attributes set
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-30 12:56 -------
> (In reply to comment #5)
> > Does the code quality regression still hold even after libcalls was
> > removed? These definitly was one of reason for ineffencities in
> > pure/const function call code generation.
>
> I doubt it since these expanded into RTL instruction and there is no call at the rtl level.
Hmm, right ;) Should look deper into PR before responding...
Honza
Fixed for 4.3.0 by: Author: uros Date: Sat Jul 14 13:46:40 2007 New Revision: 126639 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126639 Log: * config/i386/i386.c (init_mmx_sse_builtins): Define all builtins except __builtin_ia32_emms, __builtin_ia32_ldmxcsr, __builtin_ia32_stmxcsr, __builtin_ia32_maskmovq, __builtin_ia32_loadups, __builtin_ia32_storeups, __builtin_ia32_loadhps, __builtin_ia32_loadlps, __builtin_ia32_storehps, __builtin_ia32_storelps, __builtin_ia32_movntps, __builtin_ia32_movntq, __builtin_ia32_sfence, __builtin_ia32_femms, __builtin_ia32_maskmovdqu, __builtin_ia32_loadupd, __builtin_ia32_storeupd, __builtin_ia32_loadhpd, __builtin_ia32_loadlpd, __builtin_ia32_movnti, __builtin_ia32_movntpd, __builtin_ia32_movntdq, __builtin_ia32_clflush, __builtin_ia32_lfence, __builtin_ia32_mfence, __builtin_ia32_loaddqu, __builtin_ia32_storedqu, __builtin_ia32_monitor, __builtin_ia32_mwait, __builtin_ia32_lddqu, __builtin_ia32_movntdqa, __builtin_ia32_movntsd and __builtin_ia32_movntss as const builtins using def_builtin_const. Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c |