This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Bound partial-inlining-entry-probability param (PR ipa/80663).


Hello.

Having value of parameter partial-inlining-entry-probability bigger than 100 does not
make sense and can be just used to artificially trigger partial inlining.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Martin
>From 4f849447030daa05f64a095d14d56a4df0583573 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Wed, 17 May 2017 13:23:54 +0200
Subject: [PATCH] Bound partial-inlining-entry-probability param (PR
 ipa/80663).

gcc/ChangeLog:

2017-05-17  Martin Liska  <mliska@suse.cz>

	PR ipa/80663
	* params.def: Bound partial-inlining-entry-probability param.

gcc/testsuite/ChangeLog:

2017-05-19  Martin Liska  <mliska@suse.cz>

	* g++.dg/ipa/pr80212.C: Remove the test as it does not longer
	split at the problematic spot.
	* gcc.dg/ipa/pr48195.c: Change 101 to 100 as 101 is no longer
	a valid value of the param.
---
 gcc/params.def                     |  2 +-
 gcc/testsuite/g++.dg/ipa/pr80212.C | 18 ------------------
 gcc/testsuite/gcc.dg/ipa/pr48195.c |  2 +-
 3 files changed, 2 insertions(+), 20 deletions(-)
 delete mode 100644 gcc/testsuite/g++.dg/ipa/pr80212.C

diff --git a/gcc/params.def b/gcc/params.def
index 1b058e49860..6b07518a34b 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -126,7 +126,7 @@ DEFPARAM (PARAM_COMDAT_SHARING_PROBABILITY,
 DEFPARAM (PARAM_PARTIAL_INLINING_ENTRY_PROBABILITY,
 	  "partial-inlining-entry-probability",
 	  "Maximum probability of the entry BB of split region (in percent relative to entry BB of the function) to make partial inlining happen.",
-	  70, 0, 0)
+	  70, 0, 100)
 
 /* Limit the number of expansions created by the variable expansion
    optimization to avoid register pressure.  */
diff --git a/gcc/testsuite/g++.dg/ipa/pr80212.C b/gcc/testsuite/g++.dg/ipa/pr80212.C
deleted file mode 100644
index 60d3b613035..00000000000
--- a/gcc/testsuite/g++.dg/ipa/pr80212.C
+++ /dev/null
@@ -1,18 +0,0 @@
-// PR ipa/80212
-// { dg-options "-O2 --param partial-inlining-entry-probability=403796683 -fno-early-inlining" }
-
-struct b
-{
-  virtual b *c () const;
-};
-struct d : virtual b
-{
-};
-struct e : d
-{
-  e *
-  c () const
-  {
-  }
-};
-main () { e a; }
diff --git a/gcc/testsuite/gcc.dg/ipa/pr48195.c b/gcc/testsuite/gcc.dg/ipa/pr48195.c
index 2e38452d598..25e80bab8f8 100644
--- a/gcc/testsuite/gcc.dg/ipa/pr48195.c
+++ b/gcc/testsuite/gcc.dg/ipa/pr48195.c
@@ -1,5 +1,5 @@
 /* { dg-do link } */
-/* { dg-options "-O2 -flto --param partial-inlining-entry-probability=101" } */
+/* { dg-options "-O2 -flto --param partial-inlining-entry-probability=100" } */
 /* { dg-require-effective-target lto } */
 
 extern void abort(void);
-- 
2.12.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]