[PATCH] D31804: [AMDGPU] Generate range metadata for workitem id

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 17:10:47 PDT 2017


rampitec updated this revision to Diff 94757.
rampitec retitled this revision from "[AMDGPU] zero extend workitem id" to "[AMDGPU] Generate range metadata for workitem id".
rampitec edited the summary of this revision.
rampitec added a comment.

Changed approach to generate range metadata.
Added processing of reqd_work_group_size to refine individual dimension results.
Created common method in subtarget to facilitate all places where we use it.
Promote alloca pass switched to the new method. This refines ranges produced over previous HW limit.
This also fixes bug in the range info produced by promote alloca pass: range metadata is [Lo, Hi), it was generated incorrectly as [0, 2048). Note, for ID query the range shall be one less than for size query, while it was produced the same. I.e. if size would really be 2048 local size range would be incorrectly assumed [0..2047].


Repository:
  rL LLVM

https://reviews.llvm.org/D31804

Files:
  lib/Target/AMDGPU/AMDGPU.h
  lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
  lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  lib/Target/AMDGPU/AMDGPUSubtarget.cpp
  lib/Target/AMDGPU/AMDGPUSubtarget.h
  lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  test/CodeGen/AMDGPU/add.i16.ll
  test/CodeGen/AMDGPU/amdgpu.private-memory.ll
  test/CodeGen/AMDGPU/bfe-patterns.ll
  test/CodeGen/AMDGPU/ds_read2_superreg.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.atomic.dec.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.atomic.inc.ll
  test/CodeGen/AMDGPU/local-memory.amdgcn.ll
  test/CodeGen/AMDGPU/lower-range-metadata-intrinsic-call.ll
  test/CodeGen/AMDGPU/private-memory-r600.ll
  test/CodeGen/AMDGPU/shift-and-i128-ubfe.ll
  test/CodeGen/AMDGPU/shift-and-i64-ubfe.ll
  test/CodeGen/AMDGPU/shl.ll
  test/CodeGen/AMDGPU/sub.i16.ll
  test/CodeGen/AMDGPU/zext-lid.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31804.94757.patch
Type: text/x-patch
Size: 34482 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170411/8afb5acb/attachment.bin>


More information about the llvm-commits mailing list