[llvm] 9d3ce55 - [MC] Fix HIP buildbot errors after 68472a3 (#141138)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 22 14:03:31 PDT 2025
Author: Jan Patrick Lehr
Date: 2025-05-22T23:03:27+02:00
New Revision: 9d3ce552618da9630c29c5ff5f034f56cc6fd747
URL: https://github.com/llvm/llvm-project/commit/9d3ce552618da9630c29c5ff5f034f56cc6fd747
DIFF: https://github.com/llvm/llvm-project/commit/9d3ce552618da9630c29c5ff5f034f56cc6fd747.diff
LOG: [MC] Fix HIP buildbot errors after 68472a3 (#141138)
This fixes the errors on our HIP-Kokkos buildbot after
68472a39a0fbf38f5da7bb4ebe43e2ca87ff8308.
Added:
Modified:
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
index 19e394e5bc38c..0c98c32c21c2c 100644
--- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
+++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
@@ -18,6 +18,7 @@
#include "llvm/MC/MCFixupKindInfo.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSubtargetInfo.h"
+#include "llvm/MC/MCValue.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/TargetParser/TargetParser.h"
@@ -51,6 +52,8 @@ class AMDGPUAsmBackend : public MCAsmBackend {
std::optional<MCFixupKind> getFixupKind(StringRef Name) const override;
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
+ bool shouldForceRelocation(const MCAssembler &, const MCFixup &,
+ const MCValue &, const MCSubtargetInfo *) override;
};
} //End anonymous namespace
@@ -189,6 +192,13 @@ MCFixupKindInfo AMDGPUAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
return Infos[Kind - FirstTargetFixupKind];
}
+bool AMDGPUAsmBackend::shouldForceRelocation(const MCAssembler &,
+ const MCFixup &,
+ const MCValue &Target,
+ const MCSubtargetInfo *) {
+ return Target.getSpecifier();
+}
+
unsigned AMDGPUAsmBackend::getMinimumNopSize() const {
return 4;
}
More information about the llvm-commits
mailing list