This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR 23551: why should we coalesce inlined variables?
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 May 2007 04:39:18 -0300
- Subject: PR 23551: why should we coalesce inlined variables?
We're discarding useful debug info by SSA-coalescing inlined
variables. The reason we refrain from coalescing non-inlined
variables is for better debug info. No other pass pays attention to
DECL_FROM_INLINE, and it doesn't look like we generate significantly
worse code if we refrain from coalescing these variables. So...
May I check this in if it passes bootstrap and regression testing on
x86_64-linux-gnu?
:ADDPATCH debug:
for gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
PR debug/23551
* tree-ssa-copyrename.c (copy_rename_partition_coalesce):
Disregard DECL_FROM_INLINE.
Index: gcc/tree-ssa-copyrename.c
===================================================================
--- gcc/tree-ssa-copyrename.c.orig 2007-03-08 07:25:36.000000000 -0300
+++ gcc/tree-ssa-copyrename.c 2007-05-10 03:22:19.000000000 -0300
@@ -191,20 +191,12 @@ copy_rename_partition_coalesce (var_map
ign1 = TREE_CODE (root1) == VAR_DECL && DECL_IGNORED_P (root1);
ign2 = TREE_CODE (root2) == VAR_DECL && DECL_IGNORED_P (root2);
- /* Never attempt to coalesce 2 user variables unless one is an inline
- variable. */
+ /* Never attempt to coalesce 2 user variables. */
if (!ign1 && !ign2)
{
- if (DECL_FROM_INLINE (root2))
- ign2 = true;
- else if (DECL_FROM_INLINE (root1))
- ign1 = true;
- else
- {
- if (debug)
- fprintf (debug, " : 2 different USER vars. No coalesce.\n");
- return false;
- }
+ if (debug)
+ fprintf (debug, " : 2 different USER vars. No coalesce.\n");
+ return false;
}
/* Don't coalesce if there are two different memory tags. */
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}