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

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 11 02:45:25 PDT 2022


xbolva00 added inline comments.


================
Comment at: clang/test/CodeGen/attr-optimize.c:16
+
+__attribute__((optimize("Oz"))) void f4(void) {}
+// O2: @f4{{.*}}[[ATTR_OPTSIZE]]
----------------
For -Os, clang adds optsize. For -Oz, clang adds optsize and minsize. So tests should check it, maybe currently this is broken in your patch?

https://godbolt.org/z/dEsffoeW4


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