[all-commits] [llvm/llvm-project] dd9031: [OpenMP] Avoid creating null pointer lvalue (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Dec 24 00:06:44 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dd903173c0fb9ead398b8b516f0672d30d25b120
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2021-12-24 (Fri, 24 Dec 2021)

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

  Log Message:
  [OpenMP] Avoid creating null pointer lvalue (NFC)

The reduction initialization code creates a "naturally aligned null
pointer to void lvalue", which I found somewhat odd, even though it
works out in the end because it is not actually used. It doesn't
look like this code actually needs an LValue for anything though,
and we can use an invalid Address to represent this case instead.

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

More information about the All-commits mailing list