[PATCH] D126984: [clang] Add initial support for gcc's optimize function attribute

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 10 10:57:47 PDT 2022


aeubanks added a comment.

In D126984#3574046 <https://reviews.llvm.org/D126984#3574046>, @aaron.ballman wrote:

> In D126984#3571573 <https://reviews.llvm.org/D126984#3571573>, @aeubanks wrote:
>
>> IIRC in the past there was a strong preference to not have the pass manager support this sort of thing
>> if you want to support this, there should be an RFC for how the optimization part of this will work as it may require invasive changes to the LLVM pass manager
>>
>> (if this is purely a clang frontend thing then ignore me)
>
> Hmm, does the pass manager have to support anything here? The only Clang codegen changes are for emitting IR attributes that we already emitted based on command line flags/other attributes, so I had the impression this would not be invasive for the backend at all.

if we're allowing individual functions to specify that they want the `-O1` pipeline when everything else in the module should be compiled with `-O2`, that's a huge change in the pass manager. but perhaps I'm misunderstanding the point of this patch


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126984



More information about the cfe-commits mailing list