diff options
author | Nikita Popov <npopov@redhat.com> | 2024-09-16 10:23:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 10:23:41 +0200 |
commit | b7e51b4f139ec18c498c818c6bcaa5a842cea83c (patch) | |
tree | 873a3e5907232e0ac03e5adcb95b80fabda96c54 /llvm/lib/IR/Function.cpp | |
parent | b29c5b66fd1b241b6d8a9cd810cd4e9bad318225 (diff) | |
download | llvm-b7e51b4f139ec18c498c818c6bcaa5a842cea83c.zip llvm-b7e51b4f139ec18c498c818c6bcaa5a842cea83c.tar.gz llvm-b7e51b4f139ec18c498c818c6bcaa5a842cea83c.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |