Skip to content

[flang] Regularize TODO messages for coarray related features #69227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flang/lib/Lower/Allocatable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ class AllocateStmtHelper {
errorManager.genStatCheck(builder, loc);
genAllocateObjectInit(box);
if (alloc.hasCoarraySpec())
TODO(loc, "coarray allocation");
TODO(loc, "coarray: allocation of a coarray object");
if (alloc.type.IsPolymorphic())
genSetType(alloc, box, loc);
genSetDeferredLengthParameters(alloc, box);
Expand Down Expand Up @@ -582,7 +582,7 @@ class AllocateStmtHelper {
errorManager.genStatCheck(builder, loc);
genAllocateObjectInit(box);
if (alloc.hasCoarraySpec())
TODO(loc, "coarray allocation");
TODO(loc, "coarray: allocation of a coarray object");
// Set length of the allocate object if it has. Otherwise, get the length
// from source for the deferred length parameter.
if (lenParams.empty() && box.isCharacter() &&
Expand Down
18 changes: 9 additions & 9 deletions flang/lib/Lower/Bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2625,35 +2625,35 @@ class FirConverter : public Fortran::lower::AbstractConverter {
}

void genFIR(const Fortran::parser::ChangeTeamConstruct &construct) {
TODO(toLocation(), "ChangeTeamConstruct implementation");
TODO(toLocation(), "coarray: ChangeTeamConstruct");
}
void genFIR(const Fortran::parser::ChangeTeamStmt &stmt) {
TODO(toLocation(), "ChangeTeamStmt implementation");
TODO(toLocation(), "coarray: ChangeTeamStmt");
}
void genFIR(const Fortran::parser::EndChangeTeamStmt &stmt) {
TODO(toLocation(), "EndChangeTeamStmt implementation");
TODO(toLocation(), "coarray: EndChangeTeamStmt");
}

void genFIR(const Fortran::parser::CriticalConstruct &criticalConstruct) {
setCurrentPositionAt(criticalConstruct);
TODO(toLocation(), "CriticalConstruct implementation");
TODO(toLocation(), "coarray: CriticalConstruct");
}
void genFIR(const Fortran::parser::CriticalStmt &) {
TODO(toLocation(), "CriticalStmt implementation");
TODO(toLocation(), "coarray: CriticalStmt");
}
void genFIR(const Fortran::parser::EndCriticalStmt &) {
TODO(toLocation(), "EndCriticalStmt implementation");
TODO(toLocation(), "coarray: EndCriticalStmt");
}

void genFIR(const Fortran::parser::SelectRankConstruct &selectRankConstruct) {
setCurrentPositionAt(selectRankConstruct);
TODO(toLocation(), "SelectRankConstruct implementation");
TODO(toLocation(), "coarray: SelectRankConstruct");
}
void genFIR(const Fortran::parser::SelectRankStmt &) {
TODO(toLocation(), "SelectRankStmt implementation");
TODO(toLocation(), "coarray: SelectRankStmt");
}
void genFIR(const Fortran::parser::SelectRankCaseStmt &) {
TODO(toLocation(), "SelectRankCaseStmt implementation");
TODO(toLocation(), "coarray: SelectRankCaseStmt");
}

void genFIR(const Fortran::parser::SelectTypeConstruct &selectTypeConstruct) {
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Lower/CallInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ class Fortran::lower::CallInterfaceImpl {
if (shapeAttrs.test(ShapeAttr::AssumedRank))
TODO(loc, "assumed rank in procedure interface");
if (shapeAttrs.test(ShapeAttr::Coarray))
TODO(loc, "coarray in procedure interface");
TODO(loc, "coarray: dummy argument coarray in procedure interface");

// So far assume that if the argument cannot be passed by implicit interface
// it must be by box. That may no be always true (e.g for simple optionals)
Expand Down
8 changes: 4 additions & 4 deletions flang/lib/Lower/Coarray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@ void Fortran::lower::genChangeTeamConstruct(
Fortran::lower::AbstractConverter &converter,
Fortran::lower::pft::Evaluation &,
const Fortran::parser::ChangeTeamConstruct &) {
TODO(converter.getCurrentLocation(), "CHANGE TEAM construct");
TODO(converter.getCurrentLocation(), "coarray: CHANGE TEAM construct");
}

void Fortran::lower::genChangeTeamStmt(
Fortran::lower::AbstractConverter &converter,
Fortran::lower::pft::Evaluation &,
const Fortran::parser::ChangeTeamStmt &) {
TODO(converter.getCurrentLocation(), "CHANGE TEAM stmt");
TODO(converter.getCurrentLocation(), "coarray: CHANGE TEAM statement");
}

void Fortran::lower::genEndChangeTeamStmt(
Fortran::lower::AbstractConverter &converter,
Fortran::lower::pft::Evaluation &,
const Fortran::parser::EndChangeTeamStmt &) {
TODO(converter.getCurrentLocation(), "END CHANGE TEAM");
TODO(converter.getCurrentLocation(), "coarray: END CHANGE TEAM statement");
}

void Fortran::lower::genFormTeamStatement(
Fortran::lower::AbstractConverter &converter,
Fortran::lower::pft::Evaluation &, const Fortran::parser::FormTeamStmt &) {
TODO(converter.getCurrentLocation(), "FORM TEAM");
TODO(converter.getCurrentLocation(), "coarray: FORM TEAM statement");
}

//===----------------------------------------------------------------------===//
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Lower/ConvertExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3814,7 +3814,7 @@ class ArrayExprLowering {
return false;
}
bool genShapeFromDataRef(const Fortran::evaluate::CoarrayRef &) {
TODO(getLoc(), "coarray ref");
TODO(getLoc(), "coarray: reference to a coarray in an expression");
return false;
}
bool genShapeFromDataRef(const Fortran::evaluate::Component &x) {
Expand Down Expand Up @@ -7091,7 +7091,7 @@ class ArrayExprLowering {
}

CC genarr(const Fortran::evaluate::CoarrayRef &x, ComponentPath &components) {
TODO(getLoc(), "coarray reference");
TODO(getLoc(), "coarray: reference to a coarray in an expression");
}

CC genarr(const Fortran::evaluate::NamedEntity &x,
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Lower/ConvertExprToHLFIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,11 @@ class HlfirDesignatorBuilder {

fir::FortranVariableOpInterface
gen(const Fortran::evaluate::CoarrayRef &coarrayRef) {
TODO(getLoc(), "lowering CoarrayRef to HLFIR");
TODO(getLoc(), "coarray: lowering a reference to a coarray object");
}

mlir::Type visit(const Fortran::evaluate::CoarrayRef &, PartInfo &) {
TODO(getLoc(), "lowering CoarrayRef to HLFIR");
TODO(getLoc(), "coarray: lowering a reference to a coarray object");
}

fir::FortranVariableOpInterface
Expand Down
16 changes: 8 additions & 8 deletions flang/lib/Lower/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,49 +140,49 @@ void Fortran::lower::genFailImageStatement(
void Fortran::lower::genEventPostStatement(
Fortran::lower::AbstractConverter &converter,
const Fortran::parser::EventPostStmt &) {
TODO(converter.getCurrentLocation(), "EVENT POST runtime");
TODO(converter.getCurrentLocation(), "coarray: EVENT POST runtime");
}

void Fortran::lower::genEventWaitStatement(
Fortran::lower::AbstractConverter &converter,
const Fortran::parser::EventWaitStmt &) {
TODO(converter.getCurrentLocation(), "EVENT WAIT runtime");
TODO(converter.getCurrentLocation(), "coarray: EVENT WAIT runtime");
}

void Fortran::lower::genLockStatement(
Fortran::lower::AbstractConverter &converter,
const Fortran::parser::LockStmt &) {
TODO(converter.getCurrentLocation(), "LOCK runtime");
TODO(converter.getCurrentLocation(), "coarray: LOCK runtime");
}

void Fortran::lower::genUnlockStatement(
Fortran::lower::AbstractConverter &converter,
const Fortran::parser::UnlockStmt &) {
TODO(converter.getCurrentLocation(), "UNLOCK runtime");
TODO(converter.getCurrentLocation(), "coarray: UNLOCK runtime");
}

void Fortran::lower::genSyncAllStatement(
Fortran::lower::AbstractConverter &converter,
const Fortran::parser::SyncAllStmt &) {
TODO(converter.getCurrentLocation(), "SYNC ALL runtime");
TODO(converter.getCurrentLocation(), "coarray: SYNC ALL runtime");
}

void Fortran::lower::genSyncImagesStatement(
Fortran::lower::AbstractConverter &converter,
const Fortran::parser::SyncImagesStmt &) {
TODO(converter.getCurrentLocation(), "SYNC IMAGES runtime");
TODO(converter.getCurrentLocation(), "coarray: SYNC IMAGES runtime");
}

void Fortran::lower::genSyncMemoryStatement(
Fortran::lower::AbstractConverter &converter,
const Fortran::parser::SyncMemoryStmt &) {
TODO(converter.getCurrentLocation(), "SYNC MEMORY runtime");
TODO(converter.getCurrentLocation(), "coarray: SYNC MEMORY runtime");
}

void Fortran::lower::genSyncTeamStatement(
Fortran::lower::AbstractConverter &converter,
const Fortran::parser::SyncTeamStmt &) {
TODO(converter.getCurrentLocation(), "SYNC TEAM runtime");
TODO(converter.getCurrentLocation(), "coarray: SYNC TEAM runtime");
}

void Fortran::lower::genPauseStatement(
Expand Down
3 changes: 2 additions & 1 deletion flang/lib/Lower/VectorSubscripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ class VectorSubscriptBoxBuilder {

mlir::Type gen(const Fortran::evaluate::CoarrayRef &) {
// Is this possible/legal ?
TODO(loc, "coarray ref with vector subscript in IO input");
TODO(loc, "coarray: reference to coarray object with vector subscript in "
"IO input");
}

template <typename A>
Expand Down