[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-24 Thread Sergio Afonso via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. skatrak marked an inline comment as done. Closed by commit rG33be83415c9b: [flang][driver][openmp] Write MLIR for -save-temps (authored by skatrak). Repository: rG L

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. LGTM! Comment at: flang/test/Driver/save-temps.f90:14 ! CHECK-NEXT: "-o" "save-temps.o" ! CHECK-NEXT: "-o" "a.out" skatrak wrote: > awarzynski wrote: > > skatrak wrote: > > > awarzynski wrote: >

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-24 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak marked 3 inline comments as done. skatrak added inline comments. Comment at: flang/lib/Frontend/FrontendActions.cpp:103 + std::error_code ec; + llvm::ToolOutputFile out(outDir + outFile, ec, llvm::sys::fs::OF_Text); + if (ec) awarzynski wrote: > skatra

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-24 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak updated this revision to Diff 508099. skatrak added a comment. Herald added subscribers: Moerafaat, zero9178, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, nicolasvasilache, a

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-23 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This is a very nice patch, thanks for working on this! A few final nits, but feel free to ignore. LGTM Comment at: flang/lib/Frontend/FrontendActions.cpp:103 + std::error_code ec; + llvm::ToolOutputFile out(outDi

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-23 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak added a comment. @awarzynski, can you confirm whether your concerns have been addressed? Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146075/new/ https://reviews.llvm.org/D146075 ___

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-23 Thread Greg Rodgers via Phabricator via cfe-commits
gregrodgers accepted this revision. gregrodgers added a comment. This looks good. Please merge. I found it very useful especially in the context of other generated temp files generated after llvm llinking and optimization in the offload driver. For example just listing the temp files with ls

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-22 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak added a comment. Thanks again for helping improving this patch. I made most of the changes requested, and tried to clarify a bit better the approach followed for this implementation, to see if it is acceptable or if some more fundamental changes have to be done. Comm

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-22 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak updated this revision to Diff 507365. skatrak marked 6 inline comments as done. skatrak added a comment. Changes to tests and path manipulation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146075/new/ https://reviews.llvm.org/D146075 File

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-21 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thanks for the updates! I advice against using UPPER case in filenames. Please bear in mind that on Windows and MacOS filenames are case insensitive. It's just less hassle to stick to lower case. Comment at: flang/lib/Frontend/FrontendActions.cpp:

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-21 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak marked 4 inline comments as done. skatrak added a comment. Thank you for the feedback! I'll wait for confirmation before landing this patch, in case there are further comments relating to tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-21 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak updated this revision to Diff 507001. skatrak added a comment. Address reviewers comments and update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146075/new/ https://reviews.llvm.org/D146075 Files: clang/include/clang/Driver/Optio

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-15 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Frontend is in the file name. Comment at: flang/lib/Frontend/FrontendActions.cpp:79 + llvm::StringRef inputFile, llvm::StringRef outputTag) { + if (!ci.getCodeGenOpts().SaveTempsDir.has_value()) { +return true; ---

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D146075#4196998 , @tschuett wrote: > What is the policy on trivial braces in the frontend? What do you mean by the frontend? Different people have different understanding of what "the frontend" is. I try to follow https:

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-15 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. What is the policy on trivial braces in the frontend? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146075/new/ https://reviews.llvm.org/D146075 ___ cfe-commits mailing list cfe

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-15 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: flang/lib/Frontend/FrontendActions.cpp:77 +/// specified. +bool saveMLIRTempFile(const CompilerInvocation &ci, mlir::ModuleOp mlirModule, + llvm::StringRef inputFile, llvm::StringRef outputTag) { st

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Please add tests ;) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146075/new/ https://reviews.llvm.org/D146075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-15 Thread Mats Petersson via Phabricator via cfe-commits
Leporacanthicus accepted this revision. Leporacanthicus added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146075/new/ https://reviews.llvm.org/D146075

[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

2023-03-14 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak created this revision. skatrak added reviewers: gregrodgers, dpalermo, domada, jsjodin, agozillon, kiranchandramohan, awarzynski. Herald added subscribers: sunshaoce, bzcheeseman, rriddle, guansong, yaxunl. Herald added a reviewer: sscalpone. Herald added projects: Flang, All. skatrak requ