diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-02-16 12:21:31 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-02-16 12:21:31 -0800 |
commit | b43d6db9780462273c4d885a0111e3376c114c61 (patch) | |
tree | 0dff7e34fe65a75ba82e4a13d69991fdaea7c5eb /gcc/tree-vectorizer.h | |
parent | 9419b14e109a2807361a9f695f5767f03dfa0cae (diff) | |
parent | 24ca97325cab7bc454c785d55f37120fe7ea6f74 (diff) | |
download | gcc-b43d6db9780462273c4d885a0111e3376c114c61.zip gcc-b43d6db9780462273c4d885a0111e3376c114c61.tar.gz gcc-b43d6db9780462273c4d885a0111e3376c114c61.tar.bz2 |
Merge from trunk revision 24ca97325cab7bc454c785d55f37120fe7ea6f74.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index ec479d3..ddd0637 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -113,6 +113,41 @@ typedef hash_map<tree_operand_hash, std::pair<stmt_vec_info, innermost_loop_behavior *> > vec_base_alignments; +/* Represents elements [START, START + LENGTH) of cyclical array OPS* + (i.e. OPS repeated to give at least START + LENGTH elements) */ +struct vect_scalar_ops_slice +{ + tree op (unsigned int i) const; + bool all_same_p () const; + + vec<tree> *ops; + unsigned int start; + unsigned int length; +}; + +/* Return element I of the slice. */ +inline tree +vect_scalar_ops_slice::op (unsigned int i) const +{ + return (*ops)[(i + start) % ops->length ()]; +} + +/* Hash traits for vect_scalar_ops_slice. */ +struct vect_scalar_ops_slice_hash : typed_noop_remove<vect_scalar_ops_slice> +{ + typedef vect_scalar_ops_slice value_type; + typedef vect_scalar_ops_slice compare_type; + + static const bool empty_zero_p = true; + + static void mark_deleted (value_type &s) { s.length = ~0U; } + static void mark_empty (value_type &s) { s.length = 0; } + static bool is_deleted (const value_type &s) { return s.length == ~0U; } + static bool is_empty (const value_type &s) { return s.length == 0; } + static hashval_t hash (const value_type &); + static bool equal (const value_type &, const compare_type &); +}; + /************************************************************************ SLP ************************************************************************/ |