This is an archive of the discontinued LLVM Phabricator instance.

[Flang][Driver] Enable Rpass and other R family options.
ClosedPublic

Authored by victorkingi on Aug 8 2023, 9:26 AM.

Details

Summary

This patch allows propagation of the R family of options to the backend where a separate patch will implement the optimization
remark printing.

This patch was created to address the comment about splitting into smaller patches in https://reviews.llvm.org/D156320.

Diff Detail

Event Timeline

victorkingi created this revision.Aug 8 2023, 9:26 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
victorkingi requested review of this revision.Aug 8 2023, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2023, 9:26 AM
tblah accepted this revision.Aug 8 2023, 9:50 AM
tblah added a subscriber: tblah.

LGTM, thanks for this

This revision is now accepted and ready to land.Aug 8 2023, 9:50 AM
MaskRay added inline comments.Aug 8 2023, 5:08 PM
clang/lib/Driver/ToolChains/Flang.cpp
521

These are options, not flags (boolean).

fixed comment

kiranchandramohan retitled this revision from [Flang] Enable Rpass flag to [Flang][Driver] Enable Rpass and other R family options..Aug 9 2023, 2:01 AM
kiranchandramohan edited the summary of this revision. (Show Details)

Fix comment

victorkingi marked an inline comment as done.Aug 9 2023, 2:32 AM
awarzynski accepted this revision.Aug 9 2023, 7:38 AM

LG, with a small suggestion :) (in the spirit of cleaning up Options.td)

clang/include/clang/Driver/Options.td
818–819

IIUC, these are the all options for optimisation remarks? I would extract them to a separate "block" and wrap like this:

//===----------------------------------------------------------------------===//
// Optimisation remark options
//===----------------------------------------------------------------------===//
let Flags = [CC1Option, FC1Option, FlangOption] in {

}

refactoring Options.td

victorkingi marked an inline comment as done.Aug 9 2023, 10:36 AM
awarzynski accepted this revision.Aug 10 2023, 1:52 AM

Thanks! LGTM