[PATCH] D26348: Allow convergent attribute for function arguments

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 06:15:18 PST 2016


nhaehnle updated this revision to Diff 79063.
nhaehnle added a comment.

- Clarify that the set of threads is target-dependent (I'm still open to eliminating that paragraph outright if people find it confusing)
- Talk about executions of functions
- No mention of concurrency or simultaneous execution (except for the motivational explanation in the first paragraph), per @mehdi_amini
- Add an explicit paragraph about calling functions containing call-sites with convergent function parameters

On the last point, this is fairly restrictive right now.  E.g. one could
ask what happens if the called function F passes a value that was loaded
from memory to a convergent parameter.  At least for AMDGPU purposes it's
fine to leave that undefined, and probably will remain so for a long time.

When/If it does become an issue, I suspect that solving this will require a
new function attribute (convergentmem?).  However, I'd rather leave this
open for now.


https://reviews.llvm.org/D26348

Files:
  docs/LangRef.rst
  include/llvm/Analysis/CodeMetrics.h
  include/llvm/IR/Instructions.h
  include/llvm/IR/Intrinsics.td
  include/llvm/IR/IntrinsicsAMDGPU.td
  lib/Analysis/CodeMetrics.cpp
  lib/AsmParser/LLParser.cpp
  lib/IR/Verifier.cpp
  lib/Transforms/Scalar/GVNHoist.cpp
  lib/Transforms/Scalar/LoopUnrollPass.cpp
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/Bitcode/attributes.ll
  test/Transforms/GVNHoist/hoist-convergent.ll
  test/Transforms/InstCombine/select-call.ll
  test/Transforms/LoopUnroll/convergent.ll
  test/Transforms/SimplifyCFG/convergent.ll
  utils/TableGen/CodeGenIntrinsics.h
  utils/TableGen/CodeGenTarget.cpp
  utils/TableGen/IntrinsicEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26348.79063.patch
Type: text/x-patch
Size: 22299 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161123/ec3073f1/attachment.bin>


More information about the llvm-commits mailing list