sdbout.c (sdbout_symbol): Eliminate register only if decl isn't a global variable.
authorKai Tietz <ktietz@redhat.com>
Wed, 12 Nov 2014 20:04:50 +0000 (21:04 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Wed, 12 Nov 2014 20:04:50 +0000 (21:04 +0100)
2014-11-12  Kai Tietz  <ktietz@redhat.com>

        * sdbout.c (sdbout_symbol): Eliminate register only
        if decl isn't a global variable.

From-SVN: r217443

gcc/ChangeLog
gcc/sdbout.c

index 2eb6f3515d88a49f27f80137885e390288171d1e..8b98649f226426cada2fb823bfe34de3921b849b 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-12  Kai Tietz  <ktietz@redhat.com>
+
+       * sdbout.c (sdbout_symbol): Eliminate register only
+       if decl isn't a global variable.
+
 2014-11-12  Alan Lawrence  <alan.lawrence@arm.com>
 
        * config/aarch64/aarch64.c (aarch64_simd_lane_bounds): Display indices.
index 7b6f4573e05b6b036f7121f68182da841f0d3064..4cea780c6ebd401dfa27cc92f240d29d394b129e 100644 (file)
@@ -739,13 +739,16 @@ sdbout_symbol (tree decl, int local)
       if (!DECL_RTL_SET_P (decl))
        return;
 
-      SET_DECL_RTL (decl,
-                   eliminate_regs (DECL_RTL (decl), VOIDmode, NULL_RTX));
+      value = DECL_RTL (decl);
+
+      if (!is_global_var (decl))
+       value = eliminate_regs (value, VOIDmode, NULL_RTX);
+
+      SET_DECL_RTL (decl, value);
 #ifdef LEAF_REG_REMAP
       if (crtl->uses_only_leaf_regs)
-       leaf_renumber_regs_insn (DECL_RTL (decl));
+       leaf_renumber_regs_insn (value);
 #endif
-      value = DECL_RTL (decl);
 
       /* Don't mention a variable at all
         if it was completely optimized into nothingness.