Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/polly
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-19 20:34:41 +0300
committerKazu Hirata <kazu@google.com>2022-06-19 20:34:41 +0300
commit30c675878c21be9973faabddc38ebf1b4c603b7d (patch)
treec82fbab8a4a30423d0ea84facef88b4f1cfd12eb /polly
parent6f348b146b69a50d5fb1b9fbfd14bc1d204e45c4 (diff)
Use value_or instead of getValueOr (NFC)
Diffstat (limited to 'polly')
-rw-r--r--polly/lib/Support/ScopHelper.cpp4
-rw-r--r--polly/lib/Transform/ManualOptimizer.cpp4
-rw-r--r--polly/lib/Transform/ScheduleTreeTransform.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp
index 2291d34a6fb4..f9dbdb9c4d03 100644
--- a/polly/lib/Support/ScopHelper.cpp
+++ b/polly/lib/Support/ScopHelper.cpp
@@ -747,13 +747,13 @@ static Optional<bool> getOptionalBoolLoopAttribute(MDNode *LoopID,
}
bool polly::getBooleanLoopAttribute(MDNode *LoopID, StringRef Name) {
- return getOptionalBoolLoopAttribute(LoopID, Name).getValueOr(false);
+ return getOptionalBoolLoopAttribute(LoopID, Name).value_or(false);
}
llvm::Optional<int> polly::getOptionalIntLoopAttribute(MDNode *LoopID,
StringRef Name) {
const MDOperand *AttrMD =
- findNamedMetadataArg(LoopID, Name).getValueOr(nullptr);
+ findNamedMetadataArg(LoopID, Name).value_or(nullptr);
if (!AttrMD)
return None;
diff --git a/polly/lib/Transform/ManualOptimizer.cpp b/polly/lib/Transform/ManualOptimizer.cpp
index 42083f673911..ef705eca8740 100644
--- a/polly/lib/Transform/ManualOptimizer.cpp
+++ b/polly/lib/Transform/ManualOptimizer.cpp
@@ -96,8 +96,8 @@ static isl::schedule applyLoopUnroll(MDNode *LoopMD,
// unrolled loop could be input of another loop transformation which expects
// the explicit schedule nodes. That is, we would need this explicit expansion
// anyway and using the ISL codegen option is a compile-time optimization.
- int64_t Factor = getOptionalIntLoopAttribute(LoopMD, "llvm.loop.unroll.count")
- .getValueOr(0);
+ int64_t Factor =
+ getOptionalIntLoopAttribute(LoopMD, "llvm.loop.unroll.count").value_or(0);
bool Full = getBooleanLoopAttribute(LoopMD, "llvm.loop.unroll.full");
assert((!Full || !(Factor > 0)) &&
"Cannot unroll fully and partially at the same time");
diff --git a/polly/lib/Transform/ScheduleTreeTransform.cpp b/polly/lib/Transform/ScheduleTreeTransform.cpp
index 7c3d047d1078..198de6f58e2b 100644
--- a/polly/lib/Transform/ScheduleTreeTransform.cpp
+++ b/polly/lib/Transform/ScheduleTreeTransform.cpp
@@ -428,7 +428,7 @@ static bool containsExtensionNode(isl::schedule Schedule) {
/// Find a named MDNode property in a LoopID.
static MDNode *findOptionalNodeOperand(MDNode *LoopMD, StringRef Name) {
return dyn_cast_or_null<MDNode>(
- findMetadataOperand(LoopMD, Name).getValueOr(nullptr));
+ findMetadataOperand(LoopMD, Name).value_or(nullptr));
}
/// Is this node of type mark?