GCC Middle and Back End API Reference
|
#include <int-vector-builder.h>
Public Member Functions | |
int_vector_builder () | |
int_vector_builder (poly_uint64, unsigned int, unsigned int) | |
void | new_vector (poly_uint64, unsigned int, unsigned int) |
poly_uint64 | full_nelts () const |
unsigned int | npatterns () const |
unsigned int | nelts_per_pattern () const |
unsigned int | encoded_nelts () const |
bool | encoded_full_vector_p () const |
T | elt (unsigned int) const |
unsigned int | count_dups (int, int, int) const |
bool | operator== (const int_vector_builder< T > &) const |
bool | operator!= (const int_vector_builder< T > &x) const |
bool | new_unary_operation (poly_uint64, T, bool) |
bool | new_binary_operation (poly_uint64, T, T, bool) |
void | finalize () |
vec< T, va_heap > | to_vec_legacy () |
Static Public Member Functions | |
static unsigned int | binary_encoded_nelts (T, T) |
Protected Member Functions | |
void | reshape (unsigned int, unsigned int) |
bool | repeating_sequence_p (unsigned int, unsigned int, unsigned int) |
bool | stepped_sequence_p (unsigned int, unsigned int, unsigned int) |
bool | try_npatterns (unsigned int) |
Private Types | |
typedef vector_builder< T, poly_uint64, int_vector_builder > | parent |
Private Member Functions | |
bool | equal_p (T, T) const |
bool | allow_steps_p () const |
bool | integral_p (T) const |
T | step (T, T) const |
T | apply_step (T, unsigned int, T) const |
bool | can_elide_p (T) const |
void | note_representative (T *, T) |
int_vector_builder< T > * | derived () |
const int_vector_builder< T > * | derived () const |
Static Private Member Functions | |
static poly_uint64 | shape_nelts (poly_uint64 x) |
Private Attributes | |
poly_uint64 | m_full_nelts |
unsigned int | m_npatterns |
unsigned int | m_nelts_per_pattern |
vec< T, va_heap, vl_embed > | m_auto |
unsigned char | m_data [sizeof(T) *N] |
Friends | |
class | vector_builder< T, poly_uint64, int_vector_builder > |
A class for building vector integer constants. Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
This class is used to build vectors of integer type T using the same encoding as tree and rtx constants. See vector_builder for more details.
|
private |
|
inline |
|
inline |
Create a new builder for a vector with FULL_NELTS elements. Initially encode the value as NPATTERNS interleaved patterns with NELTS_PER_PATTERN elements each.
References vector_builder< T, Shape, Derived >::full_nelts(), vector_builder< T, Shape, Derived >::nelts_per_pattern(), vector_builder< T, Shape, Derived >::new_vector(), and vector_builder< T, Shape, Derived >::npatterns().
|
inlineprivate |
|
inlineprivate |
Return a vector element with the value BASE + FACTOR * STEP.
|
staticinherited |
Return the number of elements that the caller needs to operate on in order to handle a binary operation on vector constants VEC1 and VEC2. This static function is used instead of new_binary_operation if the result of the operation is not a constant vector.
|
inlineprivate |
|
inherited |
Return the number of leading duplicate elements in the range [START:END:STEP]. The value is always at least 1.
|
inlineprivateinherited |
|
inlineprivateinherited |
|
inherited |
Return the value of vector element I, which might or might not be encoded explicitly.
|
inlineinherited |
Return true if every element of the vector is explicitly encoded.
|
inlineinherited |
Return the number of elements that are explicitly encoded. The vec starts with these explicitly-encoded elements and may contain additional elided elements.
Return true if elements ELT1 and ELT2 are equal.
References known_eq.
|
inherited |
Replace the current encoding with the canonical form.
|
inlineinherited |
|
inlineprivate |
|
inlineinherited |
|
inherited |
Try to start building a new vector of shape SHAPE that holds the result of a binary operation on vector constants VEC1 and VEC2. ALLOW_STEPPED_P is true if the operation can handle stepped encodings directly, without having to expand the full sequence. Return true if the operation is possible. Leave the builder unchanged otherwise.
|
inherited |
Try to start building a new vector of shape SHAPE that holds the result of a unary operation on vector constant VEC. ALLOW_STEPPED_P is true if the operation can handle stepped encodings directly, without having to expand the full sequence. Return true if the operation is possible, which it always is when ALLOW_STEPPED_P is true. Leave the builder unchanged otherwise.
void vector_builder< T, Shape, Derived >::new_vector | ( | poly_uint64 | full_nelts, |
unsigned int | npatterns, | ||
unsigned int | nelts_per_pattern ) |
Start building a vector that has FULL_NELTS elements. Initially encode it using NPATTERNS patterns with NELTS_PER_PATTERN each.
Referenced by calc_vec_perm_mask_for_shift(), expand_mult_highpart(), expand_rotate_as_vec_perm(), vec_perm_indices::new_expanded_vector(), vec_perm_indices::new_shrunk_vector(), vec_perm_indices::new_vector(), and tree_to_vec_perm_builder().
|
inlineprivate |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Return true if this vector and OTHER have the same elements and are encoded in the same way.
|
protectedinherited |
Return true if elements [START, END) contain a repeating sequence of STEP elements.
|
protectedinherited |
Change the encoding to NPATTERNS patterns of NELTS_PER_PATTERN each, but without changing the underlying vector.
|
inlinestaticprivate |
Return the value of element ELT2 minus the value of element ELT1.
|
protectedinherited |
Return true if elements [START, END) contain STEP interleaved linear series.
|
protectedinherited |
Try to change the number of encoded patterns to NPATTERNS, returning true on success.
|
friend |
|
privateinherited |
|
privateinherited |
|
privateinherited |