[all-commits] [llvm/llvm-project] 38c3ad: Define MCAsmBackend::shouldForceRelocation
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sat Apr 5 19:01:39 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 38c3ad36be1facbe6db2dede7e93c0f12fb4e1dc
https://github.com/llvm/llvm-project/commit/38c3ad36be1facbe6db2dede7e93c0f12fb4e1dc
Author: Fangrui Song <i at maskray.me>
Date: 2025-04-05 (Sat, 05 Apr 2025)
Changed paths:
M llvm/include/llvm/MC/MCAsmBackend.h
M llvm/lib/MC/MCAsmBackend.cpp
Log Message:
-----------
Define MCAsmBackend::shouldForceRelocation
Return true if the MCValue has a specifier. When a relocation specifier
is specified, GNU Assembler will generate a relocation unless the
specifier can be optimized due to target-specific reasons (e.g. PPC `@l`
`@ha`).
This reduces targets' reliance on a MCAssembler::evaluateFixup hack
`if (Target.SymSpecifier || SA.isUndefined()) {`, previosuly
`if (A->getKind() != MCSymbolRefExpr::VK_None || SA.isUndefined()) {`
llvm/test/MC/SystemZ/fixups.s is known to rely on this hack.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list