[llvm] r365984 - [Attributor][NFC] Run clang-format on the attributor files (.h/.cpp)
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 18:09:28 PDT 2019
Author: jdoerfert
Date: Fri Jul 12 18:09:27 2019
New Revision: 365984
URL: http://llvm.org/viewvc/llvm-project?rev=365984&view=rev
Log:
[Attributor][NFC] Run clang-format on the attributor files (.h/.cpp)
The Attributor files are kept formatted with clang-format, we should try
to keep this state.
Modified:
llvm/trunk/include/llvm/Transforms/IPO/Attributor.h
llvm/trunk/lib/Transforms/IPO/Attributor.cpp
Modified: llvm/trunk/include/llvm/Transforms/IPO/Attributor.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/Attributor.h?rev=365984&r1=365983&r2=365984&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/Attributor.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/Attributor.h Fri Jul 12 18:09:27 2019
@@ -693,9 +693,7 @@ struct AANoSync : public AbstractAttribu
: AbstractAttribute(V, InfoCache) {}
/// See AbstractAttribute::getAttrKind().
- Attribute::AttrKind getAttrKind() const override {
- return ID;
- }
+ Attribute::AttrKind getAttrKind() const override { return ID; }
static constexpr Attribute::AttrKind ID =
Attribute::AttrKind(Attribute::NoSync);
Modified: llvm/trunk/lib/Transforms/IPO/Attributor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Attributor.cpp?rev=365984&r1=365983&r2=365984&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Attributor.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Attributor.cpp Fri Jul 12 18:09:27 2019
@@ -359,9 +359,7 @@ struct AANoUnwindFunction : AANoUnwind,
/// }
/// See AbstractAttribute::getManifestPosition().
- ManifestPosition getManifestPosition() const override {
- return MP_FUNCTION;
- }
+ ManifestPosition getManifestPosition() const override { return MP_FUNCTION; }
const std::string getAsStr() const override {
return getAssumed() ? "nounwind" : "may-unwind";
@@ -500,9 +498,7 @@ public:
const AbstractState &getState() const override { return *this; }
/// See AbstractAttribute::getManifestPosition().
- ManifestPosition getManifestPosition() const override {
- return MP_ARGUMENT;
- }
+ ManifestPosition getManifestPosition() const override { return MP_ARGUMENT; }
/// See AbstractAttribute::updateImpl(Attributor &A).
ChangeStatus updateImpl(Attributor &A) override;
@@ -742,9 +738,7 @@ struct AANoSyncFunction : AANoSync, Bool
/// }
/// See AbstractAttribute::getManifestPosition().
- ManifestPosition getManifestPosition() const override {
- return MP_FUNCTION;
- }
+ ManifestPosition getManifestPosition() const override { return MP_FUNCTION; }
const std::string getAsStr() const override {
return getAssumed() ? "nosync" : "may-sync";
@@ -767,7 +761,8 @@ struct AANoSyncFunction : AANoSync, Bool
/// Helper function used to determine whether an instruction is volatile.
static bool isVolatile(Instruction *I);
- /// Helper function uset to check if intrinsic is volatile (memcpy, memmove, memset).
+ /// Helper function uset to check if intrinsic is volatile (memcpy, memmove,
+ /// memset).
static bool isNoSyncIntrinsic(Instruction *I);
};
@@ -870,7 +865,7 @@ ChangeStatus AANoSyncFunction::updateImp
auto *NoSyncAA = A.getAAFor<AANoSyncFunction>(*this, *I);
if (isa<IntrinsicInst>(I) && isNoSyncIntrinsic(I))
- continue;
+ continue;
if (ICS && (!NoSyncAA || !NoSyncAA->isAssumedNoSync()) &&
!ICS.hasFnAttr(Attribute::NoSync)) {
@@ -878,7 +873,7 @@ ChangeStatus AANoSyncFunction::updateImp
return ChangeStatus::CHANGED;
}
- if(ICS)
+ if (ICS)
continue;
if (!isVolatile(I) && !isNonRelaxedAtomic(I))
More information about the llvm-commits
mailing list