diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-08-24 12:22:30 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-08-24 12:22:30 +0000 |
commit | f76f114649542b7c5574d9b70c2ae01a02cacb86 (patch) | |
tree | 5d5cbeb299b634ce9805f895a2da83014de4c0a7 | |
parent | bc4e06dc35d99ed1e42c80b487367b1d90963be3 (diff) | |
download | gcc-f76f114649542b7c5574d9b70c2ae01a02cacb86.tar.gz |
2017-08-24 Richard Biener <rguenther@suse.de>
* config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
and ipa-fnsummary.h.
(ix86_can_inline_p): When ix86_fpmath flags do not match
check whether the callee uses FP math at all.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251330 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 12 |
2 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a475c840fa2..25149f3e5a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-08-24 Richard Biener <rguenther@suse.de> + + * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h + and ipa-fnsummary.h. + (ix86_can_inline_p): When ix86_fpmath flags do not match + check whether the callee uses FP math at all. + 2017-08-24 Aldy Hernandez <aldyh@redhat.com> PR middle-end/81931 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9f1f8e797e7..268946b9059 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -85,6 +85,9 @@ along with GCC; see the file COPYING3. If not see #include "print-rtl.h" #include "intl.h" #include "ifcvt.h" +#include "symbol-summary.h" +#include "ipa-prop.h" +#include "ipa-fnsummary.h" /* This file should be included last. */ #include "target-def.h" @@ -7544,7 +7547,14 @@ ix86_can_inline_p (tree caller, tree callee) else if (caller_opts->tune != callee_opts->tune) ret = false; - else if (caller_opts->x_ix86_fpmath != callee_opts->x_ix86_fpmath) + else if (caller_opts->x_ix86_fpmath != callee_opts->x_ix86_fpmath + /* If the calle doesn't use FP expressions differences in + ix86_fpmath can be ignored. We are called from FEs + for multi-versioning call optimization, so beware of + ipa_fn_summaries not available. */ + && (! ipa_fn_summaries + || ipa_fn_summaries->get + (cgraph_node::get (callee))->fp_expressions)) ret = false; else if (caller_opts->branch_cost != callee_opts->branch_cost) |