diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2022-10-14 14:31:02 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2022-10-17 09:13:55 -0400 |
commit | fca529517484bf19098ca9efa77e95534086abdc (patch) | |
tree | adf25f82f749101c6b449e6fdd0480a325608a78 /gcc/value-relation.h | |
parent | 612de72b0d2904b5a5a2b487ce4cb907c768a947 (diff) | |
download | gcc-fca529517484bf19098ca9efa77e95534086abdc.zip gcc-fca529517484bf19098ca9efa77e95534086abdc.tar.gz gcc-fca529517484bf19098ca9efa77e95534086abdc.tar.bz2 |
Don't set useless relations.
The oracle will not register nonssense/useless relations, class
value_relation shouldn't either.
* value-relation.cc (value_relation::dump): Change message.
* value-relation.h (value_relation::set_relation): If op1 is the
same as op2 do not create a relation.
Diffstat (limited to 'gcc/value-relation.h')
-rw-r--r-- | gcc/value-relation.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/value-relation.h b/gcc/value-relation.h index a3bbe1e..fa9097a 100644 --- a/gcc/value-relation.h +++ b/gcc/value-relation.h @@ -349,6 +349,13 @@ value_relation::set_relation (relation_kind r, tree n1, tree n2) { gcc_checking_assert (TREE_CODE (n1) == SSA_NAME && TREE_CODE (n2) == SSA_NAME); + if (n1 == n2) + { + related = VREL_VARYING; + name1 = NULL_TREE; + name2 = NULL_TREE; + return; + } related = r; name1 = n1; name2 = n2; |