This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add tabulars for options with enum values.
- From: Martin Liška <mliska at suse dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 28 Feb 2017 14:13:35 +0100
- Subject: [PATCH] Add tabulars for options with enum values.
- Authentication-results: sourceware.org; auth=none
Hello.
We have various enum options that do not properly display options with --help=*:
Apart from that, some of them are not separated by tabular, but with a space.
Using the suggested patch, --help=common will get:
--- /tmp/before 2017-02-28 10:41:12.107024945 +0100
+++ /tmp/after 2017-02-28 10:41:32.615415978 +0100
@@ -193,7 +193,7 @@
-ffloat-store [disabled]
-fforce-addr
-fforward-propagate [disabled]
- -ffp-contract= fast
+ -ffp-contract=[off|on|fast] fast
-ffp-int-builtin-inexact [enabled]
-ffunction-cse [enabled]
-ffunction-sections [disabled]
@@ -242,10 +242,10 @@
-fipa-sra [disabled]
-fipa-struct-reorg
-fipa-vrp [disabled]
- -fira-algorithm= CB
+ -fira-algorithm=[CB|priority] CB
-fira-hoist-pressure [enabled]
-fira-loop-pressure [disabled]
- -fira-region= [default]
+ -fira-region=[one|all|mixed] [default]
-fira-share-save-slots [enabled]
-fira-share-spill-slots [enabled]
-fira-verbose=<number> 0x5
@@ -336,7 +336,7 @@
-fregmove
-frename-registers [enabled]
-freorder-blocks [disabled]
- -freorder-blocks-algorithm= simple
+ -freorder-blocks-algorithm=[simple|stc] simple
-freorder-blocks-and-partition [disabled]
-freorder-functions [disabled]
-freport-bug [disabled]
@@ -386,7 +386,7 @@
-fshrink-wrap-separate [enabled]
-fsignaling-nans [disabled]
-fsigned-zeros [enabled]
- -fsimd-cost-model= unlimited
+ -fsimd-cost-model=[unlimited|dynamic|cheap] unlimited
-fsingle-precision-constant [disabled]
-fsplit-ivs-in-unroller [enabled]
-fsplit-loops [disabled]
@@ -404,7 +404,7 @@
-fstack-protector-all [disabled]
-fstack-protector-explicit [disabled]
-fstack-protector-strong [disabled]
- -fstack-reuse= all
+ -fstack-reuse=[all|named_vars|none] all
-fstack-usage [disabled]
-fstdarg-opt [enabled]
-fstore-merging [disabled]
@@ -489,7 +489,7 @@
-fvar-tracking-uninit [disabled]
-fvariable-expansion-in-unroller [disabled]
-fvect-cost-model
- -fvect-cost-model= [default]
+ Specifies the cost model for vectorization. -fvect-cost-model=[unlimited|dynamic|cheap] [default]
-fverbose-asm [disabled]
-fversion
-fvisibility=[default|internal|hidden|protected] default
Ready to be installed after regression tests?
Thanks,
Martin
>From 13f710c2487fbd74d6b8a01dab7d33b9e0614727 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Sun, 26 Feb 2017 23:00:02 +0100
Subject: [PATCH 1/3] Add tabulars for options with enum values.
gcc/ChangeLog:
2017-02-28 Martin Liska <mliska@suse.cz>
* common.opt: Fix --help=option -Q for options which are of
an enum type.
gcc/c-family/ChangeLog:
2017-02-28 Martin Liska <mliska@suse.cz>
* c.opt: Fix --help=option -Q for options which are of
an enum type.
---
gcc/c-family/c.opt | 2 +-
gcc/common.opt | 13 +++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index a863471da7f..9b9aab44810 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -293,7 +293,7 @@ Warn about 'new' of type with extended alignment without -faligned-new.
Waligned-new=
C++ ObjC++ Var(warn_aligned_new) Enum(warn_aligned_new_level) Joined RejectNegative Warning LangEnabledBy(C++ ObjC++,Wall,1,0)
--Waligned-new=all Warn even if 'new' uses a class member allocation function.
+-Waligned-new=[none|global|all] Warn even if 'new' uses a class member allocation function.
Wall
C ObjC C++ ObjC++ Warning
diff --git a/gcc/common.opt b/gcc/common.opt
index e5ae364abd9..1a19847fe44 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1376,7 +1376,7 @@ Perform a forward propagation pass on RTL.
ffp-contract=
Common Joined RejectNegative Enum(fp_contract_mode) Var(flag_fp_contract_mode) Init(FP_CONTRACT_FAST) Optimization
--ffp-contract=[off|on|fast] Perform floating-point expression contraction.
+-ffp-contract=[off|on|fast] Perform floating-point expression contraction.
Enum
Name(fp_contract_mode) Type(enum fp_contract_mode) UnknownError(unknown floating point contraction style %qs)
@@ -1528,7 +1528,7 @@ Perform conversion of conditional jumps to conditional execution.
fstack-reuse=
Common Joined RejectNegative Enum(stack_reuse_level) Var(flag_stack_reuse) Init(SR_ALL) Optimization
--fstack-reuse=[all|named_vars|none] Set stack reuse level for local variables.
+-fstack-reuse=[all|named_vars|none] Set stack reuse level for local variables.
Enum
Name(stack_reuse_level) Type(enum stack_reuse_level) UnknownError(unknown Stack Reuse Level %qs)
@@ -1661,7 +1661,7 @@ Perform IPA Value Range Propagation.
fira-algorithm=
Common Joined RejectNegative Enum(ira_algorithm) Var(flag_ira_algorithm) Init(IRA_ALGORITHM_CB) Optimization
--fira-algorithm=[CB|priority] Set the used IRA algorithm.
+-fira-algorithm=[CB|priority] Set the used IRA algorithm.
Enum
Name(ira_algorithm) Type(enum ira_algorithm) UnknownError(unknown IRA algorithm %qs)
@@ -1674,7 +1674,7 @@ Enum(ira_algorithm) String(priority) Value(IRA_ALGORITHM_PRIORITY)
fira-region=
Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_AUTODETECT) Optimization
--fira-region=[one|all|mixed] Set regions for IRA.
+-fira-region=[one|all|mixed] Set regions for IRA.
Enum
Name(ira_region) Type(enum ira_region) UnknownError(unknown IRA region %qs)
@@ -2073,7 +2073,7 @@ Reorder basic blocks to improve code placement.
freorder-blocks-algorithm=
Common Joined RejectNegative Enum(reorder_blocks_algorithm) Var(flag_reorder_blocks_algorithm) Init(REORDER_BLOCKS_ALGORITHM_SIMPLE) Optimization
--freorder-blocks-algorithm=[simple|stc] Set the used basic block reordering algorithm.
+-freorder-blocks-algorithm=[simple|stc] Set the used basic block reordering algorithm.
Enum
Name(reorder_blocks_algorithm) Type(enum reorder_blocks_algorithm) UnknownError(unknown basic block reordering algorithm %qs)
@@ -2691,10 +2691,11 @@ Enable basic block vectorization (SLP) on trees.
fvect-cost-model=
Common Joined RejectNegative Enum(vect_cost_model) Var(flag_vect_cost_model) Init(VECT_COST_MODEL_DEFAULT) Optimization
Specifies the cost model for vectorization.
+-fvect-cost-model=[unlimited|dynamic|cheap] Specifies the cost model for vectorization.
fsimd-cost-model=
Common Joined RejectNegative Enum(vect_cost_model) Var(flag_simd_cost_model) Init(VECT_COST_MODEL_UNLIMITED) Optimization
-Specifies the vectorization cost model for code marked with a simd directive.
+-fsimd-cost-model=[unlimited|dynamic|cheap] Specifies the vectorization cost model for code marked with a simd directive.
Enum
Name(vect_cost_model) Type(enum vect_cost_model) UnknownError(unknown vectorizer cost model %qs)
--
2.11.1