This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/NFC: Move amdgpu code object metadata to support
ClosedPublic

Authored by kzhuravl on Mar 28 2017, 1:50 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

kzhuravl created this revision.Mar 28 2017, 1:50 PM
kzhuravl planned changes to this revision.Apr 21 2017, 9:22 AM
kzhuravl updated this revision to Diff 98017.May 5 2017, 2:12 PM
kzhuravl retitled this revision from [AMDGPU][NFC] Move amdgpu code object metadata header file to include/llvm/Support to [AMDGPU][NFC] Move amdgpu code object metadata to support.
  • Also move yaml parsing to support

Can you explain why you want to do this? There seems to be some precedent for this as I see ARM and AARCH64 headers in include/Support.

Can you explain why you want to do this? There seems to be some precedent for this as I see ARM and AARCH64 headers in include/Support.

Tools want to use installed version of llvm. With this patch they can easily access it from, for example, /usr/include/llvm/Support/, instead of copying and maintaining it in their source trees manually.

yaxunl edited edge metadata.Jun 5 2017, 8:46 AM

LGTM. It seems there is no other way for tools to access this info.

@tstellar, do you have any concerns or suggestions about the location?

tstellar accepted this revision.Jun 6 2017, 8:50 AM

This is fine with me.

This revision is now accepted and ready to land.Jun 6 2017, 8:50 AM
kzhuravl retitled this revision from [AMDGPU][NFC] Move amdgpu code object metadata to support to AMDGPU/NFC: Move amdgpu code object metadata to support.Jun 6 2017, 11:10 AM
This revision was automatically updated to reflect the committed changes.
MatzeB added a subscriber: MatzeB.Jun 16 2017, 5:17 PM

The dump format here randomly breaks because
include/llvm/IR/ModuleSummaryIndexYAML.h says:

LLVM_YAML_IS_SEQUENCE_VECTOR(std::string)

contradicting lib/Support/AMDGPUCodeObjectMetadata.cpp:

LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(std::string)

this violates the C++ ODR rule. In practice the linker seems to pick the "wrong" specialization for me sometimes producing non-flow output for the Printf: part. Could you fix this? (I tried to do so, but for some reason I don't understand it moves the sizes or offset in some ELF data around in a testcase which I don't fully understand).

pcc added subscribers: eugenis, pcc.Jun 16 2017, 5:35 PM

I think @eugenis fixed this in r305584.

llvm/trunk/lib/Support/AMDGPUCodeObjectMetadata.cpp