[PATCH] D95141: [InstCombine] Remove unused llvm.experimental.noalias.scope.decl

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 23 13:03:17 PST 2021


jdoerfert added a comment.

Logic seems sounds to me. Code as well, one minor nit below. I have no objections to this.



================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3789
+      }
+    };
+
----------------
Style: I would prefer early exits but feel free to ignore if you think its not better.
```
const auto *MDScopeList = dyn_cast_or_null<MDNode>(ScopeList);
if (!MDScopeList || !Container.insert(MDSCopeList).second)
  return;
for (auto &MDOperand : MDScopeList->operands())
  if (auto *MDScope = dyn_cast<MDNode>(MDOperand))
    Container.insert(MDScope);
```

---

Is it legal that the cast fails? If the verifier would complain we might just assume it is an MDNode.


================
Comment at: llvm/test/Transforms/Coroutines/ex4.ll:56
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl
 ; CHECK-NEXT: call void @print(i32 6)
 ; CHECK:      ret i32 0
----------------
I'm confused where these come from in the first place but that is unrelated.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95141/new/

https://reviews.llvm.org/D95141



More information about the llvm-commits mailing list