Page MenuHomePhabricator

[Attribute] Add attribute NeverOptimizeNone
AbandonedPublic

Authored by steplong on May 16 2022, 12:59 PM.

Details

Summary

Add NeverOptimizeNone to facilitate removing OptimizeNone. This allows
us to remove OptimizeNone even if -O0 is passed on the cmdline. This patch
is needed for D125723 to allow removing OptimizeNone from a function.

Diff Detail

Event Timeline

steplong created this revision.May 16 2022, 12:59 PM
Herald added a project: Restricted Project. · View Herald Transcript
steplong requested review of this revision.May 16 2022, 12:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2022, 12:59 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
arsenm added a subscriber: arsenm.May 16 2022, 3:13 PM
arsenm added inline comments.
clang/lib/CodeGen/CodeGenModule.cpp
1934

I still think adding optnone to everything at -O0 is a bad idea in the first place, and the optimization level should not be encoded in the IR

steplong edited the summary of this revision. (Show Details)May 17 2022, 1:16 PM
steplong added a reviewer: arsenm.
steplong abandoned this revision.Mon, Jun 13, 11:35 AM

Abandoning in favor of D126984