[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

Jennifer Yu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 2 20:51:24 PDT 2022


jyu2 created this revision.
jyu2 added reviewers: abhinavgaba, ABataev, mikerice.
jyu2 added a project: OpenMP.
Herald added a project: All.
jyu2 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

It is caused by regenerate captured var value when processing the
has_device_addr, the captured var value has been generated in
GenerateOpenMPCapturedVars and passed as Arg in generateInfoForCapture.
The fix just use Arg instead regenerate, just same as is_device_ptr.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137313

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/test/OpenMP/target_has_device_addr_codegen.cpp
  clang/test/OpenMP/target_has_device_addr_codegen_01.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137313.472836.patch
Type: text/x-patch
Size: 31190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221103/add71339/attachment-0001.bin>


More information about the cfe-commits mailing list