diff options
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); } |