[flang-commits] [flang] 9907591 - [flang] Add lowering placeholders
Valentin Clement via flang-commits
flang-commits at lists.llvm.org
Tue Feb 1 04:50:17 PST 2022
Author: Valentin Clement
Date: 2022-02-01T13:50:09+01:00
New Revision: 990759136a268fa51695d04f845ce7f9b36a842f
URL: https://github.com/llvm/llvm-project/commit/990759136a268fa51695d04f845ce7f9b36a842f
DIFF: https://github.com/llvm/llvm-project/commit/990759136a268fa51695d04f845ce7f9b36a842f.diff
LOG: [flang] Add lowering placeholders
This patch puts in place the differents
function to lower the evaluation list. All functions
are just placholders with TODOs for now.
Follow up patches will bring the proper lowering in these
functions.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D118678
Added:
Modified:
flang/lib/Lower/Bridge.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 20756b9252c67..3645152444e06 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -201,6 +201,8 @@ class FirConverter : public Fortran::lower::AbstractConverter {
entryIndex < last; ++entryIndex) {
funit.setActiveEntry(entryIndex);
startNewFunction(funit); // the entry point for lowering this procedure
+ for (Fortran::lower::pft::Evaluation &eval : funit.evaluationList)
+ genFIR(eval);
endNewFunction(funit);
}
funit.setActiveEntry(0);
@@ -238,6 +240,407 @@ class FirConverter : public Fortran::lower::AbstractConverter {
}
void genFIR(const Fortran::parser::EndProgramStmt &) { genExitRoutine(); }
+ void genFIR(const Fortran::parser::CallStmt &stmt) {
+ TODO(toLocation(), "CallStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ComputedGotoStmt &stmt) {
+ TODO(toLocation(), "ComputedGotoStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ArithmeticIfStmt &stmt) {
+ TODO(toLocation(), "ArithmeticIfStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::AssignedGotoStmt &stmt) {
+ TODO(toLocation(), "AssignedGotoStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::DoConstruct &doConstruct) {
+ TODO(toLocation(), "DoConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::IfConstruct &) {
+ TODO(toLocation(), "IfConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::CaseConstruct &) {
+ TODO(toLocation(), "CaseConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::ConcurrentHeader &header) {
+ TODO(toLocation(), "ConcurrentHeader lowering");
+ }
+
+ void genFIR(const Fortran::parser::ForallAssignmentStmt &stmt) {
+ TODO(toLocation(), "ForallAssignmentStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndForallStmt &) {
+ TODO(toLocation(), "EndForallStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ForallStmt &) {
+ TODO(toLocation(), "ForallStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ForallConstruct &) {
+ TODO(toLocation(), "ForallConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::ForallConstructStmt &) {
+ TODO(toLocation(), "ForallConstructStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::CompilerDirective &) {
+ TODO(toLocation(), "CompilerDirective lowering");
+ }
+
+ void genFIR(const Fortran::parser::OpenACCConstruct &) {
+ TODO(toLocation(), "OpenACCConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::OpenACCDeclarativeConstruct &) {
+ TODO(toLocation(), "OpenACCDeclarativeConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::OpenMPConstruct &) {
+ TODO(toLocation(), "OpenMPConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::OpenMPDeclarativeConstruct &) {
+ TODO(toLocation(), "OpenMPDeclarativeConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::SelectCaseStmt &) {
+ TODO(toLocation(), "SelectCaseStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::AssociateConstruct &) {
+ TODO(toLocation(), "AssociateConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::BlockConstruct &blockConstruct) {
+ TODO(toLocation(), "BlockConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::BlockStmt &) {
+ TODO(toLocation(), "BlockStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndBlockStmt &) {
+ TODO(toLocation(), "EndBlockStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ChangeTeamConstruct &construct) {
+ TODO(toLocation(), "ChangeTeamConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::ChangeTeamStmt &stmt) {
+ TODO(toLocation(), "ChangeTeamStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndChangeTeamStmt &stmt) {
+ TODO(toLocation(), "EndChangeTeamStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::CriticalConstruct &criticalConstruct) {
+ TODO(toLocation(), "CriticalConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::CriticalStmt &) {
+ TODO(toLocation(), "CriticalStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndCriticalStmt &) {
+ TODO(toLocation(), "EndCriticalStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::SelectRankConstruct &selectRankConstruct) {
+ TODO(toLocation(), "SelectRankConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::SelectRankStmt &) {
+ TODO(toLocation(), "SelectRankStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::SelectRankCaseStmt &) {
+ TODO(toLocation(), "SelectRankCaseStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::SelectTypeConstruct &selectTypeConstruct) {
+ TODO(toLocation(), "SelectTypeConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::SelectTypeStmt &) {
+ TODO(toLocation(), "SelectTypeStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::TypeGuardStmt &) {
+ TODO(toLocation(), "TypeGuardStmt lowering");
+ }
+
+ //===--------------------------------------------------------------------===//
+ // IO statements (see io.h)
+ //===--------------------------------------------------------------------===//
+
+ void genFIR(const Fortran::parser::BackspaceStmt &stmt) {
+ TODO(toLocation(), "BackspaceStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::CloseStmt &stmt) {
+ TODO(toLocation(), "CloseStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndfileStmt &stmt) {
+ TODO(toLocation(), "EndfileStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::FlushStmt &stmt) {
+ TODO(toLocation(), "FlushStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::InquireStmt &stmt) {
+ TODO(toLocation(), "InquireStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::OpenStmt &stmt) {
+ TODO(toLocation(), "OpenStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::PrintStmt &stmt) {
+ TODO(toLocation(), "PrintStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ReadStmt &stmt) {
+ TODO(toLocation(), "ReadStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::RewindStmt &stmt) {
+ TODO(toLocation(), "RewindStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::WaitStmt &stmt) {
+ TODO(toLocation(), "WaitStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::WriteStmt &stmt) {
+ TODO(toLocation(), "WriteStmt lowering");
+ }
+
+ //===--------------------------------------------------------------------===//
+ // Memory allocation and deallocation
+ //===--------------------------------------------------------------------===//
+
+ void genFIR(const Fortran::parser::AllocateStmt &stmt) {
+ TODO(toLocation(), "AllocateStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::DeallocateStmt &stmt) {
+ TODO(toLocation(), "DeallocateStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::NullifyStmt &stmt) {
+ TODO(toLocation(), "NullifyStmt lowering");
+ }
+
+ //===--------------------------------------------------------------------===//
+
+ void genFIR(const Fortran::parser::EventPostStmt &stmt) {
+ TODO(toLocation(), "EventPostStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EventWaitStmt &stmt) {
+ TODO(toLocation(), "EventWaitStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::FormTeamStmt &stmt) {
+ TODO(toLocation(), "FormTeamStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::LockStmt &stmt) {
+ TODO(toLocation(), "LockStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::WhereConstruct &c) {
+ TODO(toLocation(), "WhereConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::WhereBodyConstruct &body) {
+ TODO(toLocation(), "WhereBodyConstruct lowering");
+ }
+
+ void genFIR(const Fortran::parser::WhereConstructStmt &stmt) {
+ TODO(toLocation(), "WhereConstructStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::WhereConstruct::MaskedElsewhere &ew) {
+ TODO(toLocation(), "MaskedElsewhere lowering");
+ }
+
+ void genFIR(const Fortran::parser::MaskedElsewhereStmt &stmt) {
+ TODO(toLocation(), "MaskedElsewhereStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::WhereConstruct::Elsewhere &ew) {
+ TODO(toLocation(), "Elsewhere lowering");
+ }
+
+ void genFIR(const Fortran::parser::ElsewhereStmt &stmt) {
+ TODO(toLocation(), "ElsewhereStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndWhereStmt &) {
+ TODO(toLocation(), "EndWhereStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::WhereStmt &stmt) {
+ TODO(toLocation(), "WhereStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::PointerAssignmentStmt &stmt) {
+ TODO(toLocation(), "PointerAssignmentStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::AssignmentStmt &stmt) {
+ TODO(toLocation(), "AssignmentStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::SyncAllStmt &stmt) {
+ TODO(toLocation(), "SyncAllStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::SyncImagesStmt &stmt) {
+ TODO(toLocation(), "SyncImagesStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::SyncMemoryStmt &stmt) {
+ TODO(toLocation(), "SyncMemoryStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::SyncTeamStmt &stmt) {
+ TODO(toLocation(), "SyncTeamStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::UnlockStmt &stmt) {
+ TODO(toLocation(), "UnlockStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::AssignStmt &stmt) {
+ TODO(toLocation(), "AssignStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::FormatStmt &) {
+ TODO(toLocation(), "FormatStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::PauseStmt &stmt) {
+ TODO(toLocation(), "PauseStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::FailImageStmt &stmt) {
+ TODO(toLocation(), "FailImageStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::StopStmt &stmt) {
+ TODO(toLocation(), "StopStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ReturnStmt &stmt) {
+ TODO(toLocation(), "ReturnStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::CycleStmt &) {
+ TODO(toLocation(), "CycleStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ExitStmt &) {
+ TODO(toLocation(), "ExitStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::GotoStmt &) {
+ TODO(toLocation(), "GotoStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::AssociateStmt &) {
+ TODO(toLocation(), "AssociateStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::CaseStmt &) {
+ TODO(toLocation(), "CaseStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ContinueStmt &) {
+ TODO(toLocation(), "ContinueStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ElseIfStmt &) {
+ TODO(toLocation(), "ElseIfStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::ElseStmt &) {
+ TODO(toLocation(), "ElseStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndAssociateStmt &) {
+ TODO(toLocation(), "EndAssociateStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndDoStmt &) {
+ TODO(toLocation(), "EndDoStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndFunctionStmt &) {
+ TODO(toLocation(), "EndFunctionStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndIfStmt &) {
+ TODO(toLocation(), "EndIfStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndMpSubprogramStmt &) {
+ TODO(toLocation(), "EndMpSubprogramStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndSelectStmt &) {
+ TODO(toLocation(), "EndSelectStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EndSubroutineStmt &) {
+ TODO(toLocation(), "EndSubroutineStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::EntryStmt &) {
+ TODO(toLocation(), "EntryStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::IfStmt &) {
+ TODO(toLocation(), "IfStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::IfThenStmt &) {
+ TODO(toLocation(), "IfThenStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::NonLabelDoStmt &) {
+ TODO(toLocation(), "NonLabelDoStmt lowering");
+ }
+
+ void genFIR(const Fortran::parser::OmpEndLoopDirective &) {
+ TODO(toLocation(), "OmpEndLoopDirective lowering");
+ }
+
+ void genFIR(const Fortran::parser::NamelistStmt &) {
+ TODO(toLocation(), "NamelistStmt lowering");
+ }
+
+ void genFIR(Fortran::lower::pft::Evaluation &eval,
+ bool unstructuredContext = true) {
+ setCurrentEval(eval);
+ setCurrentPosition(eval.position);
+ eval.visit([&](const auto &stmt) { genFIR(stmt); });
+ }
+
//===--------------------------------------------------------------------===//
Fortran::lower::LoweringBridge &bridge;
More information about the flang-commits
mailing list