[llvm] Take poison-generating attributes into account (PR #89138)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 19:03:02 PDT 2024
================
@@ -496,14 +496,23 @@ class Instruction : public User,
/// Drops metadata that may generate poison.
void dropPoisonGeneratingMetadata();
- /// Return true if this instruction has poison-generating flags or metadata.
- bool hasPoisonGeneratingFlagsOrMetadata() const {
- return hasPoisonGeneratingFlags() || hasPoisonGeneratingMetadata();
+ /// Return true if this instruction has poison-generating attribute.
+ bool hasPoisonGeneratingAttribute() const LLVM_READONLY;
----------------
nikic wrote:
```suggestion
bool hasPoisonGeneratingReturnAttributes() const LLVM_READONLY;
```
Maybe? Just to make clear this won't report these attributes in argument position.
https://github.com/llvm/llvm-project/pull/89138
More information about the llvm-commits
mailing list