[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 13:35:24 PDT 2022


aeubanks added a comment.

I can't speak for @xbolva00 but the only part I'm against is the user-visible feature of

> - Added preliminary support for GCC's attribute `optimize`, which allows functions to be compiled with different optimization options than what was specified on the command line.

which implies that we're on the way to support per-function optimization levels (which we aren't)
the internal clang representation changes are all fine

and even for the MSVC pragma `#pragma optimize("t", on)`, what are we supporting if the user compiles their code with `-O0`? because right now we won't optimize anything with `-O0`


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