[PATCH] D155452: [Flang] Add support for fsave-optimization-record

victorkingi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 06:17:32 PDT 2023


victorkingi added inline comments.


================
Comment at: flang/test/Driver/frontend-forwarding.f90:26
 
+! RUN: %flang -### %s 2>&1 \
+! RUN:     -foptimization-record-file=%t.opt.yaml \
----------------
awarzynski wrote:
> victorkingi wrote:
> > awarzynski wrote:
> > > Is a dedicated driver invocation needed for this test?
> > since -fsave-optimization-record and foptimization-record-file both produce opt-record-file and opt-record-format flags, I couldn't find an easier way to test for both calls without having to use 2 separate flang-new invocations.
> > 
> > We could ignore the foptimization-record-file test and assume if fsave-optimization-record passes, then the former passes as well
> Ah, I see what's happening here. Neither `-fsave-optimization-record ` nor `-foptimization-record-file` are "forwarded" from `flang-new` to `flang-new -fc1` (*). So, shouldn't really be tested in this file. Please remove this change and I'll update the comment in this file to clarify this for our future selves. Apologies for the confusion.
> 
> (*) Forwarding in this context means "passing verbatim from `flang-new` to `flang-new -fc1`"
moved the test to flang/test/Driver/fsave-optimization-record.f90


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155452



More information about the cfe-commits mailing list