[llvm] [LLVM] New NoDivergenceSource function attribute (PR #111832)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 07:57:24 PDT 2024


================
@@ -288,6 +288,10 @@ bool TargetTransformInfo::hasBranchDivergence(const Function *F) const {
 }
 
 bool TargetTransformInfo::isSourceOfDivergence(const Value *V) const {
+  if (auto Call = dyn_cast<CallBase>(V)) {
----------------
nikic wrote:

```suggestion
  if (auto *Call = dyn_cast<CallBase>(V)) {
```

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


More information about the llvm-commits mailing list