[PATCH] D62766: [Attributor] Deduce "nosync" function attribute.
Stefan Stipanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 08:05:47 PDT 2019
sstefan1 marked an inline comment as done.
sstefan1 added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:324
+ Success == AtomicOrdering::Monotonic)
+ return false;
+ if (Failure == AtomicOrdering::Unordered ||
----------------
jdoerfert wrote:
> I'm still confused. The pessimistic return value is `true`, correct? If so, Why can we return `false` after we've seen only the success ordering? Don't we have to look at both success and failure ordering and only if both are "fine" we can return `false`?
I agree. I messed this up. Before I update, does this look ok?
```
if (Success != AtomicOrdering::Unordered ||
Success != AtomicOrdering::Monotonic)
return true;
if (Failure != AtomicOrdering::Unordered ||
Failure != AtomicOrdering::Monotonic)
return true;
return false;
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62766/new/
https://reviews.llvm.org/D62766
More information about the llvm-commits
mailing list