Message ID | 5411A337.7000302@codesourcery.com |
---|---|
State | New |
Headers | show |
On Thu, Sep 11, 2014 at 3:27 PM, Bernd Schmidt wrote: > 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. > > Bootstrapped and tested on x86_64-linux, together with the other patches. > Ok? Why not use is_global_var()? Ciao! Steven
On 09/11/2014 05:58 PM, Steven Bosscher wrote: > On Thu, Sep 11, 2014 at 3:27 PM, Bernd Schmidt wrote: >> 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. >> >> Bootstrapped and tested on x86_64-linux, together with the other patches. >> Ok? > > Why not use is_global_var()? As discussed in a different subthread - that also works. Ok with that change? Bernd
On 10/29/14 17:48, Bernd Schmidt wrote: > On 09/11/2014 05:58 PM, Steven Bosscher wrote: >> On Thu, Sep 11, 2014 at 3:27 PM, Bernd Schmidt wrote: >>> 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. >>> >>> Bootstrapped and tested on x86_64-linux, together with the other >>> patches. >>> Ok? >> >> Why not use is_global_var()? > > As discussed in a different subthread - that also works. Ok with that > change? Yes, assuming the usual bootstrap & regression testing shows now issues. jeff
* dbxout.c (dbxout_symbol): Don't call eliminate_regs on TREE_STATIC decls. diff --git a/gcc/dbxout.c b/gcc/dbxout.c index d856bdd..ffef1f5 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2887,7 +2887,8 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED) 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);