[PATCH] D124667: [flang][driver] Add support for consuming LLVM IR/BC files
Diana Picus via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 2 01:05:22 PDT 2022
rovka accepted this revision.
rovka added a comment.
This revision is now accepted and ready to land.
A few nits, but otherwise LGTM.
================
Comment at: flang/lib/Frontend/FrontendActions.cpp:86
+
+ // ... otherwise, generate an MLIR module from the input Fortran source
bool res = RunPrescan() && RunParse() && RunSemanticChecks();
----------------
Nit: Should we assert that the language is Language::Fortran at this point?
================
Comment at: flang/test/Driver/emit-asm-from-llvm-bc.ll:2
+; Verify that the driver can consume LLVM BC files. The expected assembly is
+; fairly (tested on AArch64 an X86_64), but we may need to tweak when testing
+; on other platforms. Note that that the actual output doesn't matter as long
----------------
================
Comment at: flang/test/Driver/emit-asm-from-llvm-bc.ll:3
+; fairly (tested on AArch64 an X86_64), but we may need to tweak when testing
+; on other platforms. Note that that the actual output doesn't matter as long
+; as it's in Assembly format.
----------------
================
Comment at: flang/test/Driver/emit-asm-from-llvm-bc.ll:9
+;-------------
+; RUN: rm -f %t.bc
+; RUN: %flang_fc1 -emit-llvm-bc %s -o %t.bc
----------------
Have you tried %basename_t.bc instead? You might be able to skip all the `rm`s then...
================
Comment at: flang/test/Driver/emit-asm-from-llvm.ll:1
+; Verify that the driver can consume LLVM IR files. The expected assembly is ;
+; fairly generic (verified on AArch64 an X86_64), but we may need to tweak when
----------------
================
Comment at: flang/test/Driver/emit-asm-from-llvm.ll:2
+; Verify that the driver can consume LLVM IR files. The expected assembly is ;
+; fairly generic (verified on AArch64 an X86_64), but we may need to tweak when
+; testing on other platforms. Note that that the actual output doesn't matter
----------------
================
Comment at: flang/test/Driver/emit-asm-from-llvm.ll:3
+; fairly generic (verified on AArch64 an X86_64), but we may need to tweak when
+; testing on other platforms. Note that that the actual output doesn't matter
+; as long as it's in Assembly format.
----------------
================
Comment at: flang/test/Driver/override-triple.ll:20
+; For the triple to be overridden by the driver, it needs to be different to the host triple.
+; Use a random string to guaranteed that.
+target triple = "invalid-triple"
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124667/new/
https://reviews.llvm.org/D124667
More information about the cfe-commits
mailing list