[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
This commit is contained in:
parent
ca9dc64220
commit
d160ae7814
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,3 +1,9 @@
|
||||
2018-04-26 Richard Biener <rguenther@suse.de>
|
||||
Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR lto/85422
|
||||
* testsuite/libgomp.oacc-c-c++-common/pr85422.c: New test.
|
||||
|
||||
2018-04-26 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR target/85519
|
||||
|
13
libgomp/testsuite/libgomp.oacc-c-c++-common/pr85422.c
Normal file
13
libgomp/testsuite/libgomp.oacc-c-c++-common/pr85422.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* { dg-do link } */
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
#pragma acc parallel
|
||||
#pragma acc loop
|
||||
for (int i = 1; i < 10; i++)
|
||||
for (;;)
|
||||
;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user