[llvm] [MTE] Do not allow local aliases to MTE globals (PR #106280)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 12:53:35 PDT 2024
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/106280
None
>From 139c6107ae9422826cf85e00c9c4551e3dfa1ac9 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Tue, 27 Aug 2024 12:53:18 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.4
---
llvm/lib/IR/Globals.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp
index 2bc69cdb712b0a..6b502a08b87d08 100644
--- a/llvm/lib/IR/Globals.cpp
+++ b/llvm/lib/IR/Globals.cpp
@@ -110,6 +110,10 @@ bool GlobalValue::isInterposable() const {
}
bool GlobalValue::canBenefitFromLocalAlias() const {
+ if (isTagged()) {
+ // Cannot create local aliases to MTE tagged globals.
+ return false;
+ }
// See AsmPrinter::getSymbolPreferLocal(). For a deduplicate comdat kind,
// references to a discarded local symbol from outside the group are not
// allowed, so avoid the local alias.
More information about the llvm-commits
mailing list