GCC Middle and Back End API Reference
opt_mode< T > Class Template Reference

#include <machmode.h>

Inheritance diagram for opt_mode< T >:

Public Types

enum  from_int { dummy = MAX_MACHINE_MODE }
 

Public Member Functions

ALWAYS_INLINE CONSTEXPR opt_mode ()
 
ALWAYS_INLINE CONSTEXPR opt_mode (const T &m)
 
template<typename U >
ALWAYS_INLINE CONSTEXPR opt_mode (const U &m)
 
ALWAYS_INLINE CONSTEXPR opt_mode (from_int m)
 
machine_mode else_void () const
 
machine_mode else_blk () const
 
machine_mode else_mode (machine_mode) const
 
T require () const
 
bool exists () const
 
template<typename U >
bool exists (U *) const
 
bool operator== (const T &m) const
 
bool operator!= (const T &m) const
 

Private Attributes

machine_mode m_mode
 

Detailed Description

template<typename T>
class opt_mode< T >
An optional T (i.e. a T or nothing), where T is some form of mode class.   

Member Enumeration Documentation

◆ from_int

template<typename T >
enum opt_mode::from_int
Enumerator
dummy 

Constructor & Destructor Documentation

◆ opt_mode() [1/4]

template<typename T >
ALWAYS_INLINE CONSTEXPR opt_mode< T >::opt_mode ( )
inline

◆ opt_mode() [2/4]

template<typename T >
ALWAYS_INLINE CONSTEXPR opt_mode< T >::opt_mode ( const T & m)
inline

◆ opt_mode() [3/4]

template<typename T >
template<typename U >
ALWAYS_INLINE CONSTEXPR opt_mode< T >::opt_mode ( const U & m)
inline

◆ opt_mode() [4/4]

template<typename T >
ALWAYS_INLINE CONSTEXPR opt_mode< T >::opt_mode ( from_int m)
inline

Member Function Documentation

◆ else_blk()

◆ else_mode()

template<typename T >
machine_mode opt_mode< T >::else_mode ( machine_mode fallback) const
inline
If the T exists, return its enum value, otherwise return FALLBACK.   

Referenced by opt_mode< T >::else_blk().

◆ else_void()

template<typename T >
ALWAYS_INLINE machine_mode opt_mode< T >::else_void ( ) const
If the object contains a T, return its enum value, otherwise return
E_VOIDmode.   

Referenced by as_a(), dyn_cast(), and is_a().

◆ exists() [1/2]

◆ exists() [2/2]

template<typename T >
template<typename U >
bool opt_mode< T >::exists ( U * mode) const
inline
Return true if the object contains a T, storing it in *MODE if so.   

References T.

◆ operator!=()

template<typename T >
bool opt_mode< T >::operator!= ( const T & m) const
inline

References opt_mode< T >::m_mode.

◆ operator==()

template<typename T >
bool opt_mode< T >::operator== ( const T & m) const
inline

References opt_mode< T >::m_mode.

◆ require()

template<typename T >
T opt_mode< T >::require ( ) const
inline
Assert that the object contains a T and return it.   

References gcc_checking_assert.

Referenced by alignment_for_piecewise_move(), assemble_integer(), combine_instructions(), convert_extracted_bit_field(), convert_float_to_wider_int(), convert_mode_scalar(), convert_wider_int_to_float(), copy_blkmode_from_reg(), copy_blkmode_to_reg(), cse_insn(), cselib_record_sets(), default_secondary_memory_needed_mode(), emit_block_cmp_via_loop(), emit_block_move_via_loop(), emit_block_move_via_pattern(), expand_builtin_atomic_clear(), expand_builtin_atomic_test_and_set(), expand_builtin_issignaling(), expand_builtin_powi(), expand_builtin_signbit(), expand_fix(), expand_float(), expand_ifn_atomic_compare_exchange(), expand_parity(), expand_vector_parallel(), extract_bit_field_using_extv(), extract_fixed_bit_field(), extract_fixed_bit_field_1(), extract_integral_bit_field(), extract_split_bit_field(), find_shift_sequence(), finish_bitfield_representative(), gen_int_shift_amount(), gen_lowpart_common(), gen_lowpart_for_combine(), mode_iterator::get_2xwider(), get_best_extraction_insn(), get_builtin_sync_mode(), mode_iterator::get_next(), mode_iterator::get_wider(), hard_function_value(), init_derived_machine_modes(), init_emit_once(), init_expr_target(), init_num_sign_bit_copies_in_rep(), init_optabs(), make_extraction(), omp_clause_aligned_alignment(), output_constant_pool_2(), prepare_call_arguments(), prepare_cmp_insn(), replace_reg_with_saved_mem(), resolve_simple_move(), set_builtin_user_assembler_name(), set_storage_via_setmem(), simplify_comparison(), simplify_subreg_concatn(), store_bit_field_1(), store_bit_field_using_insv(), store_fixed_bit_field(), store_integral_bit_field(), store_split_bit_field(), supportable_indirect_convert_operation(), vect_verify_full_masking(), vect_verify_full_masking_avx512(), vect_verify_loop_lens(), vectorizable_conversion(), vectorizable_load(), vectorizable_store(), widen_bswap(), widen_leading(), and widest_fixed_size_mode_for_size().

Field Documentation

◆ m_mode

template<typename T >
machine_mode opt_mode< T >::m_mode
private

The documentation for this class was generated from the following files: