[PATCH] D62766: [Attributor] Deduce "nosync" function attribute.
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 07:52:15 PDT 2019
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:285
+
+ virtual bool isKnownNoSync() const override { return getKnown(); }
+
----------------
The above functions should have a comment referring to the base class.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:288
+ static constexpr Attribute::AttrKind ID =
+ Attribute::AttrKind(Attribute::None + 1);
+
----------------
This has to go in the base class I think.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:324
+ Success == AtomicOrdering::Monotonic)
+ return false;
+ if (Failure == AtomicOrdering::Unordered ||
----------------
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`?
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