diff mbox

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

Message ID 2f282165-32ab-ceb6-d9d8-50d7e8832745@suse.cz
State New
Headers show

Commit Message

Martin Liška May 25, 2017, 10 a.m. UTC
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

Comments

Richard Biener May 26, 2017, 8:54 a.m. UTC | #1
On Thu, May 25, 2017 at 12:00 PM, Martin Liška <mliska@suse.cz> wrote:
> 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?

Ok.

> Martin
Martin Liška July 27, 2017, 10:22 a.m. UTC | #2
On 05/26/2017 10:54 AM, Richard Biener wrote:
> On Thu, May 25, 2017 at 12:00 PM, Martin Liška <mliska@suse.cz> wrote:
>> 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?
> 
> Ok.

Hello.

In order to fix PR81576, may I install the same patch to active branches?

Thanks,
Martin

> 
>> Martin
Jan Hubicka July 27, 2017, 11:45 a.m. UTC | #3
> On 05/26/2017 10:54 AM, Richard Biener wrote:
> > On Thu, May 25, 2017 at 12:00 PM, Martin Liška <mliska@suse.cz> wrote:
> >> 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?
> > 
> > Ok.
> 
> Hello.
> 
> In order to fix PR81576, may I install the same patch to active branches?

OK,
Honza
> 
> Thanks,
> Martin
> 
> > 
> >> Martin
diff mbox

Patch

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