diff options
author | Richard Biener <rguenther@suse.de> | 2021-10-04 10:57:45 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-10-04 16:52:50 +0200 |
commit | 55a3be2f5255d69e740d61b2c5aaba1ccbc643b8 (patch) | |
tree | cfa0ab6b826ab7ef1d8368fd4bae6aefe420614e /gcc/tree-ssa-sccvn.h | |
parent | 22d34a2a50651d01669b6fbcdb9677c18d2197c5 (diff) | |
download | gcc-55a3be2f5255d69e740d61b2c5aaba1ccbc643b8.zip gcc-55a3be2f5255d69e740d61b2c5aaba1ccbc643b8.tar.gz gcc-55a3be2f5255d69e740d61b2c5aaba1ccbc643b8.tar.bz2 |
tree-optimization/102570 - teach VN about internal functions
We're now using internal functions for a lot of stuff but there's
still missing VN support out of laziness. The following instantiates
support and adds testcases for FRE and PRE (hoisting).
2021-10-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/102570
* tree-ssa-sccvn.h (vn_reference_op_struct): Document
we are using clique for the internal function code.
* tree-ssa-sccvn.c (vn_reference_op_eq): Compare the
internal function code.
(print_vn_reference_ops): Print the internal function code.
(vn_reference_op_compute_hash): Hash it.
(copy_reference_ops_from_call): Record it.
(visit_stmt): Remove the restriction around internal function
calls.
(fully_constant_vn_reference_p): Use fold_const_call and handle
internal functions.
(vn_reference_eq): Compare call return types.
* tree-ssa-pre.c (create_expression_by_pieces): Handle
generating calls to internal functions.
(compute_avail): Remove the restriction around internal function
calls.
* gcc.dg/tree-ssa/ssa-fre-96.c: New testcase.
* gcc.dg/tree-ssa/ssa-pre-33.c: Likewise.
Diffstat (limited to 'gcc/tree-ssa-sccvn.h')
-rw-r--r-- | gcc/tree-ssa-sccvn.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-sccvn.h b/gcc/tree-ssa-sccvn.h index 9610059..8a1b649 100644 --- a/gcc/tree-ssa-sccvn.h +++ b/gcc/tree-ssa-sccvn.h @@ -106,7 +106,8 @@ typedef const struct vn_phi_s *const_vn_phi_t; typedef struct vn_reference_op_struct { ENUM_BITFIELD(tree_code) opcode : 16; - /* Dependence info, used for [TARGET_]MEM_REF only. */ + /* Dependence info, used for [TARGET_]MEM_REF only. For internal + function calls clique is also used for the internal function code. */ unsigned short clique; unsigned short base; unsigned reverse : 1; |