Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions llvm/include/llvm-c/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -3908,31 +3908,33 @@ LLVMGetPreviousDbgRecord(LLVMDbgRecordRef DbgRecord);
*
* @see llvm::DbgRecord::getDebugLoc()
*/
LLVMMetadataRef LLVMDbgRecordGetDebugLoc(LLVMDbgRecordRef Rec);
LLVM_C_ABI LLVMMetadataRef LLVMDbgRecordGetDebugLoc(LLVMDbgRecordRef Rec);

LLVMDbgRecordKind LLVMDbgRecordGetKind(LLVMDbgRecordRef Rec);
LLVM_C_ABI LLVMDbgRecordKind LLVMDbgRecordGetKind(LLVMDbgRecordRef Rec);

/**
* Get the value of the DbgVariableRecord.
*
* @see llvm::DbgVariableRecord::getValue()
*/
LLVMValueRef LLVMDbgVariableRecordGetValue(LLVMDbgRecordRef Rec,
unsigned OpIdx);
LLVM_C_ABI LLVMValueRef LLVMDbgVariableRecordGetValue(LLVMDbgRecordRef Rec,
unsigned OpIdx);

/**
* Get the debug info variable of the DbgVariableRecord.
*
* @see llvm::DbgVariableRecord::getVariable()
*/
LLVMMetadataRef LLVMDbgVariableRecordGetVariable(LLVMDbgRecordRef Rec);
LLVM_C_ABI LLVMMetadataRef
LLVMDbgVariableRecordGetVariable(LLVMDbgRecordRef Rec);

/**
* Get the debug info expression of the DbgVariableRecord.
*
* @see llvm::DbgVariableRecord::getExpression()
*/
LLVMMetadataRef LLVMDbgVariableRecordGetExpression(LLVMDbgRecordRef Rec);
LLVM_C_ABI LLVMMetadataRef
LLVMDbgVariableRecordGetExpression(LLVMDbgRecordRef Rec);

/**
* @defgroup LLVMCCoreValueInstructionCall Call Sites and Invocations
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Analysis/RuntimeLibcallInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace llvm {

class LLVM_ABI RuntimeLibraryAnalysis
class RuntimeLibraryAnalysis
: public AnalysisInfoMixin<RuntimeLibraryAnalysis> {
public:
using Result = RTLIB::RuntimeLibcallsInfo;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CAS/ActionCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CacheKey {
public:
StringRef getKey() const { return Key; }

CacheKey(const CASID &ID);
LLVM_ABI CacheKey(const CASID &ID);
LLVM_ABI_FOR_TEST CacheKey(const ObjectProxy &Proxy);
CacheKey(const ObjectStore &CAS, const ObjectRef &Ref);

Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/CAS/BuiltinUnifiedCASDatabases.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ enum class ValidationResult {
/// was invalid but has been cleared, \c Skipped if validation is not needed,
/// or an \c Error if validation cannot be performed or if the data is left
/// in an invalid state because \p AllowRecovery is false.
LLVM_ABI
Expected<ValidationResult> validateOnDiskUnifiedCASDatabasesIfNeeded(
StringRef Path, bool CheckHash, bool AllowRecovery, bool ForceValidation,
std::optional<StringRef> LLVMCasBinaryPath);
Expand Down
3 changes: 2 additions & 1 deletion llvm/include/llvm/CAS/ObjectStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ class ObjectStore {

/// Import object from another CAS. This will import the full tree from the
/// other CAS.
Expected<ObjectRef> importObject(ObjectStore &Upstream, ObjectRef Other);
LLVM_ABI Expected<ObjectRef> importObject(ObjectStore &Upstream,
ObjectRef Other);

/// Print the ObjectStore internals for debugging purpose.
virtual void print(raw_ostream &) const {}
Expand Down
6 changes: 3 additions & 3 deletions llvm/include/llvm/IR/RuntimeLibcalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct RuntimeLibcallsInfo {

RuntimeLibcallsInfo() = default;

explicit RuntimeLibcallsInfo(
LLVM_ABI explicit RuntimeLibcallsInfo(
const Triple &TT,
ExceptionHandling ExceptionModel = ExceptionHandling::None,
FloatABI::ABIType FloatABI = FloatABI::Default,
Expand All @@ -89,8 +89,8 @@ struct RuntimeLibcallsInfo {

explicit RuntimeLibcallsInfo(const Module &M);

bool invalidate(Module &M, const PreservedAnalyses &PA,
ModuleAnalysisManager::Invalidator &);
LLVM_ABI bool invalidate(Module &M, const PreservedAnalyses &PA,
ModuleAnalysisManager::Invalidator &);

/// Get the libcall routine name for the specified libcall implementation.
static StringRef getLibcallImplName(RTLIB::LibcallImpl CallImpl) {
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/SandboxIR/Instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -1901,8 +1901,8 @@ class SwitchInst : public SingleLLVMInstructionImpl<llvm::SwitchInst> {
public:
CaseHandleImpl(Context &Ctx, LLVMCaseItT LLVMCaseIt)
: Ctx(Ctx), LLVMCaseIt(LLVMCaseIt) {}
ConstT *getCaseValue() const;
BlockT *getCaseSuccessor() const;
LLVM_ABI_FOR_TEST ConstT *getCaseValue() const;
LLVM_ABI_FOR_TEST BlockT *getCaseSuccessor() const;
unsigned getCaseIndex() const {
const auto &LLVMCaseHandle = *LLVMCaseIt;
return LLVMCaseHandle.getCaseIndex();
Expand Down
44 changes: 22 additions & 22 deletions llvm/lib/Transforms/Vectorize/VPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ class VPIRFlags {

#if !defined(NDEBUG)
/// Returns true if the set flags are valid for \p Opcode.
bool flagsValidForOpcode(unsigned Opcode) const;
LLVM_ABI_FOR_TEST bool flagsValidForOpcode(unsigned Opcode) const;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? flagsValidForOpcode isn't used for llvm/unittests, I thought that LLVM_ABI_FOR_TEST was needed for function called from there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call is happening in the inline constructor for VPWidenCastRecipe here. In the test code, this happens in this test.

#endif

#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
Expand Down Expand Up @@ -1533,11 +1533,11 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags, public VPIRMetadata {
VP_CLASSOF_IMPL(VPDef::VPWidenCastSC)

/// Produce widened copies of the cast.
void execute(VPTransformState &State) override;
LLVM_ABI_FOR_TEST void execute(VPTransformState &State) override;

/// Return the cost of this VPWidenCastRecipe.
InstructionCost computeCost(ElementCount VF,
VPCostContext &Ctx) const override;
LLVM_ABI_FOR_TEST InstructionCost
computeCost(ElementCount VF, VPCostContext &Ctx) const override;

Instruction::CastOps getOpcode() const { return Opcode; }

Expand All @@ -1547,8 +1547,8 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags, public VPIRMetadata {
protected:
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Print the recipe.
void printRecipe(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const override;
LLVM_ABI_FOR_TEST void printRecipe(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const override;
#endif
};

Expand Down Expand Up @@ -1617,11 +1617,11 @@ class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags, public VPIRMetadata {
VP_CLASSOF_IMPL(VPDef::VPWidenIntrinsicSC)

/// Produce a widened version of the vector intrinsic.
void execute(VPTransformState &State) override;
LLVM_ABI_FOR_TEST void execute(VPTransformState &State) override;

/// Return the cost of this vector intrinsic.
InstructionCost computeCost(ElementCount VF,
VPCostContext &Ctx) const override;
LLVM_ABI_FOR_TEST InstructionCost
computeCost(ElementCount VF, VPCostContext &Ctx) const override;

/// Return the ID of the intrinsic.
Intrinsic::ID getVectorIntrinsicID() const { return VectorIntrinsicID; }
Expand All @@ -1641,13 +1641,13 @@ class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags, public VPIRMetadata {
/// Returns true if the intrinsic may have side-effects.
bool mayHaveSideEffects() const { return MayHaveSideEffects; }

bool usesFirstLaneOnly(const VPValue *Op) const override;
LLVM_ABI_FOR_TEST bool usesFirstLaneOnly(const VPValue *Op) const override;

protected:
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Print the recipe.
void printRecipe(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const override;
LLVM_ABI_FOR_TEST void printRecipe(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const override;
#endif
};

Expand Down Expand Up @@ -3376,11 +3376,11 @@ struct VPWidenLoadEVLRecipe final : public VPWidenMemoryRecipe, public VPValue {
VPValue *getEVL() const { return getOperand(1); }

/// Generate the wide load or gather.
void execute(VPTransformState &State) override;
LLVM_ABI_FOR_TEST void execute(VPTransformState &State) override;

/// Return the cost of this VPWidenLoadEVLRecipe.
InstructionCost computeCost(ElementCount VF,
VPCostContext &Ctx) const override;
LLVM_ABI_FOR_TEST InstructionCost
computeCost(ElementCount VF, VPCostContext &Ctx) const override;

/// Returns true if the recipe only uses the first lane of operand \p Op.
bool usesFirstLaneOnly(const VPValue *Op) const override {
Expand All @@ -3394,8 +3394,8 @@ struct VPWidenLoadEVLRecipe final : public VPWidenMemoryRecipe, public VPValue {
protected:
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Print the recipe.
void printRecipe(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const override;
LLVM_ABI_FOR_TEST void printRecipe(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const override;
#endif
};

Expand Down Expand Up @@ -3462,11 +3462,11 @@ struct VPWidenStoreEVLRecipe final : public VPWidenMemoryRecipe {
VPValue *getEVL() const { return getOperand(2); }

/// Generate the wide store or scatter.
void execute(VPTransformState &State) override;
LLVM_ABI_FOR_TEST void execute(VPTransformState &State) override;

/// Return the cost of this VPWidenStoreEVLRecipe.
InstructionCost computeCost(ElementCount VF,
VPCostContext &Ctx) const override;
LLVM_ABI_FOR_TEST InstructionCost
computeCost(ElementCount VF, VPCostContext &Ctx) const override;

/// Returns true if the recipe only uses the first lane of operand \p Op.
bool usesFirstLaneOnly(const VPValue *Op) const override {
Expand All @@ -3485,8 +3485,8 @@ struct VPWidenStoreEVLRecipe final : public VPWidenMemoryRecipe {
protected:
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// Print the recipe.
void printRecipe(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const override;
LLVM_ABI_FOR_TEST void printRecipe(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const override;
#endif
};

Expand Down