[all-commits] [llvm/llvm-project] 186bea: [MSVC] Add initial support for MSVC pragma optimize

Stephen Long via All-commits all-commits at lists.llvm.org
Fri Jun 24 08:04:11 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 186bea3750d6b349de0e71044d95e2a42e087b4c
  Author: Stephen Long <steplong at quicinc.com>
  Date:   2022-06-24 (Fri, 24 Jun 2022)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticParseKinds.td
    M clang/include/clang/Parse/Parser.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Parse/ParsePragma.cpp
    M clang/lib/Sema/SemaAttr.cpp
    M clang/lib/Sema/SemaDecl.cpp
    A clang/test/CodeGen/pragma-msvc-optimize.c
    M clang/test/Preprocessor/pragma_microsoft.c

  Log Message:
  [MSVC] Add initial support for MSVC pragma optimize

MSVC's pragma optimize turns optimizations on or off based on the list
passed. At the moment, we only support an empty optimization list.

i.e. `#pragma optimize("", on | off)`

>From MSVC's docs:

| Parameter | Type of optimization                             |
| g         | Enable global optimizations. Deprecated          |
| s or t    | Specify short or fast sequences of machine code  |
| y         | Generate frame pointers on the program stack     |


Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D125723

More information about the All-commits mailing list