[PATCH] D12246: [NVPTX] change threading intrinsics from noduplicate to convergent

Xuetian Weng via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 11:00:34 PDT 2015


wengxt created this revision.
wengxt added reviewers: jingyue, jholewinski, resistor.
wengxt added a subscriber: llvm-commits.
Herald added a subscriber: jholewinski.

Semantics of "noduplicate" is too strong for syncthreads and related
intrinsics. For example, "noduplicate" will prevent loop unrolling,
while it is a valid optimization for syncthreads inside a loop.

Also, jump threading need to consider convergent to make legitimate
optimization.

The test case is slightly modified from the original
noduplicate-syncthreads.ll, because if-else statement in in the original
test case will be optimized to "select" so JumpThreading cannot be applied.
The modified test case tries to prevent such optimization in order to
check if JumpThreading really takes convergent into account.

http://reviews.llvm.org/D12246

Files:
  include/llvm/IR/IntrinsicsNVVM.td
  lib/Transforms/Scalar/JumpThreading.cpp
  test/CodeGen/NVPTX/convergent-syncthreads.ll
  test/CodeGen/NVPTX/noduplicate-syncthreads.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12246.32845.patch
Type: text/x-patch
Size: 6821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150821/8ee6dfe9/attachment.bin>


More information about the llvm-commits mailing list