[PATCH] D59509: Make static constructors + destructors minsize + cold (except for in -O0)

Jessica Paquette via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 13:29:59 PDT 2019


paquette created this revision.
paquette added reviewers: rsmith, jyknight.
Herald added a project: clang.

Since these are only ever run once, they can be marked as cold. On top of that, since they're only ever run once, they might as well be minsize.

I observed a 0.21% code size improvement in a standard release build of clang for x86 with this change.


Repository:
  rC Clang

https://reviews.llvm.org/D59509

Files:
  clang/lib/CodeGen/CGDeclCXX.cpp
  clang/test/CodeGen/address-safety-attr.cpp
  clang/test/CodeGen/static-attr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59509.191155.patch
Type: text/x-patch
Size: 4609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190318/be8b5c4e/attachment.bin>


More information about the cfe-commits mailing list