About IR style like C(transformed)
zoush99 opened this issue · 2 comments
Hello, friends! I want to use Flang to pre-process Fortran programs, which transforms to LLVM IR, then do other things on IR. But is there an option to convert it to a style similar to C to IR (make sure that the main function is present in IR)? Thank you for your response. @DavidTruby @jeffhammond @junghans @waldyrious @sscalpone
This is documented here.
For example, to emit LLVM IR for the Fortran source file foo.f90
, the command would be:
flang-new -fc1 -emit-llvm foo.f90
The LLVM IR would be in the file foo.ll
.
Thanks for your reply, I use the previous FLang-compiler version of Flang, I may have found the answer. Thank you for your dedication to open source. I can make minor modifications to your work after which will match the back end. Thank you very much!