From: Eric Schweitz Date: Thu, 6 Jun 2019 17:53:38 +0000 (-0700) Subject: [flang] Remove the old FIR middle end from the f18 program and speed up build time. X-Git-Tag: llvmorg-12-init~9537^2~1137 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bbcc8c1d871c94afa9093de180cb68636d8787c;p=platform%2Fupstream%2Fllvm.git [flang] Remove the old FIR middle end from the f18 program and speed up build time. Original-commit: flang-compiler/f18@5b410b978c50cb367aa9f5e706afea4bd8e1d854 Reviewed-on: https://github.com/flang-compiler/f18/pull/489 Tree-same-pre-rewrite: false --- diff --git a/flang/lib/CMakeLists.txt b/flang/lib/CMakeLists.txt index a0f33da..660506e 100644 --- a/flang/lib/CMakeLists.txt +++ b/flang/lib/CMakeLists.txt @@ -17,4 +17,3 @@ add_subdirectory(evaluate) add_subdirectory(FIR) add_subdirectory(parser) add_subdirectory(semantics) -add_subdirectory(bridge) diff --git a/flang/lib/FIR/CMakeLists.txt b/flang/lib/FIR/CMakeLists.txt index 0c1fa7c..f59acccc 100644 --- a/flang/lib/FIR/CMakeLists.txt +++ b/flang/lib/FIR/CMakeLists.txt @@ -14,7 +14,6 @@ add_library(FortranFIR - afforestation.cc basicblock.cc builder.cc flattened.cc diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt index 0da3f9d..04fe7a7 100644 --- a/flang/tools/f18/CMakeLists.txt +++ b/flang/tools/f18/CMakeLists.txt @@ -12,11 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -if(LINK_WITH_FIR) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLINK_WITH_FIR") - set(FORTRAN_FIR_LIB "FortranFIR") -endif() - add_executable(f18 f18.cc dump.cc @@ -26,8 +21,6 @@ target_link_libraries(f18 FortranParser FortranEvaluate FortranSemantics - ${FORTRAN_FIR_LIB} - ${LLVM_COMMON_LIBS} ) add_executable(f18-parse-demo diff --git a/flang/tools/f18/f18.cc b/flang/tools/f18/f18.cc index ab59589..5a1d34b 100644 --- a/flang/tools/f18/f18.cc +++ b/flang/tools/f18/f18.cc @@ -14,10 +14,6 @@ // Temporary Fortran front end driver main program for development scaffolding. -#ifdef LINK_WITH_FIR -#include "../../lib/FIR/afforestation.h" -#include "../../lib/FIR/graph-writer.h" -#endif #include "../../lib/common/default-kinds.h" #include "../../lib/evaluate/expression.h" #include "../../lib/parser/characters.h" @@ -99,8 +95,6 @@ struct DriverOptions { bool dumpUnparseWithSymbols{false}; bool dumpParseTree{false}; bool dumpSymbols{false}; - bool dumpGraph{false}; - bool debugLinearFIR{false}; bool debugResolveNames{false}; bool debugSemantics{false}; bool measureTree{false}; @@ -222,8 +216,7 @@ std::string CompileFortran(std::string path, Fortran::parser::Options options, } // TODO: Change this predicate to just "if (!driver.debugNoSemantics)" if (driver.debugSemantics || driver.debugResolveNames || driver.dumpSymbols || - driver.dumpUnparseWithSymbols || driver.debugLinearFIR || - driver.dumpGraph) { + driver.dumpUnparseWithSymbols) { Fortran::semantics::Semantics semantics{ semanticsContext, parseTree, parsing.cooked()}; semantics.Perform(); @@ -245,14 +238,6 @@ std::string CompileFortran(std::string path, Fortran::parser::Options options, return {}; } } - if (driver.dumpGraph) { -#ifdef LINK_WITH_FIR - auto *fir{Fortran::FIR::CreateFortranIR( - parseTree, semanticsContext, driver.debugLinearFIR)}; - Fortran::FIR::GraphWriter::print(*fir); -#endif - return {}; - } if (driver.dumpParseTree) { Fortran::parser::DumpTree(std::cout, parseTree); } @@ -438,10 +423,6 @@ int main(int argc, char *const argv[]) { driver.dumpUnparse = true; } else if (arg == "-funparse-with-symbols") { driver.dumpUnparseWithSymbols = true; - } else if (arg == "-fdotty") { - driver.dumpGraph = true; - } else if (arg == "-fdebug-dump-linear-ir") { - driver.debugLinearFIR = true; } else if (arg == "-fparse-only") { driver.parseOnly = true; } else if (arg == "-c") { @@ -495,8 +476,6 @@ int main(int argc, char *const argv[]) { << " -fdebug-resolve-names\n" << " -fdebug-instrumented-parse\n" << " -fdebug-semantics perform semantic checks\n" - << " -fdotty print FIR as a dotty graph\n" - << " -fdebug-dump-linear-ir dump the flat linear FIR for debug\n" << " -v -c -o -I -D -U have their usual meanings\n" << " -help print this again\n" << "Other options are passed through to the compiler.\n";