From b7e51b4f139ec18c498c818c6bcaa5a842cea83c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 16 Sep 2024 10:23:41 +0200 Subject: [IPSCCP] Infer attributes on arguments (#107114) During inter-procedural SCCP, also infer attributes on arguments, not just return values. This allows other non-interprocedural passes to make use of the information later. --- llvm/lib/IR/Function.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/IR/Function.cpp') diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 82ff4e1..8767c29 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -765,6 +765,11 @@ Attribute Function::getAttributeAtIndex(unsigned i, StringRef Kind) const { return AttributeSets.getAttributeAtIndex(i, Kind); } +bool Function::hasAttributeAtIndex(unsigned Idx, + Attribute::AttrKind Kind) const { + return AttributeSets.hasAttributeAtIndex(Idx, Kind); +} + Attribute Function::getFnAttribute(Attribute::AttrKind Kind) const { return AttributeSets.getFnAttr(Kind); } -- cgit v1.1