[PATCH] D33240: [Atomics] Rename and change prototype for atomic memcpy intrinsic

Daniel Neilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 08:44:14 PDT 2017


dneilson updated this revision to Diff 100415.
dneilson added a comment.

- Another iteration on the intrinsic prototype. I've removed the align, and dest/src_unordered arguments.
  - Having align both as arg attributes and as an arg could cause challenges if we need to resolve a difference, and it is the desired future direction for intrinsics.
  - Upon further thought, and digging into where passes would have to be made aware of this intrinsic -- I'm no longer convinced about the value of the separate dest_unordered/src_unordered args.
    - It seems sufficient to have the semantics of the intrinsic being that all loads/stores are unordered atomic; we can still "promote" idioms that mix, say, unordered loads with simple stores.
    - Any library implementation will just use unordered atomic loads & stores throughout, anyways.
    - There will be a side-effect of promoting simple ops to unordered-atomic if we recognize a loop idiom, and then later lower it into loads/stores. The tradeoff is that it should be easier to work with the intrinsic in passes.
    - The only value that I can see in having the separate dest_unordered/src_unordered args is that in lowering passes that change the intrinsic into explicit loads/stores we wouldn't "promote" a simple op into an unordered-atomic op.

- Added in updating the InstCombine lowering of the intrinsic so that the change doesn't lose functionality; even temporarily.


https://reviews.llvm.org/D33240

Files:
  docs/LangRef.rst
  include/llvm/CodeGen/RuntimeLibcalls.h
  include/llvm/IR/IntrinsicInst.h
  include/llvm/IR/Intrinsics.td
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/TargetLoweringBase.cpp
  lib/IR/Verifier.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  lib/Transforms/InstCombine/InstCombineInternal.h
  test/CodeGen/X86/element-wise-atomic-memory-intrinsics.ll
  test/Transforms/InstCombine/element-atomic-memcpy-to-loads.ll
  test/Verifier/element-wise-atomic-memory-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33240.100415.patch
Type: text/x-patch
Size: 33301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170526/d2a48aa6/attachment.bin>


More information about the llvm-commits mailing list