diff options
author | Richard Biener <rguenther@suse.de> | 2018-04-26 13:26:25 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2018-04-26 13:26:25 +0000 |
commit | d160ae7814db14b36fc7eacc5fc14b77604837a1 (patch) | |
tree | 6d18ef2621835308dfc87dfd49bb788963c0eb64 /gcc | |
parent | ca9dc642200c91e750e598ef675931dafe50abb5 (diff) | |
download | gcc-d160ae7814db14b36fc7eacc5fc14b77604837a1.zip gcc-d160ae7814db14b36fc7eacc5fc14b77604837a1.tar.gz gcc-d160ae7814db14b36fc7eacc5fc14b77604837a1.tar.bz2 |
[lto] Fixup loops before lto write-out
2018-04-26 Richard Biener <rguenther@suse.de>
Tom de Vries <tom@codesourcery.com>
PR lto/85422
* lto-streamer-out.c (output_function): Fixup loops if required to match
discovery done in the reader.
* testsuite/libgomp.oacc-c-c++-common/pr85422.c: New test.
Co-Authored-By: Tom de Vries <tom@codesourcery.com>
From-SVN: r259675
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/lto-streamer-out.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2fed948..61d92f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-04-26 Richard Biener <rguenther@suse.de> + Tom de Vries <tom@codesourcery.com> + + PR lto/85422 + * lto-streamer-out.c (output_function): Fixup loops if required to match + discovery done in the reader. + 2018-04-26 Richard Biener <rguenther@suse.de> PR tree-optimization/85116 diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 1d2ab97..70476dc 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -2120,6 +2120,9 @@ output_function (struct cgraph_node *node) debug info. */ if (gimple_has_body_p (function)) { + /* Fixup loops if required to match discovery done in the reader. */ + loop_optimizer_init (AVOID_CFG_MODIFICATIONS); + streamer_write_uhwi (ob, 1); output_struct_function_base (ob, fn); @@ -2177,6 +2180,7 @@ output_function (struct cgraph_node *node) output_cfg (ob, fn); + loop_optimizer_finalize (); pop_cfun (); } else |