Skip to content

Commit ccf4b8d

Browse files
committed
[llvm] manual fixups to export annotations
1 parent 93561a8 commit ccf4b8d

38 files changed

+386
-327
lines changed

llvm/include/llvm/Analysis/AliasAnalysis.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,14 @@ struct CaptureAnalysis {
160160
/// Context-free CaptureAnalysis provider, which computes and caches whether an
161161
/// object is captured in the function at all, but does not distinguish whether
162162
/// it was captured before or after the context instruction.
163-
class SimpleCaptureAnalysis final : public CaptureAnalysis {
163+
class LLVM_ABI SimpleCaptureAnalysis final : public CaptureAnalysis {
164164
SmallDenseMap<const Value *, bool, 8> IsCapturedCache;
165165

166166
public:
167-
LLVM_ABI bool isNotCapturedBefore(const Value *Object, const Instruction *I,
168-
bool OrAt) override;
167+
~SimpleCaptureAnalysis() = default;
168+
169+
bool isNotCapturedBefore(const Value *Object, const Instruction *I,
170+
bool OrAt) override;
169171
};
170172

171173
/// Context-sensitive CaptureAnalysis provider, which computes and caches the
@@ -189,6 +191,8 @@ class EarliestEscapeAnalysis final : public CaptureAnalysis {
189191
EarliestEscapeAnalysis(DominatorTree &DT, const LoopInfo *LI = nullptr)
190192
: DT(DT), LI(LI) {}
191193

194+
~EarliestEscapeAnalysis() = default;
195+
192196
LLVM_ABI bool isNotCapturedBefore(const Value *Object, const Instruction *I,
193197
bool OrAt) override;
194198

@@ -725,7 +729,7 @@ using AliasAnalysis = AAResults;
725729
/// All of these methods model methods by the same name in the \c
726730
/// AAResults class. Only differences and specifics to how the
727731
/// implementations are called are documented here.
728-
class AAResults::Concept {
732+
class LLVM_ABI AAResults::Concept {
729733
public:
730734
virtual ~Concept() = 0;
731735

@@ -973,7 +977,7 @@ class AAManager : public AnalysisInfoMixin<AAManager> {
973977
private:
974978
friend AnalysisInfoMixin<AAManager>;
975979

976-
static AnalysisKey Key;
980+
LLVM_ABI static AnalysisKey Key;
977981

978982
SmallVector<void (*)(Function &F, FunctionAnalysisManager &AM,
979983
AAResults &AAResults),

llvm/include/llvm/Analysis/AssumptionCache.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ class AssumptionCache {
7070
class AffectedValueCallbackVH final : public CallbackVH {
7171
AssumptionCache *AC;
7272

73-
void deleted() override;
74-
void allUsesReplacedWith(Value *) override;
73+
LLVM_ABI void deleted() override;
74+
LLVM_ABI void allUsesReplacedWith(Value *) override;
7575

7676
public:
7777
using DMI = DenseMapInfo<Value *>;
@@ -102,7 +102,7 @@ class AssumptionCache {
102102
bool Scanned = false;
103103

104104
/// Scan the function for assumptions and add them to the cache.
105-
void scanFunction();
105+
LLVM_ABI void scanFunction();
106106

107107
public:
108108
/// Construct an AssumptionCache from a function by scanning all of
@@ -174,7 +174,7 @@ class AssumptionCache {
174174
class AssumptionAnalysis : public AnalysisInfoMixin<AssumptionAnalysis> {
175175
friend AnalysisInfoMixin<AssumptionAnalysis>;
176176

177-
static AnalysisKey Key;
177+
LLVM_ABI static AnalysisKey Key;
178178

179179
public:
180180
using Result = AssumptionCache;

llvm/include/llvm/Analysis/BlockFrequencyInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class BlockFrequencyAnalysis
120120
: public AnalysisInfoMixin<BlockFrequencyAnalysis> {
121121
friend AnalysisInfoMixin<BlockFrequencyAnalysis>;
122122

123-
static AnalysisKey Key;
123+
LLVM_ABI static AnalysisKey Key;
124124

125125
public:
126126
/// Provide the result type for this analysis pass.

llvm/include/llvm/Analysis/BranchProbabilityInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class BranchProbabilityAnalysis
428428
: public AnalysisInfoMixin<BranchProbabilityAnalysis> {
429429
friend AnalysisInfoMixin<BranchProbabilityAnalysis>;
430430

431-
static AnalysisKey Key;
431+
LLVM_ABI static AnalysisKey Key;
432432

433433
public:
434434
/// Provide the result type for this analysis pass.

llvm/include/llvm/Analysis/CGSCCPassManager.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,10 @@ class Module;
109109
#define DEBUG_TYPE "cgscc"
110110

111111
/// Extern template declaration for the analysis set for this IR unit.
112-
extern template class AllAnalysesOn<LazyCallGraph::SCC>;
112+
extern template class LLVM_TEMPLATE_ABI AllAnalysesOn<LazyCallGraph::SCC>;
113113

114-
extern template class AnalysisManager<LazyCallGraph::SCC, LazyCallGraph &>;
114+
extern template class LLVM_TEMPLATE_ABI
115+
AnalysisManager<LazyCallGraph::SCC, LazyCallGraph &>;
115116

116117
/// The CGSCC analysis manager.
117118
///
@@ -204,9 +205,10 @@ CGSCCAnalysisManagerModuleProxy::run(Module &M, ModuleAnalysisManager &AM);
204205

205206
// Ensure the \c CGSCCAnalysisManagerModuleProxy is provided as an extern
206207
// template.
207-
extern template class InnerAnalysisManagerProxy<CGSCCAnalysisManager, Module>;
208+
extern template class LLVM_TEMPLATE_ABI
209+
InnerAnalysisManagerProxy<CGSCCAnalysisManager, Module>;
208210

209-
extern template class OuterAnalysisManagerProxy<
211+
extern template class LLVM_TEMPLATE_ABI OuterAnalysisManagerProxy<
210212
ModuleAnalysisManager, LazyCallGraph::SCC, LazyCallGraph &>;
211213

212214
/// A proxy from a \c ModuleAnalysisManager to an \c SCC.
@@ -403,10 +405,11 @@ class FunctionAnalysisManagerCGSCCProxy
403405
private:
404406
friend AnalysisInfoMixin<FunctionAnalysisManagerCGSCCProxy>;
405407

406-
static AnalysisKey Key;
408+
LLVM_ABI static AnalysisKey Key;
407409
};
408410

409-
extern template class OuterAnalysisManagerProxy<CGSCCAnalysisManager, Function>;
411+
extern template class LLVM_TEMPLATE_ABI
412+
OuterAnalysisManagerProxy<CGSCCAnalysisManager, Function>;
410413

411414
/// A proxy from a \c CGSCCAnalysisManager to a \c Function.
412415
using CGSCCAnalysisManagerFunctionProxy =

llvm/include/llvm/Analysis/DomTreeUpdater.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@
2323

2424
namespace llvm {
2525

26+
class DomTreeUpdater;
2627
class PostDominatorTree;
2728

29+
extern template class LLVM_TEMPLATE_ABI
30+
GenericDomTreeUpdater<DomTreeUpdater, DominatorTree, PostDominatorTree>;
31+
2832
class DomTreeUpdater
2933
: public GenericDomTreeUpdater<DomTreeUpdater, DominatorTree,
3034
PostDominatorTree> {
@@ -114,17 +118,14 @@ class DomTreeUpdater
114118
bool forceFlushDeletedBB();
115119
};
116120

117-
extern template class GenericDomTreeUpdater<DomTreeUpdater, DominatorTree,
118-
PostDominatorTree>;
119-
120-
extern template void
121+
extern template LLVM_TEMPLATE_ABI void
121122
GenericDomTreeUpdater<DomTreeUpdater, DominatorTree,
122123
PostDominatorTree>::recalculate(Function &F);
123124

124-
extern template void
125+
extern template LLVM_TEMPLATE_ABI void
125126
GenericDomTreeUpdater<DomTreeUpdater, DominatorTree, PostDominatorTree>::
126127
applyUpdatesImpl</*IsForward=*/true>();
127-
extern template void
128+
extern template LLVM_TEMPLATE_ABI void
128129
GenericDomTreeUpdater<DomTreeUpdater, DominatorTree, PostDominatorTree>::
129130
applyUpdatesImpl</*IsForward=*/false>();
130131
} // namespace llvm

llvm/include/llvm/Analysis/EphemeralValuesCache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class EphemeralValuesCache {
3131
AssumptionCache &AC;
3232
bool Collected = false;
3333

34-
void collectEphemeralValues();
34+
LLVM_ABI void collectEphemeralValues();
3535

3636
public:
3737
EphemeralValuesCache(Function &F, AssumptionCache &AC) : F(F), AC(AC) {}

llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,9 @@ class FunctionPropertiesUpdater {
186186
BasicBlock &CallSiteBB;
187187
Function &Caller;
188188

189-
static bool isUpdateValid(Function &F, const FunctionPropertiesInfo &FPI,
190-
FunctionAnalysisManager &FAM);
189+
LLVM_ABI static bool isUpdateValid(Function &F,
190+
const FunctionPropertiesInfo &FPI,
191+
FunctionAnalysisManager &FAM);
191192

192193
DominatorTree &getUpdatedDominatorTree(FunctionAnalysisManager &FAM) const;
193194

llvm/include/llvm/Analysis/GlobalsModRef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class GlobalsAAResult : public AAResultBase {
130130
/// Analysis pass providing a never-invalidated alias analysis result.
131131
class GlobalsAA : public AnalysisInfoMixin<GlobalsAA> {
132132
friend AnalysisInfoMixin<GlobalsAA>;
133-
static AnalysisKey Key;
133+
LLVM_ABI static AnalysisKey Key;
134134

135135
public:
136136
typedef GlobalsAAResult Result;

llvm/include/llvm/Analysis/IVDescriptors.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ class InductionDescriptor {
412412

413413
private:
414414
/// Private constructor - used by \c isInductionPHI.
415-
InductionDescriptor(Value *Start, InductionKind K, const SCEV *Step,
416-
BinaryOperator *InductionBinOp = nullptr,
417-
SmallVectorImpl<Instruction *> *Casts = nullptr);
415+
LLVM_ABI InductionDescriptor(Value *Start, InductionKind K, const SCEV *Step,
416+
BinaryOperator *InductionBinOp = nullptr,
417+
SmallVectorImpl<Instruction *> *Casts = nullptr);
418418

419419
/// Start value.
420420
TrackingVH<Value> StartValue;

llvm/include/llvm/Analysis/InlineAdvisor.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class InlineAdvice {
137137
assert(!Recorded && "Recording should happen exactly once");
138138
Recorded = true;
139139
}
140-
void recordInlineStatsIfNeeded();
140+
LLVM_ABI void recordInlineStatsIfNeeded();
141141

142142
bool Recorded = false;
143143
};
@@ -151,9 +151,10 @@ class DefaultInlineAdvice : public InlineAdvice {
151151
OIC(OIC), EmitRemarks(EmitRemarks) {}
152152

153153
private:
154-
void recordUnsuccessfulInliningImpl(const InlineResult &Result) override;
155-
void recordInliningWithCalleeDeletedImpl() override;
156-
void recordInliningImpl() override;
154+
LLVM_ABI void
155+
recordUnsuccessfulInliningImpl(const InlineResult &Result) override;
156+
LLVM_ABI void recordInliningWithCalleeDeletedImpl() override;
157+
LLVM_ABI void recordInliningImpl() override;
157158

158159
private:
159160
CallBase *const OriginalCB;
@@ -235,7 +236,7 @@ class DefaultInlineAdvisor : public InlineAdvisor {
235236
: InlineAdvisor(M, FAM, IC), Params(Params) {}
236237

237238
private:
238-
std::unique_ptr<InlineAdvice> getAdviceImpl(CallBase &CB) override;
239+
LLVM_ABI std::unique_ptr<InlineAdvice> getAdviceImpl(CallBase &CB) override;
239240

240241
InlineParams Params;
241242
};

llvm/include/llvm/Analysis/InstSimplifyFolder.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@
2525
#include "llvm/IR/CmpPredicate.h"
2626
#include "llvm/IR/IRBuilderFolder.h"
2727
#include "llvm/IR/Instruction.h"
28+
#include "llvm/Support/Compiler.h"
2829

2930
namespace llvm {
3031
class Constant;
3132

3233
/// InstSimplifyFolder - Use InstructionSimplify to fold operations to existing
3334
/// values. Also applies target-specific constant folding when not using
3435
/// InstructionSimplify.
35-
class InstSimplifyFolder final : public IRBuilderFolder {
36+
class LLVM_ABI InstSimplifyFolder final : public IRBuilderFolder {
3637
TargetFolder ConstFolder;
3738
SimplifyQuery SQ;
3839

llvm/include/llvm/Analysis/LastRunTrackingAnalysis.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
#include "llvm/ADT/DenseMap.h"
3434
#include "llvm/IR/PassManager.h"
35+
#include "llvm/Support/Compiler.h"
3536
#include <functional>
3637

3738
namespace llvm {
@@ -80,8 +81,9 @@ class LastRunTrackingInfo {
8081
}
8182

8283
private:
83-
bool shouldSkipImpl(PassID ID, OptionPtr Ptr) const;
84-
void updateImpl(PassID ID, bool Changed, CompatibilityCheckFn CheckFn);
84+
LLVM_ABI bool shouldSkipImpl(PassID ID, OptionPtr Ptr) const;
85+
LLVM_ABI void updateImpl(PassID ID, bool Changed,
86+
CompatibilityCheckFn CheckFn);
8587

8688
DenseMap<PassID, CompatibilityCheckFn> TrackedPasses;
8789
};
@@ -90,7 +92,7 @@ class LastRunTrackingInfo {
9092
class LastRunTrackingAnalysis final
9193
: public AnalysisInfoMixin<LastRunTrackingAnalysis> {
9294
friend AnalysisInfoMixin<LastRunTrackingAnalysis>;
93-
static AnalysisKey Key;
95+
LLVM_ABI static AnalysisKey Key;
9496

9597
public:
9698
using Result = LastRunTrackingInfo;

0 commit comments

Comments
 (0)