-
Notifications
You must be signed in to change notification settings - Fork 12k
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
[flang] Regularize TODO messages for coarray related features #69227
Conversation
I want to make "not yet implemented" messages for features related to coarrays easy to identify and make them easy for users to read.
@llvm/pr-subscribers-flang-fir-hlfir Author: Pete Steinfeld (psteinfeld) ChangesI want to make "not yet implemented" messages for features related to coarrays easy to identify and make them easy for users to read. Full diff: https://github.com/llvm/llvm-project/pull/69227.diff 8 Files Affected:
diff --git a/flang/lib/Lower/Allocatable.cpp b/flang/lib/Lower/Allocatable.cpp
index a05f06aead173cc..e82b2f050ca893c 100644
--- a/flang/lib/Lower/Allocatable.cpp
+++ b/flang/lib/Lower/Allocatable.cpp
@@ -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);
@@ -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 corrary 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() &&
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 5ac4d822faaae58..ef8540c35a37286 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -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) {
diff --git a/flang/lib/Lower/CallInterface.cpp b/flang/lib/Lower/CallInterface.cpp
index 379d9be0e53a3dc..017cf48dd544133 100644
--- a/flang/lib/Lower/CallInterface.cpp
+++ b/flang/lib/Lower/CallInterface.cpp
@@ -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)
diff --git a/flang/lib/Lower/Coarray.cpp b/flang/lib/Lower/Coarray.cpp
index b5ab7b51fb00a93..a84f65a5c49e80a 100644
--- a/flang/lib/Lower/Coarray.cpp
+++ b/flang/lib/Lower/Coarray.cpp
@@ -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");
}
//===----------------------------------------------------------------------===//
diff --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp
index 8788e82b59a8df0..1bedf8c52cb0459 100644
--- a/flang/lib/Lower/ConvertExpr.cpp
+++ b/flang/lib/Lower/ConvertExpr.cpp
@@ -3814,7 +3814,7 @@ class ArrayExprLowering {
return false;
}
bool genShapeFromDataRef(const Fortran::evaluate::CoarrayRef &) {
- TODO(getLoc(), "coarray ref");
+ TODO(getLoc(), "coarray: reference to a corrary in an expression");
return false;
}
bool genShapeFromDataRef(const Fortran::evaluate::Component &x) {
@@ -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,
diff --git a/flang/lib/Lower/ConvertExprToHLFIR.cpp b/flang/lib/Lower/ConvertExprToHLFIR.cpp
index bc98fdd917d41d0..ae6cc080f02068e 100644
--- a/flang/lib/Lower/ConvertExprToHLFIR.cpp
+++ b/flang/lib/Lower/ConvertExprToHLFIR.cpp
@@ -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
diff --git a/flang/lib/Lower/Runtime.cpp b/flang/lib/Lower/Runtime.cpp
index 2cf1e522d330d4c..8855cab8b5174ea 100644
--- a/flang/lib/Lower/Runtime.cpp
+++ b/flang/lib/Lower/Runtime.cpp
@@ -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(
diff --git a/flang/lib/Lower/VectorSubscripts.cpp b/flang/lib/Lower/VectorSubscripts.cpp
index ca5dfc836e5dc3c..7439b9f7df8fdb4 100644
--- a/flang/lib/Lower/VectorSubscripts.cpp
+++ b/flang/lib/Lower/VectorSubscripts.cpp
@@ -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>
|
Thanks, Val!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @psteinfeld !
Apply a tag to coarray intrinsics to make them easier to recognize along with other coarray constructs. See pull request llvm#69227 for a similar change.
Apply a tag to coarray intrinsics to make them easier to recognize along with other coarray constructs. See pull request #69227 for a similar change.
Apply a tag to coarray intrinsics to make them easier to recognize along with other coarray constructs. See pull request llvm#69227 for a similar change.
I want to make "not yet implemented" messages for features related to coarrays easy to identify and make them easy for users to read.