This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp4, 6/23] Don't unnecessarily call eliminate_regs
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 Dec 2013 15:57:27 +0100
- Subject: [gomp4, 6/23] Don't unnecessarily call eliminate_regs
- Authentication-results: sourceware.org; auth=none
- References: <52A5D8D4 dot 2030803 at codesourcery dot com>
It turns out that we're calling eliminate_regs for global variables which
can't possibly have eliminable regs in their decl. At that point,
reg_eliminate can be NULL. This patch avoids unnecessary work, and
allows us to add an assert to eliminate_regs later.
gcc/
* dbxout.c (dbxout_symbol): Don't call eliminate_regs on TREE_STATIC
decls.
------------------------------------------------------------------------
Index: gcc/dbxout.c
===================================================================
--- gcc/dbxout.c (revision 422348)
+++ gcc/dbxout.c (revision 422349)
@@ -2943,7 +2943,8 @@ dbxout_symbol (tree decl, int local ATTR
if (!decl_rtl)
DBXOUT_DECR_NESTING_AND_RETURN (0);
- decl_rtl = eliminate_regs (decl_rtl, VOIDmode, NULL_RTX);
+ if (!TREE_STATIC (decl))
+ decl_rtl = eliminate_regs (decl_rtl, VOIDmode, NULL_RTX);
#ifdef LEAF_REG_REMAP
if (crtl->uses_only_leaf_regs)
leaf_renumber_regs_insn (decl_rtl);