[PATCH] D96884: [flang][driver] Add debug measure-parse-tree and pre-fir-tree options

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 19 02:42:17 PST 2021


awarzynski accepted this revision.
awarzynski added a comment.
This revision is now accepted and ready to land.

Thank you for updating this @FarisRehman !

The original implementation of ``-fdebug-parsing-log` submitted here was not 100% compatible with `-fdebug-instrumented-parse` from `f18` as we originally thought. I think that that's fine, but we need something that gives us such compatibility. We probably need another flag for that, e.g. `-finstrumented-parse`, that would toggle `Fortran::parser::instrumentedParse`. This way we will have this:

- `-fdebug-parsing-log` (`flang-new -fc1`) != `-fdebug-instrumented-parse` (`f18`)
- `-fdebug-parsing-log -finstrumented-parse` (`flang-new -fc1`) == `-fdebug-instrumented-parse` (`f18`)

But that's quite a few new scenarios and it's worth submitting as a separate patch.

You've also changed the order of flags in tests. This is also fine and guarantees that tests work with both `f18` and `flang-new -fc1`:

- in `flang-new -fc1` only the last _action_ option is take into account, so `-fsyntax-only` is effectively ignored (and not needed)
- in `f18` we still need `-fsyntax-only` to make sure that code-generation is not run (e.g. to make `f18` exit _after_ running the semantic checks), but the order is irrelevant

All this makes a lot of sense, thank you for adding these! LGTM!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96884



More information about the cfe-commits mailing list