Skip to content

Commit 6e93e37

Browse files
committed
[MC] Remove unneeded MC*AsmBackend::fixupNeedsRelaxation overrides
Follow-up to 88c0a82 ("[MC] Make MCAsmBackend::fixupNeedsRelaxation not pure virtual").
1 parent 88c0a82 commit 6e93e37

File tree

5 files changed

+0
-40
lines changed

5 files changed

+0
-40
lines changed

llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ class DXILAsmBackend : public MCAsmBackend {
9292
const MCSubtargetInfo *STI) const override {
9393
return true;
9494
}
95-
96-
bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value,
97-
const MCRelaxableFragment *DF,
98-
const MCAsmLayout &Layout) const override {
99-
return true;
100-
}
10195
};
10296

10397
class DirectXMCAsmInfo : public MCAsmInfo {

llvm/lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ class LanaiAsmBackend : public MCAsmBackend {
5656
std::unique_ptr<MCObjectTargetWriter>
5757
createObjectTargetWriter() const override;
5858

59-
// No instruction requires relaxation
60-
bool fixupNeedsRelaxation(const MCFixup & /*Fixup*/, uint64_t /*Value*/,
61-
const MCRelaxableFragment * /*DF*/,
62-
const MCAsmLayout & /*Layout*/) const override {
63-
return false;
64-
}
65-
6659
const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override;
6760

6861
unsigned getNumFixupKinds() const override {

llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVAsmBackend.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ class SPIRVAsmBackend : public MCAsmBackend {
3030
return createSPIRVObjectTargetWriter();
3131
}
3232

33-
// No instruction requires relaxation.
34-
bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value,
35-
const MCRelaxableFragment *DF,
36-
const MCAsmLayout &Layout) const override {
37-
return false;
38-
}
39-
4033
unsigned getNumFixupKinds() const override { return 1; }
4134

4235
bool mayNeedRelaxation(const MCInst &Inst,

llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -305,16 +305,6 @@ namespace {
305305
}
306306
}
307307

308-
/// fixupNeedsRelaxation - Target specific predicate for whether a given
309-
/// fixup requires the associated instruction to be relaxed.
310-
bool fixupNeedsRelaxation(const MCFixup &Fixup,
311-
uint64_t Value,
312-
const MCRelaxableFragment *DF,
313-
const MCAsmLayout &Layout) const override {
314-
// FIXME.
315-
llvm_unreachable("fixupNeedsRelaxation() unimplemented");
316-
return false;
317-
}
318308
void relaxInstruction(MCInst &Inst,
319309
const MCSubtargetInfo &STI) const override {
320310
// FIXME.

llvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,6 @@ class VEAsmBackend : public MCAsmBackend {
153153
return false;
154154
}
155155

156-
/// fixupNeedsRelaxation - Target specific predicate for whether a given
157-
/// fixup requires the associated instruction to be relaxed.
158-
bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value,
159-
const MCRelaxableFragment *DF,
160-
const MCAsmLayout &Layout) const override {
161-
// Not implemented yet. For example, if we have a branch with
162-
// lager than SIMM32 immediate value, we want to relaxation such
163-
// branch instructions.
164-
return false;
165-
}
166156
void relaxInstruction(MCInst &Inst,
167157
const MCSubtargetInfo &STI) const override {
168158
// Aurora VE doesn't support relaxInstruction yet.

0 commit comments

Comments
 (0)