LLVM  8.0.1
Classes | Typedefs | Functions
llvm::detail Namespace Reference

Implementation details of the pass manager interfaces. More...

Classes

class  AlignAdapter
 
class  AlignerImpl
 
struct  AnalysisPassConcept
 Abstract concept of an analysis pass. More...
 
struct  AnalysisPassModel
 Wrapper to model the analysis pass concept. More...
 
struct  AnalysisResultConcept
 Abstract concept of an analysis result. More...
 
struct  AnalysisResultModel
 Wrapper to model the analysis result concept. More...
 
struct  AnalysisResultModel< IRUnitT, PassT, ResultT, PreservedAnalysesT, InvalidatorT, false >
 Specialization of AnalysisResultModel which provides the default invalidate functionality. More...
 
struct  AnalysisResultModel< IRUnitT, PassT, ResultT, PreservedAnalysesT, InvalidatorT, true >
 Specialization of AnalysisResultModel which delegates invalidate handling to ResultT. More...
 
class  concat_range
 Helper to store a sequence of ranges being concatenated and access them. More...
 
struct  ConstantLog2
 A tiny meta function to compute the log2 of a compile time constant. More...
 
struct  ConstantLog2< 1 >
 
union  copy_construction_triviality_helper
 Internal utility to detect trivial copy construction. More...
 
struct  DenseMapPair
 
struct  DenseSetEmpty
 
class  DenseSetImpl
 Base class for DenseSet and DenseSmallSet. More...
 
class  DenseSetPair
 
class  DoubleAPFloat
 
class  enumerator
 
class  enumerator_iter
 
class  ErrorAdapter
 
struct  ErrorHolder
 
class  ErrorMatchesMono
 
struct  ExpectedHolder
 
class  format_adapter
 
struct  fwd_or_bidi_tag
 Helper which sets its type member to forward_iterator_tag if the category of IterT does not derive from bidirectional_iterator_tag, and to bidirectional_iterator_tag otherwise. More...
 
struct  fwd_or_bidi_tag_impl
 
struct  fwd_or_bidi_tag_impl< true >
 
class  GenericLayer
 
class  GenericLayerImpl
 
class  GenericLayerImpl< orc::LegacyRTDyldObjectLinkingLayer >
 
class  has_FormatProvider
 
class  has_StreamOperator
 
struct  HasPointerLikeTypeTraits
 
struct  HasPointerLikeTypeTraits< T, decltype((sizeof(PointerLikeTypeTraits< T >)+sizeof(T)), void())>
 
class  HelperFunctions
 
class  IEEEFloat
 
struct  is_cstring
 
struct  IsPointerLike
 
struct  IsPointerLike< T * >
 
struct  LeadingZerosCounter
 
class  missing_format_adapter
 
union  move_construction_triviality_helper
 Internal utility to detect trivial move construction. More...
 
class  OptionKey
 
class  PadAdapter
 
struct  PassConcept
 Template for the abstract base class used to dispatch polymorphically over pass objects. More...
 
struct  PassModel
 A template wrapper used to implement the polymorphic API. More...
 
struct  PointerSumTypeHelper
 A helper template for implementing PointerSumType. More...
 
struct  PopulationCounter
 
struct  PopulationCounter< T, 8 >
 
class  provider_format_adapter
 
class  PtrUseVisitorBase
 Implementation of non-dependent functionality for PtrUseVisitor. More...
 
struct  range_item_has_provider
 
class  RepeatAdapter
 
struct  result_pair
 
class  ResultHasInvalidateMethod
 SFINAE metafunction for computing whether ResultT provides an invalidate member function. More...
 
class  scope_exit
 
union  SizerImpl
 
class  stream_operator_format_adapter
 
struct  TrailingZerosCounter
 
struct  unit
 
struct  unit< std::micro >
 
struct  unit< std::milli >
 
struct  unit< std::nano >
 
struct  unit< std::ratio< 1 > >
 
struct  unit< std::ratio< 3600 > >
 
struct  unit< std::ratio< 60 > >
 
struct  use_char_formatter
 
struct  use_double_formatter
 
struct  use_integral_formatter
 
struct  use_pointer_formatter
 
struct  use_string_formatter
 
struct  uses_format_member
 
struct  uses_format_provider
 
struct  uses_missing_provider
 
struct  uses_stream_operator
 
class  value_sequence_iterator
 
class  ValueMatchesMono
 
class  ValueMatchesPoly
 
struct  zip_common
 
struct  zip_first
 
class  zip_longest_iterator
 
class  zip_longest_range
 
class  zip_shortest
 
struct  ZipLongestItemType
 
struct  ZipLongestTupleType
 
class  zippy
 
struct  ZipTupleType
 

Typedefs

template<typename RangeT >
using IterOfRange = decltype(std::begin(std::declval< RangeT & >()))
 
template<typename RangeT >
using ValueOfRange = typename std::remove_reference< decltype(*std::begin(std::declval< RangeT & >()))>::type
 
template<typename ZipType , typename... Iters>
using zip_traits = iterator_facade_base< ZipType, typename std::common_type< std::bidirectional_iterator_tag, typename std::iterator_traits< Iters >::iterator_category... >::type, typename ZipTupleType< Iters... >::type, typename std::iterator_traits< typename std::tuple_element< 0, std::tuple< Iters... > >::type >::difference_type, typename ZipTupleType< Iters... >::type *, typename ZipTupleType< Iters... >::type >
 
template<typename IterT >
using IterValue = typename std::iterator_traits< IterT >::value_type
 

Functions

hash_code hash_value (const IEEEFloat &Arg)
 
int ilogb (const IEEEFloat &Arg)
 
IEEEFloat scalbn (IEEEFloat X, int Exp, IEEEFloat::roundingMode)
 
IEEEFloat frexp (const IEEEFloat &Val, int &Exp, IEEEFloat::roundingMode RM)
 
hash_code hash_value (const DoubleAPFloat &Arg)
 
template<typename ValueT , typename MapTy , typename ValueInfoT >
bool operator== (const DenseSetImpl< ValueT, MapTy, ValueInfoT > &LHS, const DenseSetImpl< ValueT, MapTy, ValueInfoT > &RHS)
 Equality comparison for DenseSet. More...
 
template<typename ValueT , typename MapTy , typename ValueInfoT >
bool operator!= (const DenseSetImpl< ValueT, MapTy, ValueInfoT > &LHS, const DenseSetImpl< ValueT, MapTy, ValueInfoT > &RHS)
 Inequality comparison for DenseSet. More...
 
template<typename Iter >
static Iter next_or_end (const Iter &I, const Iter &End)
 
template<typename Iter >
static auto deref_or_none (const Iter &I, const Iter &End) -> llvm::Optional< typename std::remove_const< typename std::remove_reference< decltype(*I)>::type >::type >
 
template<typename F , typename Tuple , std::size_t... I>
auto apply_tuple_impl (F &&f, Tuple &&t, index_sequence< I... >) -> decltype(std::forward< F >(f)(std::get< I >(std::forward< Tuple >(t))...))
 
template<typename N >
bool to_float (const Twine &T, N &Num, N(*StrTo)(const char *, char **))
 
template<typename IteratorT >
std::string join_impl (IteratorT Begin, IteratorT End, StringRef Separator, std::input_iterator_tag)
 
template<typename IteratorT >
std::string join_impl (IteratorT Begin, IteratorT End, StringRef Separator, std::forward_iterator_tag)
 
template<typename Sep >
void join_items_impl (std::string &Result, Sep Separator)
 
template<typename Sep , typename Arg >
void join_items_impl (std::string &Result, Sep Separator, const Arg &Item)
 
template<typename Sep , typename Arg1 , typename... Args>
void join_items_impl (std::string &Result, Sep Separator, const Arg1 &A1, Args &&... Items)
 
size_t join_one_item_size (char C)
 
size_t join_one_item_size (const char *S)
 
template<typename T >
size_t join_one_item_size (const T &Str)
 
size_t join_items_size ()
 
template<typename A1 >
size_t join_items_size (const A1 &A)
 
template<typename A1 , typename... Args>
size_t join_items_size (const A1 &A, Args &&... Items)
 
template<typename PassT , typename IRUnitT , typename AnalysisManagerT , typename... ArgTs, size_t... Ns>
PassT::Result getAnalysisResultUnpackTuple (AnalysisManagerT &AM, IRUnitT &IR, std::tuple< ArgTs... > Args, llvm::index_sequence< Ns... >)
 Actual unpacker of extra arguments in getAnalysisResult, passes only those tuple arguments that are mentioned in index_sequence. More...
 
template<typename PassT , typename IRUnitT , typename... AnalysisArgTs, typename... MainArgTs>
PassT::Result getAnalysisResult (AnalysisManager< IRUnitT, AnalysisArgTs... > &AM, IRUnitT &IR, std::tuple< MainArgTs... > Args)
 Helper for partial unpacking of extra arguments in getAnalysisResult. More...
 
void printBumpPtrAllocatorStats (unsigned NumSlabs, size_t BytesAllocated, size_t TotalMemory)
 
template<typename T >
std::enable_if< uses_format_member< T >::value, T >::type build_format_adapter (T &&Item)
 
template<typename T >
std::enable_if< uses_format_provider< T >::value, provider_format_adapter< T > >::type build_format_adapter (T &&Item)
 
template<typename T >
std::enable_if< uses_stream_operator< T >::value, stream_operator_format_adapter< T > >::type build_format_adapter (T &&Item)
 
template<typename T >
std::enable_if< uses_missing_provider< T >::value, missing_format_adapter< T > >::type build_format_adapter (T &&Item)
 
ErrorHolder TakeError (Error Err)
 
template<typename T >
ExpectedHolder< TTakeExpected (Expected< T > &Exp)
 
template<typename T >
ExpectedHolder< TTakeExpected (Expected< T > &&Exp)
 
void PrintTo (const ErrorHolder &Err, std::ostream *Out)
 
template<typename T >
void PrintTo (const ExpectedHolder< T > &Item, std::ostream *Out)
 
template<typename LayerT >
std::unique_ptr< GenericLayerImpl< LayerT > > createGenericLayer (LayerT &Layer)
 
DoubleAPFloat scalbn (DoubleAPFloat Arg, int Exp, APFloat::roundingMode RM)
 
DoubleAPFloat frexp (const DoubleAPFloat &Arg, int &Exp, APFloat::roundingMode RM)
 

Detailed Description

Implementation details of the pass manager interfaces.

Implementation of format_provider<T> for duration types.

The options string of a duration type has the grammar:

duration_options ::= [unit][show_unit [number_options]] unit ::= h|m|s|ms|us|ns show_unit ::=+|-` number_options ::= options string for a integral or floating point type

Examples

| options | Input | Output |

| "" | 1s | 1 s | | "ms" | 1s | 1000 ms | | "ms-" | 1s | 1000 | | "ms-n" | 1s | 1,000 |

| "" | 1.0s | 1.00 s |

If the unit of the duration type is not one of the units specified above, it is still possible to format it, provided you explicitly request a display unit or you request that the unit is not displayed.

Typedef Documentation

◆ IterOfRange

template<typename RangeT >
using llvm::detail::IterOfRange = typedef decltype(std::begin(std::declval<RangeT &>()))

Definition at line 53 of file STLExtras.h.

◆ IterValue

template<typename IterT >
using llvm::detail::IterValue = typedef typename std::iterator_traits<IterT>::value_type

Definition at line 326 of file FormatProviders.h.

◆ ValueOfRange

template<typename RangeT >
using llvm::detail::ValueOfRange = typedef typename std::remove_reference<decltype( *std::begin(std::declval<RangeT &>()))>::type

Definition at line 57 of file STLExtras.h.

◆ zip_traits

template<typename ZipType , typename... Iters>
using llvm::detail::zip_traits = typedef iterator_facade_base< ZipType, typename std::common_type<std::bidirectional_iterator_tag, typename std::iterator_traits< Iters>::iterator_category...>::type, typename ZipTupleType<Iters...>::type, typename std::iterator_traits<typename std::tuple_element< 0, std::tuple<Iters...> >::type>::difference_type, typename ZipTupleType<Iters...>::type *, typename ZipTupleType<Iters...>::type>

Definition at line 555 of file STLExtras.h.

Function Documentation

◆ apply_tuple_impl()

template<typename F , typename Tuple , std::size_t... I>
auto llvm::detail::apply_tuple_impl ( F &&  f,
Tuple &&  t,
index_sequence< I... >   
) -> decltype(std::forward<F>(f)(std::get<I>(std::forward<Tuple>(t))...))

Definition at line 1524 of file STLExtras.h.

Referenced by llvm::apply_tuple().

◆ build_format_adapter() [1/4]

template<typename T >
std::enable_if<uses_format_member<T>::value, T>::type llvm::detail::build_format_adapter ( T &&  Item)

◆ build_format_adapter() [2/4]

template<typename T >
std::enable_if<uses_format_provider<T>::value, provider_format_adapter<T> >::type llvm::detail::build_format_adapter ( T &&  Item)

Definition at line 139 of file FormatVariadicDetails.h.

◆ build_format_adapter() [3/4]

template<typename T >
std::enable_if<uses_stream_operator<T>::value, stream_operator_format_adapter<T> >::type llvm::detail::build_format_adapter ( T &&  Item)

Definition at line 146 of file FormatVariadicDetails.h.

◆ build_format_adapter() [4/4]

template<typename T >
std::enable_if<uses_missing_provider<T>::value, missing_format_adapter<T> >::type llvm::detail::build_format_adapter ( T &&  Item)

Definition at line 159 of file FormatVariadicDetails.h.

◆ createGenericLayer()

template<typename LayerT >
std::unique_ptr<GenericLayerImpl<LayerT> > llvm::detail::createGenericLayer ( LayerT &  Layer)

Definition at line 100 of file OrcCBindingsStack.h.

◆ deref_or_none()

template<typename Iter >
static auto llvm::detail::deref_or_none ( const Iter &  I,
const Iter &  End 
) -> llvm::Optional<typename std::remove_const< typename std::remove_reference<decltype(*I)>::type>::type>
static

Definition at line 685 of file STLExtras.h.

◆ frexp() [1/2]

IEEEFloat llvm::detail::frexp ( const IEEEFloat Val,
int &  Exp,
IEEEFloat::roundingMode  RM 
)

◆ frexp() [2/2]

DoubleAPFloat llvm::detail::frexp ( const DoubleAPFloat Arg,
int &  Exp,
APFloat::roundingMode  RM 
)

◆ getAnalysisResult()

template<typename PassT , typename IRUnitT , typename... AnalysisArgTs, typename... MainArgTs>
PassT::Result llvm::detail::getAnalysisResult ( AnalysisManager< IRUnitT, AnalysisArgTs... > &  AM,
IRUnitT &  IR,
std::tuple< MainArgTs... >  Args 
)

Helper for partial unpacking of extra arguments in getAnalysisResult.

Arguments passed in tuple come from PassManager, so they might have extra arguments after those AnalysisManager's ExtraArgTs ones that we need to pass to getResult.

Definition at line 428 of file PassManager.h.

References llvm::AMDGPU::HSAMD::Kernel::Key::Args, getAnalysisResultUnpackTuple(), and IR.

◆ getAnalysisResultUnpackTuple()

template<typename PassT , typename IRUnitT , typename AnalysisManagerT , typename... ArgTs, size_t... Ns>
PassT::Result llvm::detail::getAnalysisResultUnpackTuple ( AnalysisManagerT &  AM,
IRUnitT &  IR,
std::tuple< ArgTs... >  Args,
llvm::index_sequence< Ns... >   
)

Actual unpacker of extra arguments in getAnalysisResult, passes only those tuple arguments that are mentioned in index_sequence.

Definition at line 413 of file PassManager.h.

References llvm::AMDGPU::HSAMD::Kernel::Key::Args, and IR.

Referenced by getAnalysisResult().

◆ hash_value() [1/2]

hash_code llvm::detail::hash_value ( const IEEEFloat Arg)

Note that the use of hash codes for floating point values is in general frought with peril. Equality is hard to define for these values. For example, should negative and positive zero hash to different codes? Are they equal or not? This hash value implementation specifically emphasizes producing different codes for different inputs in order to be used in canonicalization and memoization. As such, equality is bitwiseIsEqual, and 0 != -0.

Definition at line 2773 of file APFloat.cpp.

References assert(), llvm::detail::IEEEFloat::convert(), llvm::APFloatBase::fcInfinity, llvm::APFloatBase::fcNaN, llvm::APFloatBase::fcZero, llvm::APInt::getRawData(), llvm::hash_combine(), llvm::hash_combine_range(), llvm::detail::IEEEFloat::isFiniteNonZero(), llvm::detail::IEEEFloat::isNaN(), llvm::fltSemantics::minExponent, llvm::APFloatBase::opInexact, llvm::APFloatBase::opOK, llvm::fltSemantics::precision, llvm::APFloatBase::rmNearestTiesToEven, and llvm::detail::IEEEFloat::subtract().

◆ hash_value() [2/2]

hash_code llvm::detail::hash_value ( const DoubleAPFloat Arg)

Definition at line 4265 of file APFloat.cpp.

References llvm::hash_combine(), and llvm::detail::DoubleAPFloat::hash_value.

◆ ilogb()

int llvm::detail::ilogb ( const IEEEFloat Arg)

◆ join_impl() [1/2]

template<typename IteratorT >
std::string llvm::detail::join_impl ( IteratorT  Begin,
IteratorT  End,
StringRef  Separator,
std::input_iterator_tag   
)
inline

Definition at line 299 of file StringExtras.h.

◆ join_impl() [2/2]

template<typename IteratorT >
std::string llvm::detail::join_impl ( IteratorT  Begin,
IteratorT  End,
StringRef  Separator,
std::forward_iterator_tag   
)
inline

Definition at line 314 of file StringExtras.h.

◆ join_items_impl() [1/3]

template<typename Sep >
void llvm::detail::join_items_impl ( std::string &  Result,
Sep  Separator 
)
inline

Definition at line 333 of file StringExtras.h.

Referenced by llvm::join_items(), and join_items_impl().

◆ join_items_impl() [2/3]

template<typename Sep , typename Arg >
void llvm::detail::join_items_impl ( std::string &  Result,
Sep  Separator,
const Arg Item 
)
inline

Definition at line 336 of file StringExtras.h.

References llvm::AMDGPU::HSAMD::Kernel::Key::Args.

◆ join_items_impl() [3/3]

template<typename Sep , typename Arg1 , typename... Args>
void llvm::detail::join_items_impl ( std::string &  Result,
Sep  Separator,
const Arg1 &  A1,
Args &&...  Items 
)
inline

Definition at line 342 of file StringExtras.h.

References join_items_impl().

◆ join_items_size() [1/3]

size_t llvm::detail::join_items_size ( )
inline

Definition at line 356 of file StringExtras.h.

Referenced by llvm::join_items(), and join_items_size().

◆ join_items_size() [2/3]

template<typename A1 >
size_t llvm::detail::join_items_size ( const A1 &  A)
inline

Definition at line 358 of file StringExtras.h.

References llvm::AMDGPU::HSAMD::Kernel::Key::Args, and join_one_item_size().

◆ join_items_size() [3/3]

template<typename A1 , typename... Args>
size_t llvm::detail::join_items_size ( const A1 &  A,
Args &&...  Items 
)
inline

Definition at line 362 of file StringExtras.h.

References join_items_size(), and join_one_item_size().

◆ join_one_item_size() [1/3]

size_t llvm::detail::join_one_item_size ( char  C)
inline

Definition at line 349 of file StringExtras.h.

Referenced by llvm::join_items(), and join_items_size().

◆ join_one_item_size() [2/3]

size_t llvm::detail::join_one_item_size ( const char S)
inline

Definition at line 350 of file StringExtras.h.

◆ join_one_item_size() [3/3]

template<typename T >
size_t llvm::detail::join_one_item_size ( const T Str)
inline

Definition at line 352 of file StringExtras.h.

◆ next_or_end()

template<typename Iter >
static Iter llvm::detail::next_or_end ( const Iter &  I,
const Iter &  End 
)
static

Definition at line 678 of file STLExtras.h.

◆ operator!=()

template<typename ValueT , typename MapTy , typename ValueInfoT >
bool llvm::detail::operator!= ( const DenseSetImpl< ValueT, MapTy, ValueInfoT > &  LHS,
const DenseSetImpl< ValueT, MapTy, ValueInfoT > &  RHS 
)

Inequality comparison for DenseSet.

Equivalent to !(LHS == RHS). See operator== for performance notes.

Definition at line 241 of file DenseSet.h.

◆ operator==()

template<typename ValueT , typename MapTy , typename ValueInfoT >
bool llvm::detail::operator== ( const DenseSetImpl< ValueT, MapTy, ValueInfoT > &  LHS,
const DenseSetImpl< ValueT, MapTy, ValueInfoT > &  RHS 
)

Equality comparison for DenseSet.

Iterates over elements of LHS confirming that each element is also a member of RHS, and that RHS contains no additional values. Equivalent to N calls to RHS.count. Amortized complexity is linear, worst case is O(N^2) (if every hash collides).

Definition at line 225 of file DenseSet.h.

References llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), E, and llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::size().

◆ printBumpPtrAllocatorStats()

void llvm::detail::printBumpPtrAllocatorStats ( unsigned  NumSlabs,
size_t  BytesAllocated,
size_t  TotalMemory 
)

◆ PrintTo() [1/2]

void llvm::detail::PrintTo ( const ErrorHolder Err,
std::ostream *  Out 
)
inline

Definition at line 35 of file SupportHelpers.h.

Referenced by PrintTo().

◆ PrintTo() [2/2]

template<typename T >
void llvm::detail::PrintTo ( const ExpectedHolder< T > &  Item,
std::ostream *  Out 
)

◆ scalbn() [1/2]

IEEEFloat llvm::detail::scalbn ( IEEEFloat  X,
int  Exp,
IEEEFloat::roundingMode  RoundingMode 
)

◆ scalbn() [2/2]

DoubleAPFloat llvm::detail::scalbn ( DoubleAPFloat  Arg,
int  Exp,
APFloat::roundingMode  RM 
)

◆ TakeError()

llvm::detail::ErrorHolder llvm::detail::TakeError ( llvm::Error  Err)

Definition at line 16 of file Error.cpp.

Referenced by TakeExpected().

◆ TakeExpected() [1/2]

template<typename T >
ExpectedHolder<T> llvm::detail::TakeExpected ( Expected< T > &  Exp)

Definition at line 24 of file Error.h.

References TakeError(), and llvm::Expected< T >::takeError().

Referenced by TakeExpected().

◆ TakeExpected() [2/2]

template<typename T >
ExpectedHolder<T> llvm::detail::TakeExpected ( Expected< T > &&  Exp)

Definition at line 28 of file Error.h.

References TakeExpected().

◆ to_float()

template<typename N >
bool llvm::detail::to_float ( const Twine T,
N Num,
N(*)(const char *, char **)  StrTo 
)
inline

Definition at line 200 of file StringExtras.h.

References llvm::Twine::toNullTerminatedStringRef().

Referenced by llvm::to_float().