[llvm] Attributor: Do not treat pointer vectors of valid for unsupported attributes (PR #121149)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 26 05:18:29 PST 2024
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/121149
The memory attributes, noalias, and dereferenceable do not support
vectors of pointers according to the IR verifier, so don't report
them as valid.
>From ce583126e84834fe3a48ea91606f650a8ec7f366 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Thu, 26 Dec 2024 20:16:02 +0700
Subject: [PATCH] Attributor: Do not treat pointer vectors of valid for
unsupported attributes
The memory attributes, noalias, and dereferenceable do not support
vectors of pointers according to the IR verifier, so don't report
them as valid.
---
llvm/include/llvm/Transforms/IPO/Attributor.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 8915969f75466c..01082786e22258 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -3853,7 +3853,7 @@ struct AANoAlias
/// See AbstractAttribute::isValidIRPositionForInit
static bool isValidIRPositionForInit(Attributor &A, const IRPosition &IRP) {
- if (!IRP.getAssociatedType()->isPtrOrPtrVectorTy())
+ if (!IRP.getAssociatedType()->isPointerTy())
return false;
return IRAttribute::isValidIRPositionForInit(A, IRP);
}
@@ -4220,7 +4220,7 @@ struct AADereferenceable
/// See AbstractAttribute::isValidIRPositionForInit
static bool isValidIRPositionForInit(Attributor &A, const IRPosition &IRP) {
- if (!IRP.getAssociatedType()->isPtrOrPtrVectorTy())
+ if (!IRP.getAssociatedType()->isPointerTy())
return false;
return IRAttribute::isValidIRPositionForInit(A, IRP);
}
@@ -4364,7 +4364,7 @@ struct AANoCapture
/// See AbstractAttribute::isValidIRPositionForInit
static bool isValidIRPositionForInit(Attributor &A, const IRPosition &IRP) {
- if (!IRP.getAssociatedType()->isPtrOrPtrVectorTy())
+ if (!IRP.getAssociatedType()->isPointerTy())
return false;
return IRAttribute::isValidIRPositionForInit(A, IRP);
}
@@ -4636,7 +4636,7 @@ struct AAMemoryBehavior
/// See AbstractAttribute::isValidIRPositionForInit
static bool isValidIRPositionForInit(Attributor &A, const IRPosition &IRP) {
if (!IRP.isFunctionScope() &&
- !IRP.getAssociatedType()->isPtrOrPtrVectorTy())
+ !IRP.getAssociatedType()->isPointerTy())
return false;
return IRAttribute::isValidIRPositionForInit(A, IRP);
}
More information about the llvm-commits
mailing list