passes.c (should_skip_pass_p): Do not skip cgraph-edge building.
authorRichard Biener <rguenther@suse.de>
Wed, 27 Feb 2019 13:24:40 +0000 (13:24 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 27 Feb 2019 13:24:40 +0000 (13:24 +0000)
2019-02-27  Richard Biener  <rguenther@suse.de>

* passes.c (should_skip_pass_p): Do not skip cgraph-edge
building.

* gcc.dg/gimplefe-36.c: New testcase.

From-SVN: r269252

gcc/ChangeLog
gcc/passes.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/gimplefe-36.c [new file with mode: 0644]

index 3fbf6a44d734c62452a439e7b5a60ca80ce3eec8..b164b601ddfc8fc66e26bd615b9ebbfdfa037629 100644 (file)
@@ -1,3 +1,8 @@
+2019-02-27  Richard Biener  <rguenther@suse.de>
+
+       * passes.c (should_skip_pass_p): Do not skip cgraph-edge
+       building.
+
 2019-02-27  Richard Biener  <rguenther@suse.de>
 
        PR debug/88878
index f838b586bff2bef6b075e7f7d59837bb3da00683..7602abd572ded9d16413b51bbb4f48aa074c1a86 100644 (file)
@@ -2363,6 +2363,10 @@ should_skip_pass_p (opt_pass *pass)
       && pass->properties_provided != 0)
     return false;
 
+  /* We need to (re-)build cgraph edges as needed.  */
+  if (strstr (pass->name, "build_cgraph_edges") != NULL)
+    return false;
+
   /* Don't skip df init; later RTL passes need it.  */
   if (strstr (pass->name, "dfinit") != NULL)
     return false;
index 2365a4f8736d2b129f7633303e46bec6a2196826..8b6ecef774dae4aa177332f189587fb870df8d93 100644 (file)
@@ -1,3 +1,7 @@
+2019-02-27  Richard Biener  <rguenther@suse.de>
+
+       * gcc.dg/gimplefe-36.c: New testcase.
+
 2019-02-27  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/89488
diff --git a/gcc/testsuite/gcc.dg/gimplefe-36.c b/gcc/testsuite/gcc.dg/gimplefe-36.c
new file mode 100644 (file)
index 0000000..1c59541
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fgimple" } */
+
+int foo (void);
+
+void __GIMPLE (startwith("fre1"))
+d ()
+{
+  int _1;
+
+bb_2:
+  _1 = foo ();
+  return;
+}