[all-commits] [llvm/llvm-project] c0a643: Simplify OpenMP Lambda use

David Blaikie via All-commits all-commits at lists.llvm.org
Mon Mar 7 10:23:47 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c0a6433f2b5120d79f03431e9bf61b4da1184412
      https://github.com/llvm/llvm-project/commit/c0a6433f2b5120d79f03431e9bf61b4da1184412
  Author: David Blaikie <dblaikie at gmail.com>
  Date:   2022-03-07 (Mon, 07 Mar 2022)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/lib/CodeGen/CGStmtOpenMP.cpp
    M clang/lib/CodeGen/CodeGenFunction.h

  Log Message:
  -----------
  Simplify OpenMP Lambda use

* Use default ref capture for non-escaping lambdas (this makes
  maintenance easier by allowing new uses, removing uses, having
  conditional uses (such as in assertions) not require updates to an
  explicit capture list)
* Simplify addPrivate API not to take a lambda, since it calls it
  unconditionally/immediately anyway - most callers are simply passing
  in a named value or short expression anyway and the lambda syntax just
  adds noise/overhead

Reviewed By: ABataev

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




More information about the All-commits mailing list