[flang-commits] [flang] 70638d9 - [fir] Keep runtime function name in comment
Valentin Clement via flang-commits
flang-commits at lists.llvm.org
Thu Dec 9 09:29:48 PST 2021
Author: Valentin Clement
Date: 2021-12-09T18:29:41+01:00
New Revision: 70638d997c63a9eb650bc87da391e18696706213
URL: https://github.com/llvm/llvm-project/commit/70638d997c63a9eb650bc87da391e18696706213
DIFF: https://github.com/llvm/llvm-project/commit/70638d997c63a9eb650bc87da391e18696706213.diff
LOG: [fir] Keep runtime function name in comment
Some of the function name in the comment didn't match
their actual name in the runtime. This patch fixes that.
Reviewed By: schweitz
Differential Revision: https://reviews.llvm.org/D115076
Added:
Modified:
flang/include/flang/Optimizer/Builder/Runtime/Reduction.h
flang/lib/Optimizer/Builder/Runtime/Reduction.cpp
Removed:
################################################################################
diff --git a/flang/include/flang/Optimizer/Builder/Runtime/Reduction.h b/flang/include/flang/Optimizer/Builder/Runtime/Reduction.h
index 5aa852218fdf7..9907d674da90d 100644
--- a/flang/include/flang/Optimizer/Builder/Runtime/Reduction.h
+++ b/flang/include/flang/Optimizer/Builder/Runtime/Reduction.h
@@ -25,126 +25,128 @@ class FirOpBuilder;
namespace fir::runtime {
-/// Generate call to `all` runtime routine.
+/// Generate call to `AllDim` runtime routine.
/// This calls the descriptor based runtime call implementation of the `all`
/// intrinsic.
void genAllDescriptor(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value maskBox,
mlir::Value dim);
-/// Generate call to `any` runtime routine.
+/// Generate call to `AnyDim` runtime routine.
/// This calls the descriptor based runtime call implementation of the `any`
/// intrinsic.
void genAnyDescriptor(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value maskBox,
mlir::Value dim);
-/// Generate call to `all` runtime routine. This version of `all` is specialized
+/// Generate call to `All` runtime routine. This version of `all` is specialized
/// for rank 1 mask arguments.
/// This calls the version that returns a scalar logical value.
mlir::Value genAll(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value maskBox, mlir::Value dim);
-/// Generate call to `any` runtime routine. This version of `any` is specialized
+/// Generate call to `Any` runtime routine. This version of `any` is specialized
/// for rank 1 mask arguments.
/// This calls the version that returns a scalar logical value.
mlir::Value genAny(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value maskBox, mlir::Value dim);
-/// Generate call to `count` runtime routine. This routine is a specialized
+/// Generate call to `Count` runtime routine. This routine is a specialized
/// version when mask is a rank one array or the dim argument is not
/// specified by the user.
mlir::Value genCount(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value maskBox, mlir::Value dim);
-/// Generate call to general CountDim runtime routine. This routine has a
+/// Generate call to general `CountDim` runtime routine. This routine has a
/// descriptor result.
void genCountDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value maskBox, mlir::Value dim,
mlir::Value kind);
-/// Generate call to `dot_product` intrinsic runtime routine.
+/// Generate call to `DotProduct` intrinsic runtime routine.
mlir::Value genDotProduct(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value vectorABox, mlir::Value vectorBBox,
mlir::Value resultBox);
-/// Generate call to `maxloc` intrinsic runtime routine. This is the version
+/// Generate call to `Maxloc` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
void genMaxloc(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox, mlir::Value maskBox,
mlir::Value kind, mlir::Value back);
-/// Generate call to `maxloc` intrinsic runtime routine. This is the version
+/// Generate call to `MaxlocDim` intrinsic runtime routine. This is the version
/// that takes a dim argument.
void genMaxlocDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox, mlir::Value dim,
mlir::Value maskBox, mlir::Value kind, mlir::Value back);
-/// Generate call to `minloc` intrinsic runtime routine. This is the version
+/// Generate call to `Minloc` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
void genMinloc(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox, mlir::Value maskBox,
mlir::Value kind, mlir::Value back);
-/// Generate call to `minloc` intrinsic runtime routine. This is the version
+/// Generate call to `MinlocDim` intrinsic runtime routine. This is the version
/// that takes a dim argument.
void genMinlocDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox, mlir::Value dim,
mlir::Value maskBox, mlir::Value kind, mlir::Value back);
-/// Generate call to `maxval` intrinsic runtime routine. This is the version
+/// Generate call to `Maxval` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
mlir::Value genMaxval(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value arrayBox, mlir::Value maskBox);
-/// Generate call to `maxval` intrinsic runtime routine. This is the version
-/// that that handles 1 dimensional character arrays with no DIM argument.
+/// Generate call to `MaxvalCharacter` intrinsic runtime routine. This is the
+/// version hat that handles 1 dimensional character arrays with no DIM
+/// argument.
void genMaxvalChar(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
mlir::Value maskBox);
-/// Generate call to `maxval` intrinsic runtime routine. This is the version
+/// Generate call to `MaxvalDim` intrinsic runtime routine. This is the version
/// that takes arrays of any rank with a dim argument specified.
void genMaxvalDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox, mlir::Value dim,
mlir::Value maskBox);
-/// Generate call to `minval` intrinsic runtime routine. This is the version
+/// Generate call to `Minval` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
mlir::Value genMinval(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value arrayBox, mlir::Value maskBox);
-/// Generate call to `minval` intrinsic runtime routine. This is the version
-/// that that handles 1 dimensional character arrays with no DIM argument.
+/// Generate call to `MinvalCharacter` intrinsic runtime routine. This is the
+/// version that that handles 1 dimensional character arrays with no DIM
+/// argument.
void genMinvalChar(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
mlir::Value maskBox);
-/// Generate call to `minval` intrinsic runtime routine. This is the version
+/// Generate call to `MinvalDim` intrinsic runtime routine. This is the version
/// that takes arrays of any rank with a dim argument specified.
void genMinvalDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox, mlir::Value dim,
mlir::Value maskBox);
-/// Generate call to `product` intrinsic runtime routine. This is the version
+/// Generate call to `Product` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
mlir::Value genProduct(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value arrayBox, mlir::Value maskBox,
mlir::Value resultBox);
-/// Generate call to `product` intrinsic runtime routine. This is the version
+/// Generate call to `ProductDim` intrinsic runtime routine. This is the version
/// that takes arrays of any rank with a dim argument specified.
void genProductDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox, mlir::Value dim,
mlir::Value maskBox);
-/// Generate call to `sum` intrinsic runtime routine. This is the version
+/// Generate call to `Sum` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
mlir::Value genSum(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value arrayBox, mlir::Value maskBox,
mlir::Value resultBox);
-/// Generate call to `sum` intrinsic runtime routine. This is the version
+/// Generate call to `SumDim` intrinsic runtime routine. This is the version
/// that takes arrays of any rank with a dim argument specified.
void genSumDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox, mlir::Value dim,
diff --git a/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp b/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp
index 893245c5364f6..c726d3c508e18 100644
--- a/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp
+++ b/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp
@@ -451,7 +451,7 @@ genReduction5Args(FN func, fir::FirOpBuilder &builder, mlir::Location loc,
builder.create<fir::CallOp>(loc, func, args);
}
-/// Generate call to `all` runtime routine.
+/// Generate call to `AllDim` runtime routine.
/// This calls the descriptor based runtime call implementation of the `all`
/// intrinsic.
void fir::runtime::genAllDescriptor(fir::FirOpBuilder &builder,
@@ -461,7 +461,7 @@ void fir::runtime::genAllDescriptor(fir::FirOpBuilder &builder,
genReduction2Args(allFunc, builder, loc, resultBox, maskBox, dim);
}
-/// Generate call to `any` runtime routine.
+/// Generate call to `AnyDim` runtime routine.
/// This calls the descriptor based runtime call implementation of the `any`
/// intrinsic.
void fir::runtime::genAnyDescriptor(fir::FirOpBuilder &builder,
@@ -471,7 +471,7 @@ void fir::runtime::genAnyDescriptor(fir::FirOpBuilder &builder,
genReduction2Args(anyFunc, builder, loc, resultBox, maskBox, dim);
}
-/// Generate call to `all` intrinsic runtime routine. This routine is
+/// Generate call to `All` intrinsic runtime routine. This routine is
/// specialized for mask arguments with rank == 1.
mlir::Value fir::runtime::genAll(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value maskBox, mlir::Value dim) {
@@ -479,7 +479,7 @@ mlir::Value fir::runtime::genAll(fir::FirOpBuilder &builder, mlir::Location loc,
return genSpecial2Args(allFunc, builder, loc, maskBox, dim);
}
-/// Generate call to `any` intrinsic runtime routine. This routine is
+/// Generate call to `Any` intrinsic runtime routine. This routine is
/// specialized for mask arguments with rank == 1.
mlir::Value fir::runtime::genAny(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value maskBox, mlir::Value dim) {
@@ -487,7 +487,7 @@ mlir::Value fir::runtime::genAny(fir::FirOpBuilder &builder, mlir::Location loc,
return genSpecial2Args(anyFunc, builder, loc, maskBox, dim);
}
-/// Generate call to `count` runtime routine. This routine is a specialized
+/// Generate call to `Count` runtime routine. This routine is a specialized
/// version when mask is a rank one array or the dim argument is not
/// specified by the user.
mlir::Value fir::runtime::genCount(fir::FirOpBuilder &builder,
@@ -497,7 +497,7 @@ mlir::Value fir::runtime::genCount(fir::FirOpBuilder &builder,
return genSpecial2Args(countFunc, builder, loc, maskBox, dim);
}
-/// Generate call to general CountDim runtime routine. This routine has a
+/// Generate call to general `CountDim` runtime routine. This routine has a
/// descriptor result.
void fir::runtime::genCountDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value maskBox,
@@ -512,7 +512,7 @@ void fir::runtime::genCountDim(fir::FirOpBuilder &builder, mlir::Location loc,
builder.create<fir::CallOp>(loc, func, args);
}
-/// Generate call to `maxloc` intrinsic runtime routine. This is the version
+/// Generate call to `Maxloc` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
void fir::runtime::genMaxloc(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
@@ -523,7 +523,7 @@ void fir::runtime::genMaxloc(fir::FirOpBuilder &builder, mlir::Location loc,
back);
}
-/// Generate call to `maxloc` intrinsic runtime routine. This is the version
+/// Generate call to `MaxlocDim` intrinsic runtime routine. This is the version
/// that takes a dim argument.
void fir::runtime::genMaxlocDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
@@ -534,7 +534,7 @@ void fir::runtime::genMaxlocDim(fir::FirOpBuilder &builder, mlir::Location loc,
back);
}
-/// Generate call to `maxval` intrinsic runtime routine. This is the version
+/// Generate call to `Maxval` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
mlir::Value fir::runtime::genMaxval(fir::FirOpBuilder &builder,
mlir::Location loc, mlir::Value arrayBox,
@@ -581,7 +581,7 @@ mlir::Value fir::runtime::genMaxval(fir::FirOpBuilder &builder,
return builder.create<fir::CallOp>(loc, func, args).getResult(0);
}
-/// Generate call to `maxval` intrinsic runtime routine. This is the version
+/// Generate call to `MaxvalDim` intrinsic runtime routine. This is the version
/// that handles any rank array with the dim argument specified.
void fir::runtime::genMaxvalDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
@@ -590,8 +590,8 @@ void fir::runtime::genMaxvalDim(fir::FirOpBuilder &builder, mlir::Location loc,
genReduction3Args(func, builder, loc, resultBox, arrayBox, dim, maskBox);
}
-/// Generate call to `maxval` intrinsic runtime routine. This is the version
-/// that handles character arrays of rank 1 and without a DIM argument.
+/// Generate call to `MaxvalCharacter` intrinsic runtime routine. This is the
+/// version that handles character arrays of rank 1 and without a DIM argument.
void fir::runtime::genMaxvalChar(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
mlir::Value maskBox) {
@@ -606,7 +606,7 @@ void fir::runtime::genMaxvalChar(fir::FirOpBuilder &builder, mlir::Location loc,
builder.create<fir::CallOp>(loc, func, args);
}
-/// Generate call to `minloc` intrinsic runtime routine. This is the version
+/// Generate call to `Minloc` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
void fir::runtime::genMinloc(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
@@ -617,7 +617,7 @@ void fir::runtime::genMinloc(fir::FirOpBuilder &builder, mlir::Location loc,
back);
}
-/// Generate call to `minloc` intrinsic runtime routine. This is the version
+/// Generate call to `MinlocDim` intrinsic runtime routine. This is the version
/// that takes a dim argument.
void fir::runtime::genMinlocDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
@@ -628,7 +628,7 @@ void fir::runtime::genMinlocDim(fir::FirOpBuilder &builder, mlir::Location loc,
back);
}
-/// Generate call to `minval` intrinsic runtime routine. This is the version
+/// Generate call to `MinvalDim` intrinsic runtime routine. This is the version
/// that handles any rank array with the dim argument specified.
void fir::runtime::genMinvalDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
@@ -637,8 +637,8 @@ void fir::runtime::genMinvalDim(fir::FirOpBuilder &builder, mlir::Location loc,
genReduction3Args(func, builder, loc, resultBox, arrayBox, dim, maskBox);
}
-/// Generate call to `minval` intrinsic runtime routine. This is the version
-/// that handles character arrays of rank 1 and without a DIM argument.
+/// Generate call to `MinvalCharacter` intrinsic runtime routine. This is the
+/// version that handles character arrays of rank 1 and without a DIM argument.
void fir::runtime::genMinvalChar(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
mlir::Value maskBox) {
@@ -653,7 +653,7 @@ void fir::runtime::genMinvalChar(fir::FirOpBuilder &builder, mlir::Location loc,
builder.create<fir::CallOp>(loc, func, args);
}
-/// Generate call to `minval` intrinsic runtime routine. This is the version
+/// Generate call to `Minval` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
mlir::Value fir::runtime::genMinval(fir::FirOpBuilder &builder,
mlir::Location loc, mlir::Value arrayBox,
@@ -700,7 +700,7 @@ mlir::Value fir::runtime::genMinval(fir::FirOpBuilder &builder,
return builder.create<fir::CallOp>(loc, func, args).getResult(0);
}
-/// Generate call to `product` intrinsic runtime routine. This is the version
+/// Generate call to `ProductDim` intrinsic runtime routine. This is the version
/// that handles any rank array with the dim argument specified.
void fir::runtime::genProductDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
@@ -709,7 +709,7 @@ void fir::runtime::genProductDim(fir::FirOpBuilder &builder, mlir::Location loc,
genReduction3Args(func, builder, loc, resultBox, arrayBox, dim, maskBox);
}
-/// Generate call to `product` intrinsic runtime routine. This is the version
+/// Generate call to `Product` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
mlir::Value fir::runtime::genProduct(fir::FirOpBuilder &builder,
mlir::Location loc, mlir::Value arrayBox,
@@ -777,7 +777,7 @@ mlir::Value fir::runtime::genProduct(fir::FirOpBuilder &builder,
return builder.create<fir::CallOp>(loc, func, args).getResult(0);
}
-/// Generate call to `dot_product` intrinsic runtime routine.
+/// Generate call to `DotProduct` intrinsic runtime routine.
mlir::Value fir::runtime::genDotProduct(fir::FirOpBuilder &builder,
mlir::Location loc,
mlir::Value vectorABox,
@@ -853,7 +853,7 @@ mlir::Value fir::runtime::genDotProduct(fir::FirOpBuilder &builder,
vectorBBox, sourceFile, sourceLine);
return builder.create<fir::CallOp>(loc, func, args).getResult(0);
}
-/// Generate call to Sum intrinsic runtime routine. This is the version
+/// Generate call to `SumDim` intrinsic runtime routine. This is the version
/// that handles any rank array with the dim argument specified.
void fir::runtime::genSumDim(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value resultBox, mlir::Value arrayBox,
@@ -862,7 +862,7 @@ void fir::runtime::genSumDim(fir::FirOpBuilder &builder, mlir::Location loc,
genReduction3Args(func, builder, loc, resultBox, arrayBox, dim, maskBox);
}
-/// Generate call to `sum` intrinsic runtime routine. This is the version
+/// Generate call to `Sum` intrinsic runtime routine. This is the version
/// that does not take a dim argument.
mlir::Value fir::runtime::genSum(fir::FirOpBuilder &builder, mlir::Location loc,
mlir::Value arrayBox, mlir::Value maskBox,
More information about the flang-commits
mailing list