Skip to content

Commit 83fa975

Browse files
committed
[flang][openacc] Handle array section and derived-type components operands
This patch lowers correctly operands with array section and derived-type component. Depends on D131764 Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D131765
1 parent eaf0aa1 commit 83fa975

File tree

5 files changed

+293
-67
lines changed

5 files changed

+293
-67
lines changed

flang/include/flang/Lower/OpenACC.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ struct OpenACCConstruct;
1919
struct OpenACCDeclarativeConstruct;
2020
} // namespace parser
2121

22+
namespace semantics {
23+
class SemanticsContext;
24+
}
25+
2226
namespace lower {
2327

2428
class AbstractConverter;
@@ -27,8 +31,9 @@ namespace pft {
2731
struct Evaluation;
2832
} // namespace pft
2933

30-
void genOpenACCConstruct(AbstractConverter &, pft::Evaluation &,
31-
const parser::OpenACCConstruct &);
34+
void genOpenACCConstruct(AbstractConverter &,
35+
Fortran::semantics::SemanticsContext &,
36+
pft::Evaluation &, const parser::OpenACCConstruct &);
3237
void genOpenACCDeclarativeConstruct(
3338
AbstractConverter &, pft::Evaluation &,
3439
const parser::OpenACCDeclarativeConstruct &);

flang/lib/Lower/Bridge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
16311631

16321632
void genFIR(const Fortran::parser::OpenACCConstruct &acc) {
16331633
mlir::OpBuilder::InsertPoint insertPt = builder->saveInsertionPoint();
1634-
genOpenACCConstruct(*this, getEval(), acc);
1634+
genOpenACCConstruct(*this, bridge.getSemanticsContext(), getEval(), acc);
16351635
for (Fortran::lower::pft::Evaluation &e : getEval().getNestedEvaluations())
16361636
genFIR(e);
16371637
builder->restoreInsertionPoint(insertPt);

0 commit comments

Comments
 (0)