summaryrefslogtreecommitdiff
path: root/polly
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-07-15 20:03:13 -0700
committerKazu Hirata <kazu@google.com>2022-07-15 20:03:13 -0700
commit5cff5142a894a184d5eef05339e1a5b41fb4c144 (patch)
tree1c2122c14f7f9c7dc33b866dd8eeba2470fff9f3 /polly
parent3b0dce5b8b1596c50360952a8fb031d52562ccf6 (diff)
downloadllvm-5cff5142a894a184d5eef05339e1a5b41fb4c144.tar.gz
Use value instead of getValue (NFC)
Diffstat (limited to 'polly')
-rw-r--r--polly/lib/Exchange/JSONExporter.cpp16
-rw-r--r--polly/lib/Transform/ManualOptimizer.cpp2
-rw-r--r--polly/lib/Transform/MatmulOptimizer.cpp8
3 files changed, 13 insertions, 13 deletions
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp
index ca9c1b8b6ef6..995af209035b 100644
--- a/polly/lib/Exchange/JSONExporter.cpp
+++ b/polly/lib/Exchange/JSONExporter.cpp
@@ -218,8 +218,8 @@ static bool importContext(Scop &S, const json::Object &JScop) {
return false;
}
- isl::set NewContext = isl::set{S.getIslCtx().get(),
- JScop.getString("context").getValue().str()};
+ isl::set NewContext =
+ isl::set{S.getIslCtx().get(), JScop.getString("context").value().str()};
// Check whether the context was parsed successfully.
if (NewContext.is_null()) {
@@ -293,7 +293,7 @@ static bool importSchedule(Scop &S, const json::Object &JScop,
assert(Schedule.has_value() &&
"Schedules that contain extension nodes require special handling.");
isl_map *Map = isl_map_read_from_str(S.getIslCtx().get(),
- Schedule.getValue().str().c_str());
+ Schedule.value().str().c_str());
// Check whether the schedule was parsed successfully
if (!Map) {
@@ -575,14 +575,14 @@ static bool areArraysEqual(ScopArrayInfo *SAI, const json::Object &Array) {
for (unsigned i = 1; i < Array.getArray("sizes")->size(); i++) {
SAI->getDimensionSize(i)->print(RawStringOstream);
const json::Array &SizesArray = *Array.getArray("sizes");
- if (RawStringOstream.str() != SizesArray[i].getAsString().getValue())
+ if (RawStringOstream.str() != SizesArray[i].getAsString().value())
return false;
Buffer.clear();
}
// Check if key 'type' differs from the current one or is not valid.
SAI->getElementType()->print(RawStringOstream);
- if (RawStringOstream.str() != Array.getString("type").getValue()) {
+ if (RawStringOstream.str() != Array.getString("type").value()) {
errs() << "Array has not a valid type.\n";
return false;
}
@@ -653,7 +653,7 @@ static bool importArrays(Scop &S, const json::Object &JScop) {
for (; ArrayIdx < Arrays.size(); ArrayIdx++) {
const json::Object &Array = *Arrays[ArrayIdx].getAsObject();
auto *ElementType =
- parseTextType(Array.get("type")->getAsString().getValue().str(),
+ parseTextType(Array.get("type")->getAsString().value().str(),
S.getSE()->getContext());
if (!ElementType) {
errs() << "Error while parsing element type for new array.\n";
@@ -674,10 +674,10 @@ static bool importArrays(Scop &S, const json::Object &JScop) {
}
auto NewSAI = S.createScopArrayInfo(
- ElementType, Array.getString("name").getValue().str(), DimSizes);
+ ElementType, Array.getString("name").value().str(), DimSizes);
if (Array.get("allocation")) {
- NewSAI->setIsOnHeap(Array.getString("allocation").getValue() == "heap");
+ NewSAI->setIsOnHeap(Array.getString("allocation").value() == "heap");
}
}
diff --git a/polly/lib/Transform/ManualOptimizer.cpp b/polly/lib/Transform/ManualOptimizer.cpp
index 640ae0a859af..cf1aa6c7491b 100644
--- a/polly/lib/Transform/ManualOptimizer.cpp
+++ b/polly/lib/Transform/ManualOptimizer.cpp
@@ -43,7 +43,7 @@ static TransformationMode hasUnrollTransformation(MDNode *LoopID) {
Optional<int> Count =
getOptionalIntLoopAttribute(LoopID, "llvm.loop.unroll.count");
if (Count)
- return Count.getValue() == 1 ? TM_SuppressedByUser : TM_ForcedByUser;
+ return Count.value() == 1 ? TM_SuppressedByUser : TM_ForcedByUser;
if (getBooleanLoopAttribute(LoopID, "llvm.loop.unroll.enable"))
return TM_ForcedByUser;
diff --git a/polly/lib/Transform/MatmulOptimizer.cpp b/polly/lib/Transform/MatmulOptimizer.cpp
index 4120cd82a8e0..3e0e06cef869 100644
--- a/polly/lib/Transform/MatmulOptimizer.cpp
+++ b/polly/lib/Transform/MatmulOptimizer.cpp
@@ -568,20 +568,20 @@ static void getTargetCacheParameters(const llvm::TargetTransformInfo *TTI) {
auto L2DCache = llvm::TargetTransformInfo::CacheLevel::L2D;
if (FirstCacheLevelSize == -1) {
if (TTI->getCacheSize(L1DCache))
- FirstCacheLevelSize = TTI->getCacheSize(L1DCache).getValue();
+ FirstCacheLevelSize = TTI->getCacheSize(L1DCache).value();
else
FirstCacheLevelSize = static_cast<int>(FirstCacheLevelDefaultSize);
}
if (SecondCacheLevelSize == -1) {
if (TTI->getCacheSize(L2DCache))
- SecondCacheLevelSize = TTI->getCacheSize(L2DCache).getValue();
+ SecondCacheLevelSize = TTI->getCacheSize(L2DCache).value();
else
SecondCacheLevelSize = static_cast<int>(SecondCacheLevelDefaultSize);
}
if (FirstCacheLevelAssociativity == -1) {
if (TTI->getCacheAssociativity(L1DCache))
FirstCacheLevelAssociativity =
- TTI->getCacheAssociativity(L1DCache).getValue();
+ TTI->getCacheAssociativity(L1DCache).value();
else
FirstCacheLevelAssociativity =
static_cast<int>(FirstCacheLevelDefaultAssociativity);
@@ -589,7 +589,7 @@ static void getTargetCacheParameters(const llvm::TargetTransformInfo *TTI) {
if (SecondCacheLevelAssociativity == -1) {
if (TTI->getCacheAssociativity(L2DCache))
SecondCacheLevelAssociativity =
- TTI->getCacheAssociativity(L2DCache).getValue();
+ TTI->getCacheAssociativity(L2DCache).value();
else
SecondCacheLevelAssociativity =
static_cast<int>(SecondCacheLevelDefaultAssociativity);