summaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-20 08:01:52 +0000
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-20 08:01:52 +0000
commitcda974e62c1c343aa221d752553e1a2cf057c83d (patch)
treeab49df80b9e730bae5afc85dbfaed38b34cc8701 /gcc/final.c
parenta9909cdd1e592aa802bd2226ceb13ecb495353fb (diff)
downloadgcc-cda974e62c1c343aa221d752553e1a2cf057c83d.tar.gz
Don't save function_used_regs if it contains all call_used_regs
2014-06-20 Tom de Vries <tom@codesourcery.com> * final.c (collect_fn_hard_reg_usage): Don't save function_used_regs if it contains all call_used_regs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211840 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c
index e39930d4207..e67e84b8a2e 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -4795,6 +4795,11 @@ collect_fn_hard_reg_usage (void)
SET_HARD_REG_BIT (function_used_regs, i);
#endif
+ /* The information we have gathered is only interesting if it exposes a
+ register from the call_used_regs that is not used in this function. */
+ if (hard_reg_set_subset_p (call_used_reg_set, function_used_regs))
+ return;
+
node = cgraph_rtl_info (current_function_decl);
gcc_assert (node != NULL);