[flang] Move over build recipes and rename the library
authorEric Schweitz <eschweitz@nvidia.com>
Sat, 23 Feb 2019 00:50:03 +0000 (16:50 -0800)
committerEric Schweitz <eschweitz@nvidia.com>
Mon, 11 Mar 2019 15:56:36 +0000 (08:56 -0700)
Original-commit: flang-compiler/f18@51476aa1786de4b98b8189f256ba602298fd4903
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Tree-same-pre-rewrite: false

flang/lib/CMakeLists.txt
flang/lib/FIR/CMakeLists.txt [moved from flang/lib/IntermediateRepresentation/CMakeLists.txt with 88% similarity]
flang/tools/f18/f18.cc

index a8d7869..660506e 100644 (file)
@@ -14,6 +14,6 @@
 
 add_subdirectory(common)
 add_subdirectory(evaluate)
-add_subdirectory(IntermediateRepresentation)
+add_subdirectory(FIR)
 add_subdirectory(parser)
 add_subdirectory(semantics)
similarity index 88%
rename from flang/lib/IntermediateRepresentation/CMakeLists.txt
rename to flang/lib/FIR/CMakeLists.txt
index 39650df..011aa26 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 
-add_library(FortranIntermediateRepresentation
+add_library(FortranFIR
   afforestation.cc
   basicblock.cc
   builder.cc
@@ -24,7 +24,7 @@ add_library(FortranIntermediateRepresentation
   statements.cc
 )
 
-target_link_libraries(FortranIntermediateRepresentation
+target_link_libraries(FortranFIR
   FortranCommon
   clangBasic
 )
index a0eee8f..ca6220c 100644 (file)
@@ -14,8 +14,8 @@
 
 // Temporary Fortran front end driver main program for development scaffolding.
 
-#include "../../lib/IntermediateRepresentation/afforestation.h"
-#include "../../lib/IntermediateRepresentation/graph-writer.h"
+#include "../../lib/FIR/afforestation.h"
+#include "../../lib/FIR/graph-writer.h"
 #include "../../lib/common/default-kinds.h"
 #include "../../lib/parser/characters.h"
 #include "../../lib/parser/features.h"
@@ -96,7 +96,7 @@ struct DriverOptions {
   bool dumpParseTree{false};
   bool dumpSymbols{false};
   bool dumpGraph{false};
-  bool debugLinearIntermediateRepresentation{false};
+  bool debugLinearFIR{false};
   bool debugResolveNames{false};
   bool debugSemantics{false};
   bool measureTree{false};
@@ -218,7 +218,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.debugLinearIntermediateRepresentation || driver.dumpGraph) {
+      driver.debugLinearFIR || driver.dumpGraph) {
     Fortran::semantics::Semantics semantics{
         semanticsContext, parseTree, parsing.cooked()};
     semantics.Perform();
@@ -238,9 +238,9 @@ std::string CompileFortran(std::string path, Fortran::parser::Options options,
     }
   }
   if (driver.dumpGraph) {
-    auto *fir{Fortran::IntermediateRepresentation::CreateFortranIR(parseTree,
-        semanticsContext, driver.debugLinearIntermediateRepresentation)};
-    Fortran::IntermediateRepresentation::GraphWriter::print(*fir);
+    auto *fir{Fortran::FIR::CreateFortranIR(parseTree,
+        semanticsContext, driver.debugLinearFIR)};
+    Fortran::FIR::GraphWriter::print(*fir);
     return {};
   }
   if (driver.dumpParseTree) {
@@ -419,7 +419,7 @@ int main(int argc, char *const argv[]) {
     } else if (arg == "-fdotty") {
       driver.dumpGraph = true;
     } else if (arg == "-fdebug-dump-linear-ir") {
-      driver.debugLinearIntermediateRepresentation = true;
+      driver.debugLinearFIR = true;
     } else if (arg == "-fparse-only") {
       driver.parseOnly = true;
     } else if (arg == "-c") {