Open
Description
Currently one can print all passes using lfortran --pass xx examples/expr2.f90
.
High priority:
- printing ASR output after every pass - Support for print ASR after pass. #950
- easier registration of new passes - Simplifying registering passes in
pass_manager.h
#966, Simplifying registering passes inpass_manager.h
lfortran/lfortran#158 - Add an option to skip/ignore a pass in the default pipeline
Low priority:
- figure out how to handle parameters for each pass. Some kind of a map of argument name, type and value; dynamically constructed from the ASR passes cpp files; keep the door open for creating plugins for ASR passes, that are registered at runtime (using a shared library)
- Expose arguments in the driver
- Add
lfortran --print-passes
which would print all passes, one on each line, with a "name" and a "one line description" - Add
lfortran --print-pass=fma
which will print "name", "one line description", "full multi-paragraph description", "all parameters: names, types, default values" - Add
lfortran --print-pass-pipeline --show-llvm examples/expr2.f90
that will print half a page of all the passes in some format such asarr_slice,do_loops,fma[ax=5,b=7],...
including all parameters that the LLVM backend (let's say) sets for the given pass (and the given compiler options such as--fast
and architecture, for loop unrolling for example). - Add
lfortran --pass="arr_slice,fma[ax=5,b=7]" --show-llvm examples/expr2.f90
that would reproduce the default LLVM pass pipeline; then one can modify it and the command line (add/remove passes, change pass parameters) - Idea: instead of (or in addition to)
--pass="arr_slice,fma[ax=5,b=7]"
LFortran could generate (via--print-pass-pipeline
) and then the user provide a JSON file
Metadata
Metadata
Assignees
Labels
No labels