Coverage Report

Created: 2020-06-26 05:44

/home/arjun/llvm-project/mlir/include/mlir/Support/TypeID.h
Line
Count
Source (jump to first uncovered line)
1
//===- TypeID.h - TypeID RTTI class -----------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file contains a definition of the TypeID class. This provides a non
10
// RTTI mechanism for producing unique type IDs in LLVM.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef MLIR_SUPPORT_TYPEID_H
15
#define MLIR_SUPPORT_TYPEID_H
16
17
#include "mlir/Support/LLVM.h"
18
#include "llvm/ADT/DenseMapInfo.h"
19
#include "llvm/Support/PointerLikeTypeTraits.h"
20
21
namespace mlir {
22
23
/// This class provides an efficient unique identifier for a specific C++ type.
24
/// This allows for a C++ type to be compared, hashed, and stored in an opaque
25
/// context. This class is similar in some ways to std::type_index, but can be
26
/// used for any type. For example, this class could be used to implement LLVM
27
/// style isa/dyn_cast functionality for a type hierarchy:
28
///
29
///  struct Base {
30
///    Base(TypeID typeID) : typeID(typeID) {}
31
///    TypeID typeID;
32
///  };
33
///
34
///  struct DerivedA : public Base {
35
///    DerivedA() : Base(TypeID::get<DerivedA>()) {}
36
///
37
///    static bool classof(const Base *base) {
38
///      return base->typeID == TypeID::get<DerivedA>();
39
///    }
40
///  };
41
///
42
///  void foo(Base *base) {
43
///    if (DerivedA *a = llvm::dyn_cast<DerivedA>(base))
44
///       ...
45
///  }
46
///
47
class TypeID {
48
  /// This class represents the storage of a type info object.
49
  /// Note: We specify an explicit alignment here to allow use with
50
  /// PointerIntPair and other utilities/data structures that require a known
51
  /// pointer alignment.
52
  struct alignas(8) Storage {};
53
54
public:
55
0
  TypeID() : TypeID(get<void>()) {}
56
  TypeID(const TypeID &) = default;
57
58
  /// Comparison operations.
59
0
  bool operator==(const TypeID &other) const {
60
0
    return storage == other.storage;
61
0
  }
62
0
  bool operator!=(const TypeID &other) const { return !(*this == other); }
63
64
  /// Construct a type info object for the given type T.
65
  /// TODO: This currently won't work when using DLLs as it requires properly
66
  /// attaching dllimport and dllexport. Fix this when that information is
67
  /// available within LLVM.
68
  template <typename T>
69
0
  LLVM_EXTERNAL_VISIBILITY static TypeID get() {
70
0
    static Storage instance;
71
0
    return TypeID(&instance);
72
0
  }
Unexecuted instantiation: _ZN4mlir6TypeID3getIvEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_23MemoryEffectOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_12AffineLoadOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13AffineStoreOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_18AffineVectorLoadOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_19AffineVectorStoreOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_21OpAsmDialectInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_17SymbolOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6ViewOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9SubViewOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7AllocOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13AffineApplyOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_12MemRefCastOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_16AffineDmaStartOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_15AffineDmaWaitOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11AffineForOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_18AffineTerminatorOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_19LoopLikeOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10AffineIfOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_21AffineReadOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11AffineMaxOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11AffineMinOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_16AffineParallelOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_16AffinePrefetchOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_22AffineWriteOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_23DialectInlinerInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6FuncOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10ConstantOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_5DimOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13MemoryEffects4ReadEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11SideEffects15DefaultResourceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13MemoryEffects5WriteEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8ModuleOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10DmaStartOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9DmaWaitOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6AbsFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7AddCFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6AddFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6AddIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8AllocaOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_5AndOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_17AssumeAlignmentOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11AtomicRMWOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13AtomicYieldOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_18GenericAtomicRMWOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8BranchOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_17BranchOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_14CallIndirectOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_15CallOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6CallOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7CeilFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6CmpFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6CmpIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_12CondBranchOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_16OpAsmOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10CopySignOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_5CosOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_15CreateComplexOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9DeallocOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6DivFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6Exp2OpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_5ExpOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_16ExtractElementOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7FPExtOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8FPToSIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9FPTruncOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_4ImOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11IndexCastOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6LoadOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7Log10OpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6Log2OpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_5LogOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6MulFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6MulIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6NegFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_4OrOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10PrefetchOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6RankOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_4ReOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6RemFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8ReturnOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7RsqrtOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8SIToFPOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8SelectOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11ShiftLeftOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13SignExtendIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_12SignedDivIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_12SignedRemIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_18SignedShiftRightOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_5SinOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7SplatOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6SqrtOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7StoreOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7SubCFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6SubFOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6SubIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_19ViewLikeOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_6TanhOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_12TensorCastOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_20TensorFromElementsOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_12TensorLoadOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13TensorStoreOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11TruncateIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_14UnsignedDivIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_14UnsignedRemIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_20UnsignedShiftRightOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_5XOrOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13ZeroExtendIOpEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13MemoryEffects8AllocateEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11SideEffects32AutomaticAllocationScopeResourceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13MemoryEffects4FreeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13AffineMapAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9ArrayAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_14DictionaryAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9FloatAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_13SymbolRefAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11IntegerAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_14IntegerSetAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10OpaqueAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10StringAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8TypeAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_23DenseStringElementsAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_24DenseIntOrFPElementsAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_18OpaqueElementsAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_18SparseElementsAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11CallSiteLocEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_14FileLineColLocEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8FusedLocEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7NameLocEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9OpaqueLocEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8BoolAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8UnitAttrEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10UnknownLocEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11ComplexTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9FloatTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_12FunctionTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9IndexTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_11IntegerTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10MemRefTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_18UnrankedMemRefTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_8NoneTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10OpaqueTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_16RankedTensorTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_9TupleTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_18UnrankedTensorTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_10VectorTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_19CallableOpInterfaceEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_18ModuleTerminatorOpEEES0_v
73
  template <template <typename> class Trait>
74
0
  LLVM_EXTERNAL_VISIBILITY static TypeID get() {
75
0
    static Storage instance;
76
0
    return TypeID(&instance);
77
0
  }
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait23HasRecursiveSideEffectsEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait12ConstantLikeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait16VariadicOperandsEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait10ZeroResultEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait10ZeroRegionEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait9OneResultEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait13ZeroSuccessorEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_23MemoryEffectOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait9OneRegionEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait29SingleBlockImplicitTerminatorINS_18AffineTerminatorOpEE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_19LoopLikeOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait8NRegionsILj2EE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait16AtLeastNOperandsILj1EE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_21AffineReadOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait16AtLeastNOperandsILj2EE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_22AffineWriteOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait12ZeroOperandsEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait12IsTerminatorEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait11AffineScopeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait10OneOperandEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait25SameOperandsAndResultTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait9NOperandsILj2EE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait13IsCommutativeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait9HasParentINS_18GenericAtomicRMWOpEE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait12OneSuccessorEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_17BranchOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait15VariadicResultsEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_15CallOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait16SameTypeOperandsEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait26SameOperandsAndResultShapeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait11NSuccessorsILj2EE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait24AttrSizedOperandSegmentsEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_16OpAsmOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait29SingleBlockImplicitTerminatorINS_13AtomicYieldOpEE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait9HasParentINS_6FuncOpEE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait10ReturnLikeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait9NOperandsILj3EE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_19ViewLikeOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait32SameOperandsAndResultElementTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait17SameOperandsShapeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait23SameOperandsElementTypeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait24AutomaticAllocationScopeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait19IsIsolatedFromAboveEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait12FunctionLikeEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_19CallableOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_17SymbolOpInterface5TraitEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait11SymbolTableEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait29SingleBlockImplicitTerminatorINS_18ModuleTerminatorOpEE4ImplEEES0_v
Unexecuted instantiation: _ZN4mlir6TypeID3getINS_7OpTrait9HasParentINS_8ModuleOpEE4ImplEEES0_v
78
79
  /// Methods for supporting PointerLikeTypeTraits.
80
0
  const void *getAsOpaquePointer() const {
81
0
    return static_cast<const void *>(storage);
82
0
  }
83
0
  static TypeID getFromOpaquePointer(const void *pointer) {
84
0
    return TypeID(reinterpret_cast<const Storage *>(pointer));
85
0
  }
86
87
  /// Enable hashing TypeID.
88
  friend ::llvm::hash_code hash_value(TypeID id);
89
90
private:
91
0
  TypeID(const Storage *storage) : storage(storage) {}
92
93
  /// The storage of this type info object.
94
  const Storage *storage;
95
};
96
97
/// Enable hashing TypeID.
98
0
inline ::llvm::hash_code hash_value(TypeID id) {
99
0
  return llvm::hash_value(id.storage);
100
0
}
101
102
} // end namespace mlir
103
104
namespace llvm {
105
template <> struct DenseMapInfo<mlir::TypeID> {
106
0
  static mlir::TypeID getEmptyKey() {
107
0
    void *pointer = llvm::DenseMapInfo<void *>::getEmptyKey();
108
0
    return mlir::TypeID::getFromOpaquePointer(pointer);
109
0
  }
110
0
  static mlir::TypeID getTombstoneKey() {
111
0
    void *pointer = llvm::DenseMapInfo<void *>::getTombstoneKey();
112
0
    return mlir::TypeID::getFromOpaquePointer(pointer);
113
0
  }
114
0
  static unsigned getHashValue(mlir::TypeID val) {
115
0
    return mlir::hash_value(val);
116
0
  }
117
0
  static bool isEqual(mlir::TypeID lhs, mlir::TypeID rhs) { return lhs == rhs; }
118
};
119
120
/// We align TypeID::Storage by 8, so allow LLVM to steal the low bits.
121
template <> struct PointerLikeTypeTraits<mlir::TypeID> {
122
0
  static inline void *getAsVoidPointer(mlir::TypeID info) {
123
0
    return const_cast<void *>(info.getAsOpaquePointer());
124
0
  }
125
0
  static inline mlir::TypeID getFromVoidPointer(void *ptr) {
126
0
    return mlir::TypeID::getFromOpaquePointer(ptr);
127
0
  }
128
  static constexpr int NumLowBitsAvailable = 3;
129
};
130
131
} // end namespace llvm
132
133
#endif // MLIR_SUPPORT_TYPEID_H