diff options
author | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2016-12-09 16:46:42 +0000 |
---|---|---|
committer | Andre Vieira <avieira@gcc.gnu.org> | 2016-12-09 16:46:42 +0000 |
commit | d5a752ebc3c0105387c5298079ddc90043fcee2a (patch) | |
tree | 7a4c38b46db4e11a9e271ed95ebbb80ac6a2a445 /gcc/postreload.c | |
parent | d9e0fdff4fda08d9d2f60eff01e0c50dedf51ae9 (diff) |
PR78255: Make postreload aware of NO_FUNCTION_CSE
gcc/ChangeLog:
2016-12-09 Andre Vieira <andre.simoesdiasvieira@arm.com>
PR rtl-optimization/78255
* gcc/postreload.c (reload_cse_simplify): Do not CSE a function if
NO_FUNCTION_CSE is true.
gcc/testsuite/ChangeLog:
2016-12-09 Andre Vieira <andre.simoesdiasvieira@arm.com>
PR rtl-optimization/78255
* gcc.target/aarch64/pr78255.c: New.
* gcc.target/arm/pr78255-1.c: New.
* gcc.target/arm/pr78255-2.c: New.
From-SVN: r243494
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r-- | gcc/postreload.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c index 539ad33b6c3..8325d121c40 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -90,6 +90,11 @@ reload_cse_simplify (rtx_insn *insn, rtx testreg) basic_block insn_bb = BLOCK_FOR_INSN (insn); unsigned insn_bb_succs = EDGE_COUNT (insn_bb->succs); + /* If NO_FUNCTION_CSE has been set by the target, then we should not try + to cse function calls. */ + if (NO_FUNCTION_CSE && CALL_P (insn)) + return false; + if (GET_CODE (body) == SET) { int count = 0; |