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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 12:31:16 PDT 2021


jdoerfert added inline comments.


================
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)
----------------
tianshilei1992 wrote:
> 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.
Will happen eventually.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109998



More information about the llvm-commits mailing list