[Mlir-commits] [mlir] e5a1ccb - Use value instead of getValue (NFC)

Kazu Hirata llvmlistbot at llvm.org
Fri Jul 29 21:18:59 PDT 2022


Author: Kazu Hirata
Date: 2022-07-29T21:18:41-07:00
New Revision: e5a1ccbf254e2e44830fde3d83357c06b814f881

URL: https://github.com/llvm/llvm-project/commit/e5a1ccbf254e2e44830fde3d83357c06b814f881
DIFF: https://github.com/llvm/llvm-project/commit/e5a1ccbf254e2e44830fde3d83357c06b814f881.diff

LOG: Use value instead of getValue (NFC)

Added: 
    

Modified: 
    clang/lib/Sema/Scope.cpp
    clang/lib/Sema/SemaRISCVVectorLookup.cpp
    mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/Scope.cpp b/clang/lib/Sema/Scope.cpp
index 69120cf644342..d27de34f3977f 100644
--- a/clang/lib/Sema/Scope.cpp
+++ b/clang/lib/Sema/Scope.cpp
@@ -160,7 +160,7 @@ void Scope::applyNRVO() {
     return;
 
   if (*NRVO && isDeclScope(*NRVO))
-    NRVO.getValue()->setNRVOVariable(true);
+    NRVO.value()->setNRVOVariable(true);
 
   // It's necessary to propagate NRVO candidate to the parent scope for cases
   // when the parent scope doesn't contain a return statement.

diff  --git a/clang/lib/Sema/SemaRISCVVectorLookup.cpp b/clang/lib/Sema/SemaRISCVVectorLookup.cpp
index 2d58008fcdacd..63194b7b2e366 100644
--- a/clang/lib/Sema/SemaRISCVVectorLookup.cpp
+++ b/clang/lib/Sema/SemaRISCVVectorLookup.cpp
@@ -115,7 +115,7 @@ static QualType RVVType2Qual(ASTContext &Context, const RVVType *Type) {
     llvm_unreachable("Unhandled type.");
   }
   if (Type->isVector())
-    QT = Context.getScalableVectorType(QT, Type->getScale().getValue());
+    QT = Context.getScalableVectorType(QT, Type->getScale().value());
 
   if (Type->isConstant())
     QT = Context.getConstType(QT);

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp b/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
index 56ce6b85ba879..4c5fbf98cdf00 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
@@ -235,7 +235,7 @@ FailureOr<PromotionInfo> mlir::linalg::promoteSubviewAsNewBuffer(
           getConstantUpperBoundForIndex(materializedSize);
       size = failed(upperBound)
                  ? materializedSize
-                 : b.create<arith::ConstantIndexOp>(loc, upperBound.getValue());
+                 : b.create<arith::ConstantIndexOp>(loc, upperBound.value());
     }
     LLVM_DEBUG(llvm::dbgs() << "Extracted tightest: " << size << "\n");
     fullSizes.push_back(size);

diff  --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 5dcbd00201a99..34c532311fa4c 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -973,7 +973,7 @@ convertOmpSimdLoop(Operation &opInst, llvm::IRBuilderBase &builder,
 
   llvm::ConstantInt *simdlen = nullptr;
   if (llvm::Optional<uint64_t> simdlenVar = loop.simdlen())
-    simdlen = builder.getInt64(simdlenVar.getValue());
+    simdlen = builder.getInt64(simdlenVar.value());
 
   ompBuilder->applySimd(loopInfo, simdlen);
 


        


More information about the Mlir-commits mailing list