[llvm] c8c0197 - AArch64: Use AsmPrinter's MachineFunction in lowerSymbolOperandELF (#219475)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 30 14:14:03 PDT 2026
Author: Matt Arsenault
Date: 2026-08-30T23:13:58+02:00
New Revision: c8c01974b33aea1639ff130cf5fe0f1cb4d51cb3
URL: https://github.com/llvm/llvm-project/commit/c8c01974b33aea1639ff130cf5fe0f1cb4d51cb3
DIFF: https://github.com/llvm/llvm-project/commit/c8c01974b33aea1639ff130cf5fe0f1cb4d51cb3.diff
LOG: AArch64: Use AsmPrinter's MachineFunction in lowerSymbolOperandELF (#219475)
Added:
Modified:
llvm/lib/Target/AArch64/AArch64MCInstLower.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp b/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp
index d3a38624488e8..8a263b266e6ee 100644
--- a/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp
+++ b/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp
@@ -184,14 +184,14 @@ MCOperand AArch64MCInstLower::lowerSymbolOperandELF(const MachineOperand &MO,
uint32_t RefFlags = 0;
if (MO.getTargetFlags() & AArch64II::MO_GOT) {
- const MachineFunction *MF = MO.getParent()->getParent()->getParent();
+ const MachineFunction *MF = Printer.MF;
RefFlags |= (MF->getInfo<AArch64FunctionInfo>()->hasELFSignedGOT()
? AArch64::S_GOT_AUTH
: AArch64::S_GOT);
} else if (MO.getTargetFlags() & AArch64II::MO_TLS) {
TLSModel::Model Model;
if (MO.isGlobal()) {
- const MachineFunction *MF = MO.getParent()->getParent()->getParent();
+ const MachineFunction *MF = Printer.MF;
if (MF->getInfo<AArch64FunctionInfo>()->hasELFSignedGOT()) {
Model = TLSModel::GeneralDynamic;
} else {
@@ -224,7 +224,7 @@ MCOperand AArch64MCInstLower::lowerSymbolOperandELF(const MachineOperand &MO,
// running hasELFSignedGOT() every time, but existing flags already
// cover all 12 bits of SubReg_TargetFlags field in MachineOperand, and
// making the field wider breaks static assertions.
- const MachineFunction *MF = MO.getParent()->getParent()->getParent();
+ const MachineFunction *MF = Printer.MF;
RefFlags |= MF->getInfo<AArch64FunctionInfo>()->hasELFSignedGOT()
? AArch64::S_TLSDESC_AUTH
: AArch64::S_TLSDESC;
More information about the llvm-commits
mailing list