diff options
author | Richard Biener <rguenther@suse.de> | 2021-11-03 15:01:44 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-11-04 10:15:36 +0100 |
commit | fa62db42b99e9eb1c067d2171bc437b3394e4d5d (patch) | |
tree | 9238392768cfb1737bd6c68c086396043a42d3cc /gcc/tree-ssa-pre.c | |
parent | f75e56f46d45cfb2fc9bc80ffc627ccfb41ffca6 (diff) | |
download | gcc-fa62db42b99e9eb1c067d2171bc437b3394e4d5d.zip gcc-fa62db42b99e9eb1c067d2171bc437b3394e4d5d.tar.gz gcc-fa62db42b99e9eb1c067d2171bc437b3394e4d5d.tar.bz2 |
VN/PRE TLC
This removes an always true parameter of vn_nary_op_insert_into and moves
valueization to the two callers of vn_nary_op_compute_hash instead of doing it
therein where this function name does not suggest such thing.
Also remove extra valueization from PRE phi-translation.
2021-11-03 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_nary_op_insert_into): Remove always
true parameter and inline valueization.
(vn_nary_op_lookup_1): Inline valueization from ...
(vn_nary_op_compute_hash): ... here and remove it here.
* tree-ssa-pre.c (phi_translate_1): Do not valueize
before vn_nary_lookup_pieces.
(get_representative_for): Mark created SSA representatives
as visited.
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index dc55d86..0669aaa 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -1391,6 +1391,7 @@ get_representative_for (const pre_expr e, basic_block b = NULL) vn_ssa_aux_t vn_info = VN_INFO (name); vn_info->value_id = value_id; vn_info->valnum = valnum ? valnum : name; + vn_info->visited = true; /* ??? For now mark this SSA name for release by VN. */ vn_info->needs_insertion = true; add_to_value (value_id, get_or_alloc_expr_for_name (name)); @@ -1508,10 +1509,6 @@ phi_translate_1 (bitmap_set_t dest, return constant; } - /* vn_nary_* do not valueize operands. */ - for (i = 0; i < newnary->length; ++i) - if (TREE_CODE (newnary->op[i]) == SSA_NAME) - newnary->op[i] = VN_INFO (newnary->op[i])->valnum; tree result = vn_nary_op_lookup_pieces (newnary->length, newnary->opcode, newnary->type, |