6 Commits

Author SHA1 Message Date
Yaxun Liu
ab3be33d40 [AMDGPU] Get address space mapping by target triple environment
As we introduced target triple environment amdgiz and amdgizcl, the address
space values are no longer enums. We have to decide the value by target triple.

The basic idea is to use struct AMDGPUAS to represent address space values.
For address space values which are not depend on target triple, use static
const members, so that they don't occupy extra memory space and is equivalent
to a compile time constant.

Since the struct is lightweight and cheap, it can be created on the fly at
the point of usage. Or it can be added as member to a pass and created at
the beginning of the run* function.

Differential Revision: https://reviews.llvm.org/D31284


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298846 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-27 14:04:01 +00:00
Konstantin Zhuravlyov
1007ee7060 [AMDGPU] Rename Kind to ValueKind in metadata to be consistent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298722 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 18:43:15 +00:00
Konstantin Zhuravlyov
f49ec0fc3f [AMDGPU] Do not emit isa info as code object metadata
- It was decided to expose this information through other means (rocr)

Differential Revision: https://reviews.llvm.org/D30970


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22 23:27:09 +00:00
Konstantin Zhuravlyov
a539af96a4 [AMDGPU] Emit kernel debug properties as code object metadata
Differential Revision: https://reviews.llvm.org/D30969


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298558 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22 23:10:46 +00:00
Konstantin Zhuravlyov
93cb3da5a9 [AMDGPU] Emit kernel code properties as code object metadata
- These are not required for low level runtime

Differential Revision: https://reviews.llvm.org/D29949


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298556 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22 22:54:39 +00:00
Konstantin Zhuravlyov
1c4f1852fb [AMDGPU] Restructure code object metadata creation
- Rename runtime metadata -> code object metadata
  - Make metadata not flow
  - Switch enums to use ScalarEnumerationTraits
  - Cleanup and move AMDGPUCodeObjectMetadata.h to AMDGPU/MCTargetDesc
  - Introduce in-memory representation for attributes
  - Code object metadata streamer
  - Create metadata for isa and printf during EmitStartOfAsmFile
  - Create metadata for kernel during EmitFunctionBodyStart
  - Finalize and emit metadata to .note during EmitEndOfAsmFile
  - Other minor improvements/bug fixes

Differential Revision: https://reviews.llvm.org/D29948



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298552 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22 22:32:22 +00:00