diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-16 15:26:35 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-09-25 14:26:02 -0700 |
commit | 1541140124035332398333a8f169791059a7c366 (patch) | |
tree | f6765cbdf226a9fbf304f231fc4101b4afd62aee /gcc/ira.h | |
parent | 44f9e0b8eda2a1820c2e45efcf676047335f1c59 (diff) | |
download | gcc-1541140124035332398333a8f169791059a7c366.tar.gz |
More fix for PR rtl-optimization/66626
* ira.h: Include "function.h".
2015-07-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/66626
* ira.h (emit-rtl.h): Include.
(non_spilled_static_chain_regno_p): New.
* ira-color.c (setup_profitable_hard_regs): Clear profitable regs
unless it is non spilled static chain pseudo.
(assign_hard_rego): Spill memory profitable allocno unless it is
non spilled static chain pseudo.
(allocno_spill_priority_compare): Put non spilled static chain
pseudo at the end of sorted array.
(improve_allocation): Do nothing if we have static chain and
non-local goto.
(allocno__priority_compare_func): Put non spilled static chain
pseudo at the beginning of sorted array.
(move_spill_restore): Ignore non spilled static chain pseudo.
* ira-costs.c (find_costs_and_classes): Don't assign class NO_REGS
to non spilled static chain pseudo.
* lra-assigns.c (pseudo_compare_func): Put non spilled static chain
pseudo at the beginning of sorted array.
(spill_for): Spill non spilled static chain pseudo last.
* lra-constraints.c (lra_constraints): Remove static chain pseudo
check for equivalence.
2015-07-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/66626
* gcc.target/i386/pr66626-2.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225891 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira.h')
-rw-r--r-- | gcc/ira.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ira.h b/gcc/ira.h index 19797809292..cdd26a7cf65 100644 --- a/gcc/ira.h +++ b/gcc/ira.h @@ -22,6 +22,9 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_IRA_H #define GCC_IRA_H +#include "function.h" +#include "emit-rtl.h" + /* True when we use LRA instead of reload pass for the current function. */ extern bool ira_use_lra_p; @@ -209,4 +212,15 @@ extern void ira_adjust_equiv_reg_cost (unsigned, int); /* ira-costs.c */ extern void ira_costs_c_finalize (void); +/* Spilling static chain pseudo may result in generation of wrong + non-local goto code using frame-pointer to address saved stack + pointer value after restoring old frame pointer value. The + function returns TRUE if REGNO is such a static chain pseudo. */ +static inline bool +non_spilled_static_chain_regno_p (int regno) +{ + return (cfun->static_chain_decl && crtl->has_nonlocal_goto + && REG_EXPR (regno_reg_rtx[regno]) == cfun->static_chain_decl); +} + #endif /* GCC_IRA_H */ |