Add IntegerRange for -mprioritize-restricted-insns=.

Message ID ba76801d-7b74-aa59-7cef-426dbf62219b@suse.cz
State New
Headers show
Series
  • Add IntegerRange for -mprioritize-restricted-insns=.
Related show

Commit Message

Martin Liška April 10, 2018, 12:26 p.m.
Hi.

It's quite obvious documentation patch does:
./xgcc -B. --help=target  2>&1 | grep mpri
  -mprioritize-restricted-insns=<0,2> Specify scheduling priority for dispatch slot restricted insns.

gcc/ChangeLog:

2018-04-10  Martin Liska  <mliska@suse.cz>

	* config/powerpcspe/powerpcspe.opt: Add IntegerRange.
	* config/rs6000/rs6000.opt: Likewise.
---
 gcc/config/powerpcspe/powerpcspe.opt | 2 +-
 gcc/config/rs6000/rs6000.opt         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Segher Boessenkool April 10, 2018, 3:06 p.m. | #1
Hi!

On Tue, Apr 10, 2018 at 02:26:32PM +0200, Martin Liška wrote:
> It's quite obvious documentation patch does:
> ./xgcc -B. --help=target  2>&1 | grep mpri
>   -mprioritize-restricted-insns=<0,2> Specify scheduling priority for dispatch slot restricted insns.

Showing this as a range is misleading, it's really more like an enum
(but not implemented that way).  And 1 is _higher_ priority than 2.


Segher
Martin Liška April 10, 2018, 3:14 p.m. | #2
On 04/10/2018 05:06 PM, Segher Boessenkool wrote:
> Hi!
> 
> On Tue, Apr 10, 2018 at 02:26:32PM +0200, Martin Liška wrote:
>> It's quite obvious documentation patch does:
>> ./xgcc -B. --help=target  2>&1 | grep mpri
>>   -mprioritize-restricted-insns=<0,2> Specify scheduling priority for dispatch slot restricted insns.
> 
> Showing this as a range is misleading, it's really more like an enum
> (but not implemented that way).  And 1 is _higher_ priority than 2.

Ok, understood.

Martin

> 
> 
> Segher
>

Patch

diff --git a/gcc/config/powerpcspe/powerpcspe.opt b/gcc/config/powerpcspe/powerpcspe.opt
index 79c55bfbf26..1da135e550e 100644
--- a/gcc/config/powerpcspe/powerpcspe.opt
+++ b/gcc/config/powerpcspe/powerpcspe.opt
@@ -504,7 +504,7 @@  EnumValue
 Enum(rs6000_alignment_flags) String(natural) Value(MASK_ALIGN_NATURAL)
 
 mprioritize-restricted-insns=
-Target RejectNegative Joined UInteger Var(rs6000_sched_restricted_insns_priority) Save
+Target RejectNegative Joined UInteger Var(rs6000_sched_restricted_insns_priority) Save IntegerRange(0, 2)
 Specify scheduling priority for dispatch slot restricted insns.
 
 msingle-float
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 2ce19cefa8f..69433f5a5c3 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -464,7 +464,7 @@  EnumValue
 Enum(rs6000_alignment_flags) String(natural) Value(MASK_ALIGN_NATURAL)
 
 mprioritize-restricted-insns=
-Target RejectNegative Joined UInteger Var(rs6000_sched_restricted_insns_priority) Save
+Target RejectNegative Joined UInteger Var(rs6000_sched_restricted_insns_priority) Save IntegerRange(0, 2)
 Specify scheduling priority for dispatch slot restricted insns.
 
 msingle-float