[PATCH] D128043: [flang][driver] Add support for `-O{0|1|2|3}`

Peixin Qiao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 22 06:26:02 PDT 2022


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

LGTM



================
Comment at: clang/include/clang/Driver/Options.td:732
+def O_flag : Flag<["-"], "O">, Flags<[CC1Option,FC1Option]>, Alias<O>, AliasArgs<["1"]>;
 def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option]>;
 def P : Flag<["-"], "P">, Flags<[CC1Option,FlangOption,FC1Option]>, Group<Preprocessor_Group>,
----------------
awarzynski wrote:
> peixin wrote:
> > Will enabling Ofast require more changes in the flang frontend? If yes, it is OK to support it in another patch later.
> I would much prefer to have it implemented it in a dedicated patch.
> 
> For every option, one has to consider the semantics in the compiler driver (`flang-new`) vs frontend driver (`flang-new -fc1`) and then, in case of code-gen flags, the difference between middle-end and back-end pass pipelines. So quite a few things :)
> 
> In general, I'm in favor of doing this incrementally, in small patches. This makes reviewing and testing easier and more self-contained. Is that OK?
> In general, I'm in favor of doing this incrementally, in small patches. This makes reviewing and testing easier and more self-contained. Is that OK?

Cannot agree more.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128043



More information about the cfe-commits mailing list