From 76a1ea9a3c67cdaaecd7ad423f9e04e3ee7a6203 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Sat, 13 Jul 2019 01:09:27 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365984 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/IPO/Attributor.h | 4 +--- lib/Transforms/IPO/Attributor.cpp | 19 +++++++------------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/include/llvm/Transforms/IPO/Attributor.h b/include/llvm/Transforms/IPO/Attributor.h index 435aaca75d1..88b6af3abbd 100644 --- a/include/llvm/Transforms/IPO/Attributor.h +++ b/include/llvm/Transforms/IPO/Attributor.h @@ -693,9 +693,7 @@ struct AANoSync : public AbstractAttribute { : 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); diff --git a/lib/Transforms/IPO/Attributor.cpp b/lib/Transforms/IPO/Attributor.cpp index 5fea3d0b87a..5a72865db9d 100644 --- a/lib/Transforms/IPO/Attributor.cpp +++ b/lib/Transforms/IPO/Attributor.cpp @@ -359,9 +359,7 @@ struct AANoUnwindFunction : AANoUnwind, BooleanState { /// } /// 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, BooleanState { /// } /// 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, BooleanState { /// 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::updateImpl(Attributor &A) { auto *NoSyncAA = A.getAAFor(*this, *I); if (isa(I) && isNoSyncIntrinsic(I)) - continue; + continue; if (ICS && (!NoSyncAA || !NoSyncAA->isAssumedNoSync()) && !ICS.hasFnAttr(Attribute::NoSync)) { @@ -878,7 +873,7 @@ ChangeStatus AANoSyncFunction::updateImpl(Attributor &A) { return ChangeStatus::CHANGED; } - if(ICS) + if (ICS) continue; if (!isVolatile(I) && !isNonRelaxedAtomic(I)) -- 2.40.0