[PATCH] D72365: [MTE] Pin the tagged base pointer to one of the stack slots.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 15:04:50 PST 2020


eugenis created this revision.
eugenis added reviewers: ostannard, pcc.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

Pin the tagged base pointer to one of the stack slots, and (if
necessary) rewrite tag offsets so that an object that occupies that
slot has both address and tag offsets of 0. This allows ADDG
instructions for that object to be eliminated and their uses replaced
with the tagged base pointer itself.

This optimization must be done in machine instructions and not in the IR
instrumentation pass, because referring to a stack slot through an IRG
pointer would confuse the stack coloring pass.

The optimization makes a (pretty naive) attempt to find the slot that
would benefit the most by counting the uses of stack slots in the
function.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72365

Files:
  llvm/include/llvm/IR/IntrinsicsAArch64.td
  llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
  llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
  llvm/test/CodeGen/AArch64/irg_sp_tagp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72365.236696.patch
Type: text/x-patch
Size: 13818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200107/2f5cb510/attachment-0001.bin>


More information about the llvm-commits mailing list