Skip to content

Commit b56b58a

Browse files
committed
auto-annotate with IDS
1 parent 4b1d5b8 commit b56b58a

File tree

17 files changed

+68
-60
lines changed

17 files changed

+68
-60
lines changed

llvm/include/llvm/Analysis/IR2Vec.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -164,37 +164,37 @@ class Vocabulary {
164164

165165
public:
166166
Vocabulary() = default;
167-
Vocabulary(VocabVector &&Vocab);
167+
LLVM_ABI Vocabulary(VocabVector &&Vocab);
168168

169-
bool isValid() const;
170-
unsigned getDimension() const;
171-
size_t size() const;
169+
LLVM_ABI bool isValid() const;
170+
LLVM_ABI unsigned getDimension() const;
171+
LLVM_ABI size_t size() const;
172172

173173
static size_t expectedSize() {
174174
return MaxOpcodes + MaxTypeIDs + MaxOperandKinds;
175175
}
176176

177177
/// Helper function to get vocabulary key for a given Opcode
178-
static StringRef getVocabKeyForOpcode(unsigned Opcode);
178+
LLVM_ABI static StringRef getVocabKeyForOpcode(unsigned Opcode);
179179

180180
/// Helper function to get vocabulary key for a given TypeID
181-
static StringRef getVocabKeyForTypeID(Type::TypeID TypeID);
181+
LLVM_ABI static StringRef getVocabKeyForTypeID(Type::TypeID TypeID);
182182

183183
/// Helper function to get vocabulary key for a given OperandKind
184-
static StringRef getVocabKeyForOperandKind(OperandKind Kind);
184+
LLVM_ABI static StringRef getVocabKeyForOperandKind(OperandKind Kind);
185185

186186
/// Helper function to classify an operand into OperandKind
187-
static OperandKind getOperandKind(const Value *Op);
187+
LLVM_ABI static OperandKind getOperandKind(const Value *Op);
188188

189189
/// Helpers to return the IDs of a given Opcode, TypeID, or OperandKind
190-
static unsigned getNumericID(unsigned Opcode);
191-
static unsigned getNumericID(Type::TypeID TypeID);
192-
static unsigned getNumericID(const Value *Op);
190+
LLVM_ABI static unsigned getNumericID(unsigned Opcode);
191+
LLVM_ABI static unsigned getNumericID(Type::TypeID TypeID);
192+
LLVM_ABI static unsigned getNumericID(const Value *Op);
193193

194194
/// Accessors to get the embedding for a given entity.
195-
const ir2vec::Embedding &operator[](unsigned Opcode) const;
196-
const ir2vec::Embedding &operator[](Type::TypeID TypeId) const;
197-
const ir2vec::Embedding &operator[](const Value *Arg) const;
195+
LLVM_ABI const ir2vec::Embedding &operator[](unsigned Opcode) const;
196+
LLVM_ABI const ir2vec::Embedding &operator[](Type::TypeID TypeId) const;
197+
LLVM_ABI const ir2vec::Embedding &operator[](const Value *Arg) const;
198198

199199
/// Const Iterator type aliases
200200
using const_iterator = VocabVector::const_iterator;
@@ -221,12 +221,12 @@ class Vocabulary {
221221
/// Returns the string key for a given index position in the vocabulary.
222222
/// This is useful for debugging or printing the vocabulary. Do not use this
223223
/// for embedding generation as string based lookups are inefficient.
224-
static StringRef getStringKey(unsigned Pos);
224+
LLVM_ABI static StringRef getStringKey(unsigned Pos);
225225

226226
/// Create a dummy vocabulary for testing purposes.
227-
static VocabVector createDummyVocabForTest(unsigned Dim = 1);
227+
LLVM_ABI static VocabVector createDummyVocabForTest(unsigned Dim = 1);
228228

229-
bool invalidate(Module &M, const PreservedAnalyses &PA,
229+
LLVM_ABI bool invalidate(Module &M, const PreservedAnalyses &PA,
230230
ModuleAnalysisManager::Invalidator &Inv) const;
231231
};
232232

llvm/include/llvm/BinaryFormat/SFrame.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#ifndef LLVM_BINARYFORMAT_SFRAME_H
1616
#define LLVM_BINARYFORMAT_SFRAME_H
1717

18+
#include "llvm/Support/Compiler.h"
1819
#include "llvm/ADT/ArrayRef.h"
1920
#include "llvm/ADT/BitmaskEnum.h"
2021
#include "llvm/Support/DataTypes.h"
@@ -163,9 +164,9 @@ template <endianness E> using FrameRowEntryAddr1 = FrameRowEntry<uint8_t, E>;
163164
template <endianness E> using FrameRowEntryAddr2 = FrameRowEntry<uint16_t, E>;
164165
template <endianness E> using FrameRowEntryAddr4 = FrameRowEntry<uint32_t, E>;
165166

166-
ArrayRef<EnumEntry<Version>> getVersions();
167-
ArrayRef<EnumEntry<Flags>> getFlags();
168-
ArrayRef<EnumEntry<ABI>> getABIs();
167+
LLVM_ABI ArrayRef<EnumEntry<Version>> getVersions();
168+
LLVM_ABI ArrayRef<EnumEntry<Flags>> getFlags();
169+
LLVM_ABI ArrayRef<EnumEntry<ABI>> getABIs();
169170

170171
} // namespace sframe
171172
} // namespace llvm

llvm/include/llvm/CodeGen/GCMetadata.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ class GCFunctionInfo {
101101
// are live per safe point (1.5% on 64-bit hosts).
102102

103103
public:
104-
GCFunctionInfo(const Function &F, GCStrategy &S);
105-
~GCFunctionInfo();
104+
LLVM_ABI GCFunctionInfo(const Function &F, GCStrategy &S);
105+
LLVM_ABI ~GCFunctionInfo();
106106

107107
/// Handle invalidation explicitly.
108-
bool invalidate(Function &F, const PreservedAnalyses &PA,
108+
LLVM_ABI bool invalidate(Function &F, const PreservedAnalyses &PA,
109109
FunctionAnalysisManager::Invalidator &Inv);
110110

111111
/// getFunction - Return the function to which this metadata applies.
@@ -163,7 +163,7 @@ class GCStrategyMap {
163163
GCStrategyMap(GCStrategyMap &&) = default;
164164

165165
/// Handle invalidation explicitly.
166-
bool invalidate(Module &M, const PreservedAnalyses &PA,
166+
LLVM_ABI bool invalidate(Module &M, const PreservedAnalyses &PA,
167167
ModuleAnalysisManager::Invalidator &Inv);
168168

169169
using iterator = MapT::iterator;
@@ -205,7 +205,7 @@ class CollectorMetadataAnalysis
205205

206206
public:
207207
using Result = GCStrategyMap;
208-
Result run(Module &M, ModuleAnalysisManager &MAM);
208+
LLVM_ABI Result run(Module &M, ModuleAnalysisManager &MAM);
209209
};
210210

211211
/// An analysis pass which caches information about the Function.
@@ -217,7 +217,7 @@ class GCFunctionAnalysis : public AnalysisInfoMixin<GCFunctionAnalysis> {
217217

218218
public:
219219
using Result = GCFunctionInfo;
220-
Result run(Function &F, FunctionAnalysisManager &FAM);
220+
LLVM_ABI Result run(Function &F, FunctionAnalysisManager &FAM);
221221
};
222222

223223
/// LowerIntrinsics - This pass rewrites calls to the llvm.gcread or
@@ -228,7 +228,7 @@ class GCFunctionAnalysis : public AnalysisInfoMixin<GCFunctionAnalysis> {
228228
/// This pass requires `CollectorMetadataAnalysis`.
229229
class GCLoweringPass : public PassInfoMixin<GCLoweringPass> {
230230
public:
231-
PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM);
231+
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM);
232232
};
233233

234234
/// An analysis pass which caches information about the entire Module.
@@ -244,7 +244,7 @@ class GCModuleInfo : public ImmutablePass {
244244
/// Lookup the GCStrategy object associated with the given gc name.
245245
/// Objects are owned internally; No caller should attempt to delete the
246246
/// returned objects.
247-
GCStrategy *getGCStrategy(const StringRef Name);
247+
LLVM_ABI GCStrategy *getGCStrategy(const StringRef Name);
248248

249249
/// List of per function info objects. In theory, Each of these
250250
/// may be associated with a different GC.
@@ -265,14 +265,14 @@ class GCModuleInfo : public ImmutablePass {
265265
public:
266266
using iterator = SmallVector<std::unique_ptr<GCStrategy>, 1>::const_iterator;
267267

268-
static char ID;
268+
LLVM_ABI static char ID;
269269

270-
GCModuleInfo();
270+
LLVM_ABI GCModuleInfo();
271271

272272
/// clear - Resets the pass. Any pass, which uses GCModuleInfo, should
273273
/// call it in doFinalization().
274274
///
275-
void clear();
275+
LLVM_ABI void clear();
276276

277277
/// begin/end - Iterators for used strategies.
278278
///
@@ -282,7 +282,7 @@ class GCModuleInfo : public ImmutablePass {
282282
/// get - Look up function metadata. This is currently assumed
283283
/// have the side effect of initializing the associated GCStrategy. That
284284
/// will soon change.
285-
GCFunctionInfo &getFunctionInfo(const Function &F);
285+
LLVM_ABI GCFunctionInfo &getFunctionInfo(const Function &F);
286286
};
287287

288288
} // end namespace llvm

llvm/include/llvm/CodeGen/MachineFunctionAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class MachineFunctionAnalysis
4848

4949
class FreeMachineFunctionPass : public PassInfoMixin<FreeMachineFunctionPass> {
5050
public:
51-
PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM);
51+
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM);
5252
};
5353

5454
} // namespace llvm

llvm/include/llvm/CodeGen/MachineInstrBundle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ LLVM_ABI PhysRegInfo AnalyzePhysRegInBundle(const MachineInstr &MI,
297297

298298
class FinalizeBundleTestPass : public PassInfoMixin<FinalizeBundleTestPass> {
299299
public:
300-
PreservedAnalyses run(MachineFunction &MF,
300+
LLVM_ABI PreservedAnalyses run(MachineFunction &MF,
301301
MachineFunctionAnalysisManager &MFAM);
302302
};
303303

llvm/include/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_EXECUTIONENGINE_ORC_EPCINDIRECTIONUTILS_H
1515
#define LLVM_EXECUTIONENGINE_ORC_EPCINDIRECTIONUTILS_H
1616

17+
#include "llvm/Support/Compiler.h"
1718
#include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"
1819
#include "llvm/ExecutionEngine/Orc/IndirectionUtils.h"
1920
#include "llvm/ExecutionEngine/Orc/LazyReexports.h"
@@ -33,7 +34,7 @@ class EPCIndirectionUtils {
3334
public:
3435
/// ABI support base class. Used to write resolver, stub, and trampoline
3536
/// blocks.
36-
class ABISupport {
37+
class LLVM_ABI ABISupport {
3738
protected:
3839
ABISupport(unsigned PointerSize, unsigned TrampolineSize, unsigned StubSize,
3940
unsigned StubToPointerMaxDisplacement, unsigned ResolverCodeSize)
@@ -81,7 +82,7 @@ class EPCIndirectionUtils {
8182
CreateWithABI(ExecutorProcessControl &EPC);
8283

8384
/// Create based on the ExecutorProcessControl triple.
84-
static Expected<std::unique_ptr<EPCIndirectionUtils>>
85+
LLVM_ABI static Expected<std::unique_ptr<EPCIndirectionUtils>>
8586
Create(ExecutorProcessControl &EPC);
8687

8788
/// Create based on the ExecutorProcessControl triple.
@@ -98,27 +99,27 @@ class EPCIndirectionUtils {
9899

99100
/// Release memory for resources held by this instance. This *must* be called
100101
/// prior to destruction of the class.
101-
Error cleanup();
102+
LLVM_ABI Error cleanup();
102103

103104
/// Write resolver code to the executor process and return its address.
104105
/// This must be called before any call to createTrampolinePool or
105106
/// createLazyCallThroughManager.
106-
Expected<ExecutorAddr> writeResolverBlock(ExecutorAddr ReentryFnAddr,
107+
LLVM_ABI Expected<ExecutorAddr> writeResolverBlock(ExecutorAddr ReentryFnAddr,
107108
ExecutorAddr ReentryCtxAddr);
108109

109110
/// Returns the address of the Resolver block. Returns zero if the
110111
/// writeResolverBlock method has not previously been called.
111112
ExecutorAddr getResolverBlockAddress() const { return ResolverBlockAddr; }
112113

113114
/// Create an IndirectStubsManager for the executor process.
114-
std::unique_ptr<IndirectStubsManager> createIndirectStubsManager();
115+
LLVM_ABI std::unique_ptr<IndirectStubsManager> createIndirectStubsManager();
115116

116117
/// Create a TrampolinePool for the executor process.
117-
TrampolinePool &getTrampolinePool();
118+
LLVM_ABI TrampolinePool &getTrampolinePool();
118119

119120
/// Create a LazyCallThroughManager.
120121
/// This function should only be called once.
121-
LazyCallThroughManager &
122+
LLVM_ABI LazyCallThroughManager &
122123
createLazyCallThroughManager(ExecutionSession &ES,
123124
ExecutorAddr ErrorHandlerAddr);
124125

@@ -170,7 +171,7 @@ class EPCIndirectionUtils {
170171
/// called.
171172
///
172173
/// This function is experimental and likely subject to revision.
173-
Error setUpInProcessLCTMReentryViaEPCIU(EPCIndirectionUtils &EPCIU);
174+
LLVM_ABI Error setUpInProcessLCTMReentryViaEPCIU(EPCIndirectionUtils &EPCIU);
174175

175176
namespace detail {
176177

llvm/include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef LLVM_EXECUTIONENGINE_ORC_SPECULATEANALYSES_H
1414
#define LLVM_EXECUTIONENGINE_ORC_SPECULATEANALYSES_H
1515

16+
#include "llvm/Support/Compiler.h"
1617
#include "llvm/Analysis/BranchProbabilityInfo.h"
1718
#include "llvm/ExecutionEngine/Orc/Core.h"
1819
#include "llvm/ExecutionEngine/Orc/Speculation.h"
@@ -24,8 +25,8 @@ namespace orc {
2425
// Provides common code.
2526
class SpeculateQuery {
2627
protected:
27-
void findCalles(const BasicBlock *, DenseSet<StringRef> &);
28-
bool isStraightLine(const Function &F);
28+
LLVM_ABI void findCalles(const BasicBlock *, DenseSet<StringRef> &);
29+
LLVM_ABI bool isStraightLine(const Function &F);
2930

3031
public:
3132
using ResultTy = std::optional<DenseMap<StringRef, DenseSet<StringRef>>>;
@@ -37,7 +38,7 @@ class BlockFreqQuery : public SpeculateQuery {
3738

3839
public:
3940
// Find likely next executables based on IR Block Frequency
40-
ResultTy operator()(Function &F);
41+
LLVM_ABI ResultTy operator()(Function &F);
4142
};
4243

4344
// This Query generates a sequence of basic blocks which follows the order of
@@ -73,7 +74,7 @@ class SequenceBBQuery : public SpeculateQuery {
7374
VisitedBlocksInfoTy &);
7475

7576
public:
76-
ResultTy operator()(Function &F);
77+
LLVM_ABI ResultTy operator()(Function &F);
7778
};
7879

7980
} // namespace orc

llvm/include/llvm/IR/GCStrategy.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#ifndef LLVM_IR_GCSTRATEGY_H
4848
#define LLVM_IR_GCSTRATEGY_H
4949

50+
#include "llvm/Support/Compiler.h"
5051
#include "llvm/Support/Registry.h"
5152
#include <optional>
5253
#include <string>
@@ -81,7 +82,7 @@ class GCStrategy {
8182
bool UsesMetadata = false; ///< If set, backend must emit metadata tables.
8283

8384
public:
84-
GCStrategy();
85+
LLVM_ABI GCStrategy();
8586
virtual ~GCStrategy() = default;
8687

8788
/// Return the name of the GC strategy. This is the value of the collector
@@ -145,7 +146,7 @@ using GCRegistry = Registry<GCStrategy>;
145146
extern template class LLVM_TEMPLATE_ABI Registry<GCStrategy>;
146147

147148
/// Lookup the GCStrategy object associated with the given gc name.
148-
std::unique_ptr<GCStrategy> getGCStrategy(const StringRef Name);
149+
LLVM_ABI std::unique_ptr<GCStrategy> getGCStrategy(const StringRef Name);
149150

150151
} // end namespace llvm
151152

llvm/include/llvm/IR/RuntimeLibcalls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ struct RuntimeLibcallsInfo {
134134

135135
/// Check if this is valid libcall for the current module, otherwise
136136
/// RTLIB::Unsupported.
137-
RTLIB::LibcallImpl getSupportedLibcallImpl(StringRef FuncName) const;
137+
LLVM_ABI RTLIB::LibcallImpl getSupportedLibcallImpl(StringRef FuncName) const;
138138

139139
private:
140140
static const RTLIB::LibcallImpl

llvm/include/llvm/MC/DXContainerRootSignature.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef LLVM_MC_DXCONTAINERROOTSIGNATURE_H
1010
#define LLVM_MC_DXCONTAINERROOTSIGNATURE_H
1111

12+
#include "llvm/Support/Compiler.h"
1213
#include "llvm/BinaryFormat/DXContainer.h"
1314
#include <cstdint>
1415
#include <limits>
@@ -113,9 +114,9 @@ struct RootSignatureDesc {
113114
mcdxbc::RootParametersContainer ParametersContainer;
114115
SmallVector<dxbc::RTS0::v1::StaticSampler> StaticSamplers;
115116

116-
void write(raw_ostream &OS) const;
117+
LLVM_ABI void write(raw_ostream &OS) const;
117118

118-
size_t getSize() const;
119+
LLVM_ABI size_t getSize() const;
119120
};
120121
} // namespace mcdxbc
121122
} // namespace llvm

0 commit comments

Comments
 (0)