diff mbox

Change default of param not being smaller that min.

Message ID 84a233f9-50f6-2488-2c9f-f3eeb62c48a9@suse.cz
State New
Headers show

Commit Message

Martin Liška Feb. 17, 2017, 3:18 p.m. UTC
Hello.

We should not have a default value (different from -1) that is smaller than minimum.

Ready to be installed after tests?
Martin

Comments

Richard Biener Feb. 20, 2017, 9:41 a.m. UTC | #1
On Fri, Feb 17, 2017 at 4:18 PM, Martin Liška <mliska@suse.cz> wrote:
> Hello.
>
> We should not have a default value (different from -1) that is smaller than minimum.
>
> Ready to be installed after tests?

I think you should instead change the minimum value.

But OTOH I wonder why this is a --param at all...  Alex?  Why's this
not just a #define
inside emit-rtl.c?  In what circumstances is the user supposed to
alter this --param?

Richard.

> Martin
Alexandre Oliva Feb. 20, 2017, 11:03 p.m. UTC | #2
On Feb 20, 2017, Richard Biener <richard.guenther@gmail.com> wrote:

> On Fri, Feb 17, 2017 at 4:18 PM, Martin Liška <mliska@suse.cz> wrote:
>> Hello.
>> 
>> We should not have a default value (different from -1) that is smaller than minimum.
>> 
>> Ready to be installed after tests?

> I think you should instead change the minimum value.

> But OTOH I wonder why this is a --param at all...  Alex?  Why's this
> not just a #define
> inside emit-rtl.c?  In what circumstances is the user supposed to
> alter this --param?

It's convenient to debug -fcompare-debug errors.  You set the param to a
large number, and then non-debug insns will get the same uid in both
debug and non-debug compilations, so it's easier to compare RTL dumps
(using the attached gcc-diff-dump; I thought it was in contrib, but it's
not; should I put it there?) and locate the differences.
diff mbox

Patch

From 4ea71d245bda258ebaed22cb3661fff0265c7088 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 17 Feb 2017 16:00:30 +0100
Subject: [PATCH] Change default of param not being smaller that min.

gcc/ChangeLog:

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

	* params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 1.
---
 gcc/params.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/params.def b/gcc/params.def
index 023ca727648..66929beeb2a 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -965,7 +965,7 @@  DEFPARAM (PARAM_MAX_VARTRACK_REVERSE_OP_SIZE,
 DEFPARAM (PARAM_MIN_NONDEBUG_INSN_UID,
 	  "min-nondebug-insn-uid",
 	  "The minimum UID to be used for a nondebug insn.",
-	  0, 1, 0)
+	  1, 1, 0)
 
 DEFPARAM (PARAM_IPA_SRA_PTR_GROWTH_FACTOR,
 	  "ipa-sra-ptr-growth-factor",
-- 
2.11.0