]> granicus.if.org Git - llvm/commit
MemTag: stack initializer merging.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 19 Aug 2019 20:47:09 +0000 (20:47 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 19 Aug 2019 20:47:09 +0000 (20:47 +0000)
commit4b91de2870a72e9ce3eeb55c2096f636a4f7b670
treeaceb1102e778ff90d061e44ff34f5d9cd5c5bcb7
parentdc49f4a5d3cfc950e1b888713833abacb742cc54
MemTag: stack initializer merging.

Summary:
MTE provides instructions to update memory tags and data at the same
time. This change makes use of those to generate more compact code for
stack variable tagging + initialization.

We collect memory store and memset instructions following an alloca or a
lifetime.start call, and replace them with the corresponding MTE
intrinsics. Since the intrinsics work on 16-byte aligned chunks, the
stored values are combined as necessary.

Reviewers: pcc, vitalybuka, ostannard

Subscribers: srhines, javed.absar, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66167

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369297 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64.h
lib/Target/AArch64/AArch64StackTagging.cpp
lib/Target/AArch64/AArch64TargetMachine.cpp
test/CodeGen/AArch64/O3-pipeline.ll
test/CodeGen/AArch64/stack-tagging-initializer-merge.ll [new file with mode: 0644]