diff mbox

[gomp4] Merge trunk r206958 (was: gomp-4_0-branch)

Message ID 20140203095648.GA55784@msticlxl7.ims.intel.com
State New
Headers show

Commit Message

Ilya Tocar Feb. 3, 2014, 9:56 a.m. UTC
> In r207132, I have now committed a merge of trunk r206958 (2014-01-23).
> Compared to a pristine trunk r206958 build, there is one regression:
> 
>     FAIL: g++.dg/gomp/declare-simd-1.C -std=c++98 (internal compiler error)
>     FAIL: g++.dg/gomp/declare-simd-1.C -std=c++11 (internal compiler error)
> 
>     [...]/build/gcc/testsuite/g++/../../xg++ -B[...]/build/gcc/testsuite/g++/../../ [...]/source/gcc/testsuite/g++.dg/gomp/declare-simd-1.C -fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++ -I[...]/build/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I[...]/build/x86_64-unknown-linux-gnu/libstdc++-v3/include -I[...]/source/libstdc++-v3/libsupc++ -I[...]/source/libstdc++-v3/include/backward -I[...]/source/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++98 -fopenmp -S -o declare-simd-1.s
>     [...]/source/gcc/testsuite/g++.dg/gomp/declare-simd-1.C:243:1: internal compiler error: in estimate_function_body_sizes, at ipa-inline-analysis.c:2403
>     0xa19664 estimate_function_body_sizes
>             ../../source/gcc/ipa-inline-analysis.c:2403
>     0xa19ef1 compute_inline_parameters(cgraph_node*, bool)
>             ../../source/gcc/ipa-inline-analysis.c:2797
>     0xa1a200 inline_analyze_function
>             ../../source/gcc/ipa-inline-analysis.c:3790
>     0x865a10 cgraph_call_function_insertion_hooks(cgraph_node*)
>             ../../source/gcc/cgraph.c:405
>     0xacc652 simd_clone_create
>             ../../source/gcc/omp-low.c:11600
>     0xacc652 expand_simd_clones
>             ../../source/gcc/omp-low.c:12370
>     0xacc652 ipa_omp_simd_clone
>             ../../source/gcc/omp-low.c:12410
>     0xacc652 execute
>             ../../source/gcc/omp-low.c:12443
> 
> In my understanding, the only gomp-4_0-branch-specific change that is a
> candidate to cause this is r205214 (Ilya Tocar, commited by Kirill
> Yukhin) for "LTO" streaming.  As I couldn't easily tell what's wrong (all
> changes from r205214 are still present; there were no obvious conflicts),
> could you guys please have a look at that one?
> 

Hi,
Sorry for the delay, i was busy with AVX512.
I finally had time to look into this bug.
The problem in r205214 was in adding add_new_function hook in
inline_generate_summary with -O0 -fopenmp and not removing it,
before running expand_simd_clones.
I've changed inline_free_summary to always remove hooks.
Patch bellow. It bootstraps, passes make check, fixes declare-simd-1.C.
Ok for gomp4 branch?

---
 gcc/ipa-inline-analysis.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Thomas Schwinge Feb. 3, 2014, 2:16 p.m. UTC | #1
Hi!

On Mon, 3 Feb 2014 13:56:48 +0400, Ilya Tocar <tocarip.intel@gmail.com> wrote:
> > In r207132, I have now committed a merge of trunk r206958 (2014-01-23).
> > Compared to a pristine trunk r206958 build, there is one regression:
> > 
> >     FAIL: g++.dg/gomp/declare-simd-1.C -std=c++98 (internal compiler error)
> >     FAIL: g++.dg/gomp/declare-simd-1.C -std=c++11 (internal compiler error)

> Sorry for the delay, i was busy with AVX512.

No problem.

> I finally had time to look into this bug.
> The problem in r205214 was in adding add_new_function hook in
> inline_generate_summary with -O0 -fopenmp and not removing it,
> before running expand_simd_clones.
> I've changed inline_free_summary to always remove hooks.
> Patch bellow. It bootstraps, passes make check, fixes declare-simd-1.C.
> Ok for gomp4 branch?

Thanks, and yes, please commit.


Grüße,
 Thomas
diff mbox

Patch

diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index d4abd90..440ae79 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -4143,11 +4143,6 @@  void
 inline_free_summary (void)
 {
   struct cgraph_node *node;
-  if (!inline_edge_summary_vec.exists ())
-    return;
-  FOR_EACH_DEFINED_FUNCTION (node)
-    if (!node->alias)
-      reset_inline_summary (node);
   if (function_insertion_hook_holder)
     cgraph_remove_function_insertion_hook (function_insertion_hook_holder);
   function_insertion_hook_holder = NULL;
@@ -4162,6 +4157,11 @@  inline_free_summary (void)
   node_duplication_hook_holder = NULL;
   if (edge_duplication_hook_holder)
     cgraph_remove_edge_duplication_hook (edge_duplication_hook_holder);
+  if (!inline_edge_summary_vec.exists ())
+    return;
+  FOR_EACH_DEFINED_FUNCTION (node)
+    if (!node->alias)
+      reset_inline_summary (node);
   edge_duplication_hook_holder = NULL;
   vec_free (inline_summary_vec);
   inline_edge_summary_vec.release ();