diff options
author | Kazu Hirata <kazu@google.com> | 2022-06-25 11:55:57 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-06-25 11:55:57 -0700 |
commit | aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d (patch) | |
tree | d207b35cfb445636f41204bcfe51f6ca3a94a3ba /llvm/lib/Transforms/Scalar/LoopDistribute.cpp | |
parent | b8df4093e4d82c67a419911a46b63482043643e5 (diff) | |
download | llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.zip llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.gz llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.bz2 |
Don't use Optional::hasValue (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopDistribute.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopDistribute.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopDistribute.cpp b/llvm/lib/Transforms/Scalar/LoopDistribute.cpp index f606e9b..f70ab0d 100644 --- a/llvm/lib/Transforms/Scalar/LoopDistribute.cpp +++ b/llvm/lib/Transforms/Scalar/LoopDistribute.cpp @@ -600,9 +600,9 @@ private: {LLVMLoopDistributeFollowupAll, Part->hasDepCycle() ? LLVMLoopDistributeFollowupSequential : LLVMLoopDistributeFollowupCoincident}); - if (PartitionID.hasValue()) { + if (PartitionID) { Loop *NewLoop = Part->getDistributedLoop(); - NewLoop->setLoopID(PartitionID.getValue()); + NewLoop->setLoopID(*PartitionID); } } }; @@ -821,12 +821,10 @@ public: // The unversioned loop will not be changed, so we inherit all attributes // from the original loop, but remove the loop distribution metadata to // avoid to distribute it again. - MDNode *UnversionedLoopID = - makeFollowupLoopID(OrigLoopID, - {LLVMLoopDistributeFollowupAll, - LLVMLoopDistributeFollowupFallback}, - "llvm.loop.distribute.", true) - .getValue(); + MDNode *UnversionedLoopID = *makeFollowupLoopID( + OrigLoopID, + {LLVMLoopDistributeFollowupAll, LLVMLoopDistributeFollowupFallback}, + "llvm.loop.distribute.", true); LVer.getNonVersionedLoop()->setLoopID(UnversionedLoopID); } |