aboutsummaryrefslogtreecommitdiff
path: root/gcc/params.opt
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-12-28 09:11:40 +0100
committerMartin Liska <mliska@suse.cz>2023-01-11 13:06:28 +0100
commit8221efae233e2d5992a79600071dd0a52f1b3c74 (patch)
tree7632985ef19c9920b01087b347956e9c81d896f8 /gcc/params.opt
parent7c9f20fcfdc2d8453df88ceb7e693debfcd678c0 (diff)
downloadgcc-8221efae233e2d5992a79600071dd0a52f1b3c74.zip
gcc-8221efae233e2d5992a79600071dd0a52f1b3c74.tar.gz
gcc-8221efae233e2d5992a79600071dd0a52f1b3c74.tar.bz2
switch expansion: limit JT growth param values
Currently, one can request a huge jump table creation which leads to a non-sensual huge output. Moreover, use auto_vec rather than a stack-allocated array. PR middle-end/107976 gcc/ChangeLog: * params.opt: Limit JT params. * stmt.cc (emit_case_dispatch_table): Use auto_vec.
Diffstat (limited to 'gcc/params.opt')
-rw-r--r--gcc/params.opt4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/params.opt b/gcc/params.opt
index 9291312..8a128c3 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -323,11 +323,11 @@ Common Joined UInteger Var(param_iv_max_considered_uses) Init(250) Param Optimiz
Bound on number of iv uses in loop optimized in iv optimizations.
-param=jump-table-max-growth-ratio-for-size=
-Common Joined UInteger Var(param_jump_table_max_growth_ratio_for_size) Init(300) Param Optimization
+Common Joined UInteger Var(param_jump_table_max_growth_ratio_for_size) Init(300) IntegerRange(0, 10000) Param Optimization
The maximum code size growth ratio when expanding into a jump table (in percent). The parameter is used when optimizing for size.
-param=jump-table-max-growth-ratio-for-speed=
-Common Joined UInteger Var(param_jump_table_max_growth_ratio_for_speed) Init(800) Param Optimization
+Common Joined UInteger Var(param_jump_table_max_growth_ratio_for_speed) Init(800) IntegerRange(0, 10000) Param Optimization
The maximum code size growth ratio when expanding into a jump table (in percent). The parameter is used when optimizing for speed.
-param=l1-cache-line-size=