LLVM: include/llvm/IR/Argument.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_IR_ARGUMENT_H

14#define LLVM_IR_ARGUMENT_H

15

20#include

21

22namespace llvm {

23

25

26

27

28

29

30

31

34 unsigned ArgNo;

35

37 void setParent(Function *parent);

38

39public:

40

42 Function *F = nullptr, unsigned ArgNo = 0);

43

46

47

48

49

51 assert(Parent && "can't get number of unparented arg");

52 return ArgNo;

53 }

54

55

56

57

58

59

61

62

63

65

66

67

69

70

71

73

74

75

77

78

80

81

83

84

86

87

89

90

92

93

94

95

97

98

99

101

102

103

104

106

107

108

110

111

113

115

116

118

119

121

122

124

125

127

128

130

131

133

134

136

137

139

140

142

143

145

146

148

149

151

152

154

155

157

158

160

161

163

164

166

168

170

171

173

175

176

178

180

182

184

185

187 return V->getValueID() == ArgumentVal;

188 }

189};

190

191}

192

193#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

This file contains the simple types necessary to represent the attributes associated with functions a...

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

LLVM_ABI Type * getParamByRefType() const

If this is a byref argument, return its type.

LLVM_ABI bool hasDeadOnReturnAttr() const

Return true if this argument has the dead_on_return attribute.

LLVM_ABI Attribute getAttribute(Attribute::AttrKind Kind) const

LLVM_ABI bool hasNoAliasAttr() const

Return true if this argument has the noalias attribute.

LLVM_ABI bool hasNonNullAttr(bool AllowUndefOrPoison=true) const

Return true if this argument has the nonnull attribute.

LLVM_ABI bool hasByRefAttr() const

Return true if this argument has the byref attribute.

LLVM_ABI uint64_t getDereferenceableOrNullBytes() const

If this argument has the dereferenceable_or_null attribute, return the number of bytes known to be de...

LLVM_ABI void addAttr(Attribute::AttrKind Kind)

LLVM_ABI Argument(Type *Ty, const Twine &Name="", Function *F=nullptr, unsigned ArgNo=0)

Argument constructor.

LLVM_ABI bool onlyReadsMemory() const

Return true if this argument has the readonly or readnone attribute.

LLVM_ABI bool hasPointeeInMemoryValueAttr() const

Return true if this argument has the byval, sret, inalloca, preallocated, or byref attribute.

LLVM_ABI bool hasAttribute(Attribute::AttrKind Kind) const

Check if an argument has a given attribute.

LLVM_ABI bool hasReturnedAttr() const

Return true if this argument has the returned attribute.

LLVM_ABI Type * getParamStructRetType() const

If this is an sret argument, return its type.

LLVM_ABI bool hasInRegAttr() const

Return true if this argument has the inreg attribute.

LLVM_ABI bool hasByValAttr() const

Return true if this argument has the byval attribute.

LLVM_ABI bool hasPreallocatedAttr() const

Return true if this argument has the preallocated attribute.

LLVM_ABI bool hasSExtAttr() const

Return true if this argument has the sext attribute.

LLVM_ABI void removeAttr(Attribute::AttrKind Kind)

Remove attributes from an argument.

LLVM_ABI uint64_t getPassPointeeByValueCopySize(const DataLayout &DL) const

If this argument satisfies has hasPassPointeeByValueAttr, return the in-memory ABI size copied to the...

LLVM_ABI void removeAttrs(const AttributeMask &AM)

const Function * getParent() const

Definition Argument.h:44

LLVM_ABI Type * getPointeeInMemoryValueType() const

If hasPointeeInMemoryValueAttr returns true, the in-memory ABI type is returned.

Function * getParent()

Definition Argument.h:45

LLVM_ABI bool hasInAllocaAttr() const

Return true if this argument has the inalloca attribute.

LLVM_ABI bool hasSwiftErrorAttr() const

Return true if this argument has the swifterror attribute.

LLVM_ABI FPClassTest getNoFPClass() const

If this argument has nofpclass attribute, return the mask representing disallowed floating-point valu...

LLVM_ABI void addAttrs(AttrBuilder &B)

Add attributes to an argument.

LLVM_ABI bool hasNoFreeAttr() const

Return true if this argument has the nofree attribute.

LLVM_ABI bool hasSwiftSelfAttr() const

Return true if this argument has the swiftself attribute.

LLVM_ABI Type * getParamInAllocaType() const

If this is an inalloca argument, return its type.

LLVM_ABI bool hasZExtAttr() const

Return true if this argument has the zext attribute.

unsigned getArgNo() const

Return the index of this formal argument in its containing function.

Definition Argument.h:50

friend class Function

Definition Argument.h:36

LLVM_ABI Type * getParamByValType() const

If this is a byval argument, return its type.

LLVM_ABI bool hasNestAttr() const

Return true if this argument has the nest attribute.

LLVM_ABI MaybeAlign getParamAlign() const

If this is a byval or inalloca argument, return its alignment.

LLVM_ABI std::optional< ConstantRange > getRange() const

If this argument has a range attribute, return the value range of the argument.

static bool classof(const Value *V)

Method for support type inquiry through isa, cast, and dyn_cast.

Definition Argument.h:186

LLVM_ABI bool hasStructRetAttr() const

Return true if this argument has the sret attribute.

LLVM_ABI AttributeSet getAttributes() const

LLVM_ABI bool hasPassPointeeByValueCopyAttr() const

Return true if this argument has the byval, inalloca, or preallocated attribute.

LLVM_ABI MaybeAlign getParamStackAlign() const

LLVM_ABI bool hasNoCaptureAttr() const

Return true if this argument has the nocapture attribute.

LLVM_ABI uint64_t getDereferenceableBytes() const

If this argument has the dereferenceable attribute, return the number of bytes known to be dereferenc...

This class stores enough information to efficiently remove some attributes from an existing AttrBuild...

This class holds the attributes for a particular argument, parameter, function, or return value.

Functions, function parameters, and return types can have attributes to indicate how they should be t...

AttrKind

This enumeration lists the attributes that can be associated with parameters, function results,...

This class represents a range of values.

A parsed version of the target data layout string in and methods for querying it.

StringRef - Represent a constant reference to a string, i.e.

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

The instances of the Type class are immutable: once they are created, they are never changed.

LLVM_ABI Value(Type *Ty, unsigned scid)

This is an optimization pass for GlobalISel generic memory operations.

FPClassTest

Floating-point class tests, supported by 'is_fpclass' intrinsic.

This struct is a compact representation of a valid (power of two) or undefined (0) alignment.