[all-commits] [llvm/llvm-project] 9ca5a6: [OPENMP]Fix PR46146: Do not consider globalized va...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Thu Jun 4 09:36:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ca5a6d3b523688be8b4c2315482297fa943c777
      https://github.com/llvm/llvm-project/commit/9ca5a6d3b523688be8b4c2315482297fa943c777
  Author: Alexey Bataev <a.bataev at hotmail.com>
  Date:   2020-06-04 (Thu, 04 Jun 2020)

  Changed paths:
    M clang/lib/CodeGen/CGStmt.cpp
    A clang/test/OpenMP/nvptx_NRVO_variable.cpp

  Log Message:
  -----------
  [OPENMP]Fix PR46146: Do not consider globalized variables as NRVO candidates.

Summary:
If the variables must be globalized in OpenMP mode (local automatic
variable, GPU compilation mode, the variable may escape its declaration
context by the reference or by the pointer), it should not be considered
as the NRVO candidate. Otherwise, incorrect the return value of the
function might not be updated.

Reviewers: jdoerfert

Subscribers: yaxunl, guansong, sstefan1, cfe-commits, caomhin

Tags: #clang

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




More information about the All-commits mailing list