[all-commits] [llvm/llvm-project] a6be6e: [flang][driver] Add `-fdebug-dump-all`

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Wed Jun 16 00:54:51 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a6be6e31f1810012922e50dab0d4c15cdf990d2e
      https://github.com/llvm/llvm-project/commit/a6be6e31f1810012922e50dab0d4c15cdf990d2e
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2021-06-16 (Wed, 16 Jun 2021)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M flang/include/flang/Frontend/FrontendActions.h
    M flang/include/flang/Frontend/FrontendOptions.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
    M flang/test/Driver/driver-help.f90
    A flang/test/Driver/dump-all.f90

  Log Message:
  -----------
  [flang][driver] Add `-fdebug-dump-all`

The new option will run the semantic checks and then dump the parse tree
and all the symbols. This is equivalent to running the driver twice,
once with `-fdebug-dump-parse-tree` and then with
the `-fdebug-dump-symbols` action flag.

Currently we wouldn't be able to achieve the same by simply running:
```
flang-new -fc1 -fdebug-dump-parse-tree -fdebug-dump-symbols <input-file>
```
That's because the new driver will only run one frontend action per
invocation (both of the flags used here are action flags). Diverging
from this design would lead to costly compromises and it's best avoided.

We may want to consider re-designing our debugging actions (and action
options) in the future so that there's more code re-use. For now, I'm
focusing on making sure that we support all the major cases requested by
our users.

Differential Revision: https://reviews.llvm.org/D104305




More information about the All-commits mailing list