Skip to content

Commit abb0c21

Browse files
committed
auto-annotate with IDS
1 parent 90e632e commit abb0c21

File tree

10 files changed

+44
-39
lines changed

10 files changed

+44
-39
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/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/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/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/MCAssembler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class MCAssembler {
209209

210210
LLVM_ABI bool registerSection(MCSection &Section);
211211
LLVM_ABI bool registerSymbol(const MCSymbol &Symbol);
212-
void addRelocDirective(RelocDirective RD);
212+
LLVM_ABI void addRelocDirective(RelocDirective RD);
213213

214214
LLVM_ABI void reportError(SMLoc L, const Twine &Msg) const;
215215
// Record pending errors during layout iteration, as they may go away once the

llvm/include/llvm/MC/MCSection.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class MCFragment {
378378
.slice(ContentStart, ContentEnd - ContentStart);
379379
}
380380

381-
void setVarContents(ArrayRef<char> Contents);
381+
LLVM_ABI void setVarContents(ArrayRef<char> Contents);
382382
void clearVarContents() { setVarContents({}); }
383383
MutableArrayRef<char> getVarContents() {
384384
return MutableArrayRef(getParent()->ContentStorage)
@@ -411,7 +411,7 @@ class MCFragment {
411411

412412
// Source fixup offsets are relative to the variable part's start.
413413
// Stored fixup offsets are relative to the fixed part's start.
414-
void setVarFixups(ArrayRef<MCFixup> Fixups);
414+
LLVM_ABI void setVarFixups(ArrayRef<MCFixup> Fixups);
415415
void clearVarFixups() { setVarFixups({}); }
416416
MutableArrayRef<MCFixup> getVarFixups() {
417417
return MutableArrayRef(getParent()->FixupStorage)

llvm/include/llvm/Transforms/Scalar/Reassociate.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#ifndef LLVM_TRANSFORMS_SCALAR_REASSOCIATE_H
2323
#define LLVM_TRANSFORMS_SCALAR_REASSOCIATE_H
2424

25+
#include "llvm/Support/Compiler.h"
2526
#include "llvm/ADT/DenseMap.h"
2627
#include "llvm/ADT/PostOrderIterator.h"
2728
#include "llvm/ADT/SetVector.h"
@@ -96,7 +97,7 @@ class ReassociatePass : public PassInfoMixin<ReassociatePass> {
9697
bool MadeChange;
9798

9899
public:
99-
PreservedAnalyses run(Function &F, FunctionAnalysisManager &);
100+
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &);
100101

101102
private:
102103
void BuildRankMap(Function &F, ReversePostOrderTraversal<Function *> &RPOT);

llvm/include/llvm/Transforms/Utils/Mem2Reg.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_TRANSFORMS_UTILS_MEM2REG_H
1515
#define LLVM_TRANSFORMS_UTILS_MEM2REG_H
1616

17+
#include "llvm/Support/Compiler.h"
1718
#include "llvm/IR/PassManager.h"
1819

1920
namespace llvm {
@@ -22,7 +23,7 @@ class Function;
2223

2324
class PromotePass : public PassInfoMixin<PromotePass> {
2425
public:
25-
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
26+
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
2627
};
2728

2829
} // end namespace llvm

0 commit comments

Comments
 (0)