[Openmp-commits] [PATCH] D109998: [OpenMP] Simplify all stores in the device code

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Sep 20 11:36:59 PDT 2021


tianshilei1992 accepted this revision.
tianshilei1992 added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/test/Transforms/OpenMP/spmdization.ll:2107
 ; NVPTX-DISABLED-NEXT:    [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
-; NVPTX-DISABLED-NEXT:    store i32 0, i32* [[DOTZERO_ADDR]], align 4
 ; NVPTX-DISABLED-NEXT:    [[TMP0:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* @[[GLOB1]], i1 false, i1 false, i1 true)
----------------
Can we do further? Since the store to this variable is removed, its value now is meaningless. We don't have to pass it to the function call below, and we can remove the argument for the callee, and we don't need to allocate this variable.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109998/new/

https://reviews.llvm.org/D109998



More information about the Openmp-commits mailing list