[all-commits] [llvm/llvm-project] 431a5d: [x86] Implement a tagged-globals backend feature.
Matt Morehouse via All-commits
all-commits at lists.llvm.org
Mon Oct 18 13:31:41 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 431a5d8411952b4c9c2185303afd703123ef55cc
https://github.com/llvm/llvm-project/commit/431a5d8411952b4c9c2185303afd703123ef55cc
Author: Matt Morehouse <mascasa at google.com>
Date: 2021-10-18 (Mon, 18 Oct 2021)
Changed paths:
M llvm/lib/Target/X86/X86.td
M llvm/lib/Target/X86/X86Subtarget.cpp
M llvm/lib/Target/X86/X86Subtarget.h
A llvm/test/CodeGen/X86/tagged-globals-pic.ll
A llvm/test/CodeGen/X86/tagged-globals-static.ll
Log Message:
-----------
[x86] Implement a tagged-globals backend feature.
The feature tells the backend to allow tags in the upper bits of global
variable addresses. These tags will be ignored by upcoming CPUs with
the Intel LAM feature but may be used in instrumentation passes (e.g.,
HWASan).
This patch implements the feature by using @GOTPCREL relocations instead
of direct references to the locally defined global. Thus the full
tagged address can be loaded by a single instruction:
movq global at GOTPCREL(%rip), %rax
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D111343
More information about the All-commits
mailing list