[all-commits] [llvm/llvm-project] 2bcda6: [Sema, CodeGen] Implement [[likely]] and [[unlikel...

mordante via All-commits all-commits at lists.llvm.org
Sun Oct 18 04:49:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2bcda6bb2896f0f8daf67343edfc64fb226f3e3f
      https://github.com/llvm/llvm-project/commit/2bcda6bb2896f0f8daf67343edfc64fb226f3e3f
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2020-10-18 (Sun, 18 Oct 2020)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Stmt.h
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/lib/AST/Stmt.cpp
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    A clang/test/CodeGenCXX/attr-likelihood-switch-branch-weights.cpp
    M clang/test/Preprocessor/has_attribute.cpp
    M clang/www/cxx_status.html

  Log Message:
  -----------
  [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in SwitchStmt

This implements the likelihood attribute for the switch statement. Based on the
discussion in D85091 and D86559 it only handles the attribute when placed on
the case labels or the default labels.

It also marks the likelihood attribute as feature complete. There are more QoI
patches in the pipeline.

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


  Commit: a2f8407801dcf0c0933f68ab28426928d2ca1fea
      https://github.com/llvm/llvm-project/commit/a2f8407801dcf0c0933f68ab28426928d2ca1fea
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2020-10-18 (Sun, 18 Oct 2020)

  Changed paths:
    M clang/include/clang/Basic/AttrDocs.td

  Log Message:
  -----------
  [NFC] Fixes a documentation typo.


Compare: https://github.com/llvm/llvm-project/compare/7081db99eee0...a2f8407801dc


More information about the All-commits mailing list