[llvm] [Attributor] Prevent infinite loop in AAGlobalValueInfoFloating (PR #94941)

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 14:30:29 PDT 2024


================
@@ -1749,6 +1749,10 @@ bool Attributor::checkForAllCallees(
   return Pred(Callees.getArrayRef());
 }
 
+bool canMarkAsVisited(const User *user) {
+  return isa<PHINode>(user) || !isa<Instruction>(user);
----------------
jdoerfert wrote:

```suggestion
bool canMarkAsVisited(const User *Usr) {
  return isa<PHINode>(Usr) || !isa<Instruction>(Usr);
```

https://github.com/llvm/llvm-project/pull/94941


More information about the llvm-commits mailing list