* [vta,trunk?] don't discard source location for overriders of builtins
@ 2008-10-07 8:45 Alexandre Oliva
2009-06-01 8:11 ` [trunk<-vta] " Alexandre Oliva
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Oliva @ 2008-10-07 8:45 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
We're using the wrong test to decide whether to discard the source
location of a function decl as the initial location. We want to
discard it only for actual builtin, not for functions that override
builtins. The error in the current test was detected by
-fcompare-debug, compiling IIRC some overriders of builtins in
libgfortran.
Here's the patch I'm installing in the vta branch. Ok for the trunk?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vta-expand-non-builtin-location.patch --]
[-- Type: text/x-patch, Size: 787 bytes --]
for gcc/ChangeLog.vta
from Alexandre Oliva <aoliva@redhat.com>
* cfgexpand.c (gimple_expand_cfg): Discard the source location
only for builtins that are not overridden.
Index: gcc/cfgexpand.c
===================================================================
--- gcc/cfgexpand.c.orig 2008-09-20 05:52:59.000000000 -0300
+++ gcc/cfgexpand.c 2008-09-20 18:03:50.000000000 -0300
@@ -2986,7 +2986,7 @@ gimple_expand_cfg (void)
rtl_profile_for_bb (ENTRY_BLOCK_PTR);
insn_locators_alloc ();
- if (!DECL_BUILT_IN (current_function_decl))
+ if (!DECL_IS_BUILTIN (current_function_decl))
set_curr_insn_source_location (DECL_SOURCE_LOCATION (current_function_decl));
set_curr_insn_block (DECL_INITIAL (current_function_decl));
prologue_locator = curr_insn_locator ();
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member ¡Sé Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [trunk<-vta] Re: [vta,trunk?] don't discard source location for overriders of builtins
2008-10-07 8:45 [vta,trunk?] don't discard source location for overriders of builtins Alexandre Oliva
@ 2009-06-01 8:11 ` Alexandre Oliva
2009-06-01 16:42 ` Ian Lance Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Oliva @ 2009-06-01 8:11 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 487 bytes --]
On Oct 7, 2008, Alexandre Oliva <aoliva@redhat.com> wrote:
> We're using the wrong test to decide whether to discard the source
> location of a function decl as the initial location. We want to
> discard it only for actual builtin, not for functions that override
> builtins. The error in the current test was detected by
> -fcompare-debug, compiling IIRC some overriders of builtins in
> libgfortran.
> Here's the patch I'm installing in the vta branch. Ok for the trunk?
Ping?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vta-expand-non-builtin-location.patch --]
[-- Type: text/x-patch, Size: 737 bytes --]
for gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* cfgexpand.c (gimple_expand_cfg): Discard the source location
only for builtins that are not overridden.
Index: gcc/cfgexpand.c
===================================================================
--- gcc/cfgexpand.c.orig 2009-05-28 04:10:13.000000000 -0300
+++ gcc/cfgexpand.c 2009-05-28 04:10:18.000000000 -0300
@@ -2438,7 +2438,7 @@ gimple_expand_cfg (void)
rtl_profile_for_bb (ENTRY_BLOCK_PTR);
insn_locators_alloc ();
- if (!DECL_BUILT_IN (current_function_decl))
+ if (!DECL_IS_BUILTIN (current_function_decl))
{
/* Eventually, all FEs should explicitly set function_start_locus. */
if (cfun->function_start_locus == UNKNOWN_LOCATION)
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [trunk<-vta] Re: [vta,trunk?] don't discard source location for overriders of builtins
2009-06-01 8:11 ` [trunk<-vta] " Alexandre Oliva
@ 2009-06-01 16:42 ` Ian Lance Taylor
0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2009-06-01 16:42 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches
Alexandre Oliva <aoliva@redhat.com> writes:
>From Alexandre Oliva <aoliva@redhat.com>
>
> * cfgexpand.c (gimple_expand_cfg): Discard the source location
> only for builtins that are not overridden.
This is OK.
Thanks.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-01 16:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-07 8:45 [vta,trunk?] don't discard source location for overriders of builtins Alexandre Oliva
2009-06-01 8:11 ` [trunk<-vta] " Alexandre Oliva
2009-06-01 16:42 ` Ian Lance Taylor
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).