diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2022-01-17 12:03:18 -0500 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2022-01-18 10:02:02 -0500 |
commit | 254ada46ae0f21bd6f40314214f969f368328e22 (patch) | |
tree | 45c2a9fd29aa47dda63f86debfd557c811ebe108 /gcc/params.opt | |
parent | c952126870c92cf293d59ffb1497e402eb8fc269 (diff) | |
download | gcc-254ada46ae0f21bd6f40314214f969f368328e22.zip gcc-254ada46ae0f21bd6f40314214f969f368328e22.tar.gz gcc-254ada46ae0f21bd6f40314214f969f368328e22.tar.bz2 |
Limit the number of relations registered per basic block.
In pathological cases, the number of transitive relations being added is
potentially quadratic. Lookups for relations in a block is linear in
nature, so simply limit the number of relations to some reasonable number.
PR tree-optimization/104038
* doc/invoke.texi (relation-block-limit): New.
* params.opt (relation-block-limit): New.
* value-relation.cc (dom_oracle::register_relation): Check for NULL
record before invoking transitive registery.
(dom_oracle::set_one_relation): Check limit before creating record.
(dom_oracle::register_transitives): Stop when no record created.
* value-relation.h (relation_chain_head::m_num_relations): New.
Diffstat (limited to 'gcc/params.opt')
-rw-r--r-- | gcc/params.opt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/params.opt b/gcc/params.opt index 665071f..b07663d 100644 --- a/gcc/params.opt +++ b/gcc/params.opt @@ -915,6 +915,10 @@ Common Joined UInteger Var(param_ranger_logical_depth) Init(6) IntegerRange(1, 9 Maximum depth of logical expression evaluation ranger will look through when evaluating outgoing edge ranges. +-param=relation-block-limit= +Common Joined UInteger Var(param_relation_block_limit) Init(200) IntegerRange(0, 9999) Param Optimization +Maximum number of relations the oracle will register in a basic block. + -param=rpo-vn-max-loop-depth= Common Joined UInteger Var(param_rpo_vn_max_loop_depth) Init(7) IntegerRange(2, 65536) Param Optimization Maximum depth of a loop nest to fully value-number optimistically. |