[PATCH] D88914: [flang][openacc] Update Loop Construct lowering to use fir::getBase
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 10:20:08 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG726a6e84be18: [flang][openacc] Update Loop Construct lowering to use fir::getBase (authored by clementval).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88914/new/
https://reviews.llvm.org/D88914
Files:
flang/lib/Lower/OpenACC.cpp
Index: flang/lib/Lower/OpenACC.cpp
===================================================================
--- flang/lib/Lower/OpenACC.cpp
+++ flang/lib/Lower/OpenACC.cpp
@@ -15,6 +15,7 @@
#include "flang/Lower/Bridge.h"
#include "flang/Lower/FIRBuilder.h"
#include "flang/Lower/PFTBuilder.h"
+#include "flang/Lower/Support/BoxValue.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Semantics/tools.h"
#include "mlir/Dialect/OpenACC/OpenACC.h"
@@ -120,8 +121,8 @@
if (const auto &gangNumValue =
std::get<std::optional<Fortran::parser::ScalarIntExpr>>(
x.t)) {
- gangNum = converter.genExprValue(
- *Fortran::semantics::GetExpr(gangNumValue.value()));
+ gangNum = fir::getBase(converter.genExprValue(
+ *Fortran::semantics::GetExpr(gangNumValue.value())));
}
if (const auto &gangStaticValue =
std::get<std::optional<Fortran::parser::AccSizeExpr>>(x.t)) {
@@ -129,8 +130,8 @@
std::get<std::optional<Fortran::parser::ScalarIntExpr>>(
gangStaticValue.value().t);
if (expr) {
- gangStatic =
- converter.genExprValue(*Fortran::semantics::GetExpr(*expr));
+ gangStatic = fir::getBase(
+ converter.genExprValue(*Fortran::semantics::GetExpr(*expr)));
} else {
// * was passed as value and will be represented as a -1 constant
// integer.
@@ -145,16 +146,16 @@
std::get_if<Fortran::parser::AccClause::Worker>(
&clause.u)) {
if (workerClause->v) {
- workerNum = converter.genExprValue(
- *Fortran::semantics::GetExpr(*workerClause->v));
+ workerNum = fir::getBase(converter.genExprValue(
+ *Fortran::semantics::GetExpr(*workerClause->v)));
}
executionMapping |= mlir::acc::OpenACCExecMapping::WORKER;
} else if (const auto *vectorClause =
std::get_if<Fortran::parser::AccClause::Vector>(
&clause.u)) {
if (vectorClause->v) {
- vectorLength = converter.genExprValue(
- *Fortran::semantics::GetExpr(*vectorClause->v));
+ vectorLength = fir::getBase(converter.genExprValue(
+ *Fortran::semantics::GetExpr(*vectorClause->v)));
}
executionMapping |= mlir::acc::OpenACCExecMapping::VECTOR;
} else if (const auto *tileClause =
@@ -165,8 +166,8 @@
std::get<std::optional<Fortran::parser::ScalarIntConstantExpr>>(
accTileExpr.t);
if (expr) {
- tileOperands.push_back(
- converter.genExprValue(*Fortran::semantics::GetExpr(*expr)));
+ tileOperands.push_back(fir::getBase(
+ converter.genExprValue(*Fortran::semantics::GetExpr(*expr))));
} else {
// * was passed as value and will be represented as a -1 constant
// integer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88914.297628.patch
Type: text/x-patch
Size: 3097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201012/53d942d0/attachment.bin>
More information about the llvm-commits
mailing list