llvm.org GIT mirror llvm / 76a1ea9
[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 Johannes Doerfert a month ago
2 changed file(s) with 8 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
692692 : AbstractAttribute(V, InfoCache) {}
693693
694694 /// See AbstractAttribute::getAttrKind().
695 Attribute::AttrKind getAttrKind() const override {
696 return ID;
697 }
695 Attribute::AttrKind getAttrKind() const override { return ID; }
698696
699697 static constexpr Attribute::AttrKind ID =
700698 Attribute::AttrKind(Attribute::NoSync);
358358 /// }
359359
360360 /// See AbstractAttribute::getManifestPosition().
361 ManifestPosition getManifestPosition() const override {
362 return MP_FUNCTION;
363 }
361 ManifestPosition getManifestPosition() const override { return MP_FUNCTION; }
364362
365363 const std::string getAsStr() const override {
366364 return getAssumed() ? "nounwind" : "may-unwind";
499497 const AbstractState &getState() const override { return *this; }
500498
501499 /// See AbstractAttribute::getManifestPosition().
502 ManifestPosition getManifestPosition() const override {
503 return MP_ARGUMENT;
504 }
500 ManifestPosition getManifestPosition() const override { return MP_ARGUMENT; }
505501
506502 /// See AbstractAttribute::updateImpl(Attributor &A).
507503 ChangeStatus updateImpl(Attributor &A) override;
741737 /// }
742738
743739 /// See AbstractAttribute::getManifestPosition().
744 ManifestPosition getManifestPosition() const override {
745 return MP_FUNCTION;
746 }
740 ManifestPosition getManifestPosition() const override { return MP_FUNCTION; }
747741
748742 const std::string getAsStr() const override {
749743 return getAssumed() ? "nosync" : "may-sync";
766760 /// Helper function used to determine whether an instruction is volatile.
767761 static bool isVolatile(Instruction *I);
768762
769 /// Helper function uset to check if intrinsic is volatile (memcpy, memmove, memset).
763 /// Helper function uset to check if intrinsic is volatile (memcpy, memmove,
764 /// memset).
770765 static bool isNoSyncIntrinsic(Instruction *I);
771766 };
772767
869864 auto *NoSyncAA = A.getAAFor(*this, *I);
870865
871866 if (isa(I) && isNoSyncIntrinsic(I))
872 continue;
867 continue;
873868
874869 if (ICS && (!NoSyncAA || !NoSyncAA->isAssumedNoSync()) &&
875870 !ICS.hasFnAttr(Attribute::NoSync)) {
877872 return ChangeStatus::CHANGED;
878873 }
879874
880 if(ICS)
875 if (ICS)
881876 continue;
882877
883878 if (!isVolatile(I) && !isNonRelaxedAtomic(I))