[PATCH] D96535: [flang][fir] Add fir-opt tool

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 13:31:33 PST 2021


mehdi_amini added inline comments.


================
Comment at: flang/tools/fir-opt/CMakeLists.txt:21
+  MLIRVectorToLLVM
+  MLIROptLib
+)
----------------
clementval wrote:
> mehdi_amini wrote:
> > This list of dependency should be pruned.
> > 
> > These two are obvious:
> > 
> > ```
> >   FIROptimizer
> >   MLIROptLib
> > ```
> > 
> > None of the others are.
> > I suspect the issue is that  `fir::registerFIRPasses()` should not just be an inline function in a header but would better come in an implementation file, with a CMake target that pulls in the minimum number of dependencies to link the desired passes.
> > Otherwise any user of this function has to know the list of targets, and changing the function requires to change the build configuration of every user.
> I have pruned it to a minimum. I'll check with @schweitz so we refactor fir::registerFIRPasses(). 
LG, please separate `${dialect_libs}` and `MLIRAffineToStandard` after a line `TODO: these should be transitive dependencies from a target providing "registerFIRPasses()"`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96535/new/

https://reviews.llvm.org/D96535



More information about the llvm-commits mailing list