[Mlir-commits] [mlir] 206a603 - [Presburger] Cheat around old versions of clang not doing NRVO when there's a derived-to-base cast in the way
Benjamin Kramer
llvmlistbot at llvm.org
Wed Jun 29 03:41:18 PDT 2022
Author: Benjamin Kramer
Date: 2022-06-29T12:40:59+02:00
New Revision: 206a6037a093a73d928a60c3012593f921a4f639
URL: https://github.com/llvm/llvm-project/commit/206a6037a093a73d928a60c3012593f921a4f639
DIFF: https://github.com/llvm/llvm-project/commit/206a6037a093a73d928a60c3012593f921a4f639.diff
LOG: [Presburger] Cheat around old versions of clang not doing NRVO when there's a derived-to-base cast in the way
Should be NFC. We can just do the base conversion manually and avoid
warnings about it. Clang before Clang 13 didn't implement P1825 and
complains:
mlir/lib/Analysis/Presburger/IntegerRelation.cpp:226:10: warning: local variable 'result' will be copied
despite being returned by name [-Wreturn-std-move]
return result;
^~~~~~
mlir/lib/Analysis/Presburger/IntegerRelation.cpp:226:10: note: call 'std::move' explicitly to avoid copying
return result;
^~~~~~
std::move(result)
Added:
Modified:
mlir/lib/Analysis/Presburger/IntegerRelation.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp
index 87e410cb46ce5..b630db8c0f703 100644
--- a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp
+++ b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp
@@ -215,7 +215,7 @@ PresburgerRelation IntegerRelation::computeReprWithOnlyDivLocals() const {
IntegerPolyhedron(PresburgerSpace::getSetSpace(
/*numDims=*/copy.getNumVars() - numNonDivLocals)))
.computeSymbolicIntegerLexMin();
- PresburgerSet result =
+ PresburgerRelation result =
lexminResult.lexmin.getDomain().unionSet(lexminResult.unboundedDomain);
// The result set might lie in the wrong space -- all its ids are dims.
More information about the Mlir-commits
mailing list