This is an archive of the discontinued LLVM Phabricator instance.

[Flang][Driver] Add support for fomit-frame-pointer 1/2
AbandonedPublic

Authored by victorkingi on Aug 22 2023, 5:29 AM.

Details

Summary

Mark the '-fomit-frame-pointer' as visible in the Flang Driver.

Note 1: This is just re-instating the previous behaviour that this flag is accepted by Flang but ignored.
Note 2: A subsequent patch will enable support for this flag in Flang by sharing code (after appropriate refactoring) with Clang.

Diff Detail

Event Timeline

victorkingi created this revision.Aug 22 2023, 5:29 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
victorkingi requested review of this revision.Aug 22 2023, 5:29 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 22 2023, 5:29 AM

For our immediate purpose, I think changing the visibility in the Driver to include flang is sufficient. After that, we can spend time implementing this properly by refactoring the code to llvm.

llvm/include/llvm/Frontend/Driver/FramePointer.h
11 ↗(On Diff #552322)

We should not include clang headers in llvm. We also should not refer to clang inside llvm.

Temporary fix for unknown argument error '-fomit-frame-pointer' when running flang tests

I don't follow - there's quite a lot going on here. More than the summary suggests.

kiranchandramohan retitled this revision from [Flang][Driver] Add support for fomit-frame-pointer to [Flang][Driver] Add support for fomit-frame-pointer 1/2.Aug 22 2023, 5:46 AM
kiranchandramohan edited the summary of this revision. (Show Details)

Temporary fix for unknown argument error '-fomit-frame-pointer' when running flang tests

I don't follow - there's quite a lot going on here. More than the summary suggests.

Sorry about that, will be pushing a minimal version since what was needed for the fix was only an update to Options.td file

Minimalized patch to only have update to Options.td as well as
tests accompanying the change.

victorkingi added inline comments.Aug 22 2023, 6:30 AM
clang/include/clang/Driver/Options.td
7236–7240

This will be needed in the second patch when the flag functionality is added

This comment was removed by victorkingi.

revert addition of m64 visibility in Options.td

Removed mframe_pointer_eq update in Options.td, not required.

Moved function implementations from llvm directory to clang

victorkingi abandoned this revision.Aug 31 2023, 9:04 AM