[llvm-branch-commits] [llvm] [MTE] add stack frame history buffer (PR #86356)
Evgenii Stepanov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon May 20 11:04:55 PDT 2024
================
@@ -2497,7 +2497,8 @@ AArch64FrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
return resolveFrameIndexReference(
MF, FI, FrameReg,
/*PreferFP=*/
- MF.getFunction().hasFnAttribute(Attribute::SanitizeHWAddress),
+ MF.getFunction().hasFnAttribute(Attribute::SanitizeHWAddress) ||
+ MF.getFunction().hasFnAttribute(Attribute::SanitizeMemTag),
/*ForSimm=*/false);
----------------
eugenis wrote:
So this will cause most of the local references to use FP, but our "base tagged pointer" is SP-based (see the aarch64_irg_sp intrinsic). Would not that pessimize the codegen a lot? Please check that nothing stupid is happening in the backend.
There is a bunch of relevant tests under test/CodeGen/AArch64/stack-tagging-*
https://github.com/llvm/llvm-project/pull/86356
More information about the llvm-branch-commits
mailing list