-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Move MCSymbolRefExpr::VK_AMDGPU_ to AMDGPUMCExpr:: #130006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-backend-amdgpu Author: Fangrui Song (MaskRay)
`MCSymbolRefExpr::VariantKind` isn't ideal for encoding relocation operators because:
Similar issue for VE: #130003 AArch64 is a good model where the
|
I think we shouldn't need any of those relocations in the first place. They duplicate generic relocations, and the only difference is splitting the high and low halves of the final 64-bit address. I think these should be replaced with some kind of expression to extract the low and high bits, but I'm not sure how those work |
There is no such a thing called a "generic relocation". All MCSymbolRefExpr::VariantKind should go away and MCSymbolRefExpr is not an appropriate place to place relocations (think of MCConstantExpr, MCBinaryExpr). |
MCSymbolRefExpr::VariantKind
isn't ideal for encoding relocation operators because:4@l
) and MCBinaryExpr (e.g., PPC(a+1)@l
), also need it@
).MCSymbolRefExpr
offers no target-specific extension point. Any target-specific logic will pollute the generic interface.MCTargetExpr
subclasses, as used by AArch64 and RISC-V, offer a cleaner approach.(MIPS, while also uses
MCTargetExpr
, has significant tech debt.)Ideally, limit
MCTargetExpr
to top-level use to encode one single relocation and avoid its inclusion as a subexpression.AMDMCExpr::VariantKind
is already present. Should just move moreVK_AMDGPU_*
there. @arsenmSimilar issue for VE: #130003
AArch64 is a good model where the
VariantKind
information is incoded asAArch64MCExpr
(derived fromMCTargetExpr
)The text was updated successfully, but these errors were encountered: