Coverage Report

Created: 2018-12-14 11:24

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/lib/Target/AMDGPU/AMDGPUGenIntrinsicImpl.inc
Line
Count
Source (jump to first uncovered line)
1
472
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2
472
|*                                                                            *|
3
472
|* Intrinsic Function Source Fragment                                         *|
4
472
|*                                                                            *|
5
472
|* Automatically generated file, do not edit!                                 *|
6
472
|*                                                                            *|
7
472
\*===----------------------------------------------------------------------===*/
8
472
9
472
// VisualStudio defines setjmp as _setjmp
10
#if defined(_MSC_VER) && defined(setjmp) && \
11
                         !defined(setjmp_undefined_for_msvc)
12
#  pragma push_macro("setjmp")
13
#  undef setjmp
14
#  define setjmp_undefined_for_msvc
15
#endif
16
17
472
// Target mapping
18
#ifdef GET_INTRINSIC_TARGET_DATA
19
struct IntrinsicTargetInfo {
20
  llvm::StringLiteral Name;
21
  size_t Offset;
22
  size_t Count;
23
};
24
static constexpr IntrinsicTargetInfo TargetInfos[] = {
25
  {llvm::StringLiteral(""), 0, 0},
26
  {llvm::StringLiteral("SI"), 0, 1},
27
};
28
#endif
29
30
472
// Intrinsic ID to name table
31
#ifdef GET_INTRINSIC_NAME_TABLE
32
  // Note that entry #0 is the invalid intrinsic!
33
  "llvm.SI.load.const",
34
#endif
35
36
472
// Intrinsic ID to overload bitset
37
472
#ifdef GET_INTRINSIC_OVERLOAD_TABLE
38
472
static const uint8_t OTable[] = {
39
472
  0 | (1<<1)
40
472
};
41
472
42
472
return (OTable[id/8] & (1 << (id%8))) != 0;
43
472
#endif
44
472
45
472
// Global intrinsic function declaration type table.
46
#ifdef GET_INTRINSIC_GENERATOR_GLOBAL
47
static const unsigned IIT_Table[] = {
48
  0x41f7, 0
49
};
50
51
static const unsigned char IIT_LongEncodingTable[] = {
52
  255
53
};
54
55
#endif
56
57
472
// Add parameter attributes that are not common to all intrinsics.
58
#ifdef GET_INTRINSIC_ATTRIBUTES
59
0
static AttributeList getAttributes(LLVMContext &C, SIIntrinsic::ID id) {
60
0
  static const uint8_t IntrinsicsToAttributesMap[] = {
61
0
    1, // llvm.SI.load.const
62
0
  };
63
0
64
0
  AttributeList AS[1];
65
0
  unsigned NumAttrs = 0;
66
0
  if (id != 0) {
67
0
    switch(IntrinsicsToAttributesMap[id - Intrinsic::num_intrinsics]) {
68
0
    default: llvm_unreachable("Invalid attribute number");
69
0
    case 1: {
70
0
      const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ReadNone};
71
0
      AS[0] = AttributeList::get(C, AttributeList::FunctionIndex, Atts);
72
0
      NumAttrs = 1;
73
0
      break;
74
0
      }
75
0
    }
76
0
  }
77
0
  return AttributeList::get(C, makeArrayRef(AS, NumAttrs));
78
0
}
79
#endif // GET_INTRINSIC_ATTRIBUTES
80
81
472
// Get the LLVM intrinsic that corresponds to a builtin.
82
472
// This is used by the C front-end.  The builtin name is passed
83
472
// in as BuiltinName, and a target prefix (e.g. 'ppc') is passed
84
472
// in as TargetPrefix.  The result is assigned to 'IntrinsicID'.
85
#ifdef GET_LLVM_INTRINSIC_FOR_GCC_BUILTIN
86
static SIIntrinsic::ID getIntrinsicForGCCBuiltin(const char *TargetPrefixStr, StringRef BuiltinNameStr) {
87
  return (SIIntrinsic::ID)Intrinsic::not_intrinsic;
88
}
89
#endif
90
91
472
// Get the LLVM intrinsic that corresponds to a builtin.
92
472
// This is used by the C front-end.  The builtin name is passed
93
472
// in as BuiltinName, and a target prefix (e.g. 'ppc') is passed
94
472
// in as TargetPrefix.  The result is assigned to 'IntrinsicID'.
95
#ifdef GET_LLVM_INTRINSIC_FOR_MS_BUILTIN
96
static SIIntrinsic::ID getIntrinsicForMSBuiltin(const char *TargetPrefixStr, StringRef BuiltinNameStr) {
97
  return (SIIntrinsic::ID)Intrinsic::not_intrinsic;
98
}
99
#endif
100
101
#if defined(_MSC_VER) && defined(setjmp_undefined_for_msvc)
102
// let's return it to _setjmp state
103
#  pragma pop_macro("setjmp")
104
#  undef setjmp_undefined_for_msvc
105
#endif
106