From: Kazu Hirata Date: Tue, 26 Jul 2022 06:01:01 +0000 (-0700) Subject: [flang] Use value or * instead of getValue (NFC) X-Git-Tag: upstream/15.0.7~468 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3356d72a5ffa69324f8fdbc067c440cda8154797;p=platform%2Fupstream%2Fllvm.git [flang] Use value or * instead of getValue (NFC) This patch replaces x.getValue() with *x if the reference is obviously protected by a presence check. Otherwise, it replaces x.getValue() with x.value(). --- diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp index f8662ad..05af25a 100644 --- a/flang/lib/Lower/Bridge.cpp +++ b/flang/lib/Lower/Bridge.cpp @@ -2283,9 +2283,9 @@ private: } if (lhsIsWholeAllocatable) fir::factory::finalizeRealloc( - *builder, loc, lhsMutableBox.getValue(), + *builder, loc, lhsMutableBox.value(), /*lbounds=*/llvm::None, /*takeLboundsIfRealloc=*/false, - lhsRealloc.getValue()); + lhsRealloc.value()); }, // [2] User defined assignment. If the context is a scalar diff --git a/flang/lib/Optimizer/Transforms/AffinePromotion.cpp b/flang/lib/Optimizer/Transforms/AffinePromotion.cpp index 4d2aa0e..331d951 100644 --- a/flang/lib/Optimizer/Transforms/AffinePromotion.cpp +++ b/flang/lib/Optimizer/Transforms/AffinePromotion.cpp @@ -175,7 +175,7 @@ struct AffineIfCondition { mlir::IntegerSet getIntegerSet() const { assert(hasIntegerSet() && "integer set is missing"); - return integerSet.getValue(); + return integerSet.value(); } mlir::ValueRange getAffineArgs() const { return affineArgs; } @@ -235,8 +235,8 @@ private: auto rhsAffine = toAffineExpr(cmpOp.getRhs()); if (!lhsAffine || !rhsAffine) return; - auto constraintPair = constraint( - cmpOp.getPredicate(), rhsAffine.getValue() - lhsAffine.getValue()); + auto constraintPair = + constraint(cmpOp.getPredicate(), *rhsAffine - *lhsAffine); if (!constraintPair) return; integerSet = mlir::IntegerSet::get( @@ -481,8 +481,8 @@ private: std::pair createAffineFor(fir::DoLoopOp op, mlir::PatternRewriter &rewriter) const { if (auto constantStep = constantIntegerLike(op.getStep())) - if (constantStep.getValue() > 0) - return positiveConstantStep(op, constantStep.getValue(), rewriter); + if (*constantStep > 0) + return positiveConstantStep(op, *constantStep, rewriter); return genericBounds(op, rewriter); }