[PATCH] D66457: MemTag: unchecked load/store optimization.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 18:33:03 PDT 2019
eugenis created this revision.
eugenis added reviewers: pcc, vitalybuka, ostannard.
Herald added subscribers: hiraditya, kristof.beyls, javed.absar, mgorny.
Herald added a project: LLVM.
MTE allows memory access to bypass tag check iff the address argument
is [SP, #imm]. This change takes advantage of this to demote uses of
tagged addresses to regular FrameIndex operands, reducing register
pressure in large functions.
MO_TAGGED target flag is used to signal that the FrameIndex operand
refers to memory that might be tagged, and needs to be handled with
care. Such operand must be lowered to [SP, #imm] directly, without a
scratch register.
The transformation pass attempts to predict when the offset will be
out of range and disable the optimization.
AArch64RegisterInfo::eliminateFrameIndex has an escape hatch in case
this prediction has been wrong, but it is quite inefficient and should
be avoided.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D66457
Files:
llvm/lib/Target/AArch64/AArch64.h
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/lib/Target/AArch64/CMakeLists.txt
llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
llvm/test/CodeGen/AArch64/O3-pipeline.ll
llvm/test/CodeGen/AArch64/stack-tagging-unchecked-ld-st.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66457.216036.patch
Type: text/x-patch
Size: 17755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190820/a9a49afa/attachment.bin>
More information about the llvm-commits
mailing list