Page MenuHomePhabricator

[AMDGPU] Remove Code Object V2
Needs ReviewPublic

Authored by Pierre-vh on Mar 14 2023, 1:42 AM.

Details

Reviewers
jhenderson
arsenm
kzhuravl
foad
rampitec
yaxunl
t-tye
artem
b-sumner
jdoerfert
Group Reviewers
Restricted Project
Summary

Code Object V2 has been deprecated for more than a year now. We can safely remove it from LLVM.

  • [clang] Remove support for the -mcode-object-version=2 option.
  • [lld] Remove/refactor tests that were still using COV2
  • [llvm] Update AMDGPUUsage.rst
    • Code Object V2 docs are left for informational purposes because those code objects may still be supported by the runtime/loaders for a while.
  • [AMDGPU] Remove COV2 emission capabilities.
  • [AMDGPU] Remove MetadataStreamerYamlV2 which was only used by COV2
  • [AMDGPU] Update all tests that were still using COV2
    • They are either deleted or ported directly to code object v4 (as v3 is also planned to be removed soon).

Depends on D145671

Diff Detail

Event Timeline

Pierre-vh created this revision.Mar 14 2023, 1:42 AM
Herald added a project: Restricted Project. · View Herald Transcript
Pierre-vh requested review of this revision.Mar 14 2023, 1:42 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
Pierre-vh retitled this revision from [AMDGPU] Remove Code Object V2 Code Object V2 has been deprecated for more than a year now. We can safely remove it from LLVM. to [AMDGPU] Remove Code Object V2.Mar 14 2023, 1:42 AM
Pierre-vh edited the summary of this revision. (Show Details)
Pierre-vh added reviewers: Restricted Project, arsenm, kzhuravl, foad, rampitec, yaxunl, t-tye, artem, b-sumner.
kzhuravl added inline comments.Mar 14 2023, 6:36 AM
llvm/docs/AMDGPUUsage.rst
1387

emission->generation?

2655

emission->generation?

14605

ditto

llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
749–750

Nice to see this finally go

LGTM on clang side.

Is clover still relying on the cov2 support?

clang/include/clang/Basic/TargetOptions.h
85

I wouldn't remove the enum field, just add a comment that emission is unsupported or something

llvm/test/MC/AMDGPU/hsa-gfx10.s
3

I thought we were still going to be able to read old objects

llvm/tools/llvm-readobj/ELFDumper.cpp
5437–5440 ↗(On Diff #504984)

This looks like a separate change?

Pierre-vh updated this revision to Diff 505414.Mar 15 2023, 2:53 AM
Pierre-vh marked 6 inline comments as done.

Address comments, split some change in D146119

llvm/test/MC/AMDGPU/hsa-gfx10.s
3

I think llvm-readobj uses all of the MC/Target infrastructure so if we remove emission, we also remove reading, no?

I'm actually not sure if we plan to let readobj/readelf read COV2 object files, it's an interesting question

llvm/tools/llvm-readobj/ELFDumper.cpp
5437–5440 ↗(On Diff #504984)

Moved to D146119

Pierre-vh edited the summary of this revision. (Show Details)Tue, May 2, 11:46 PM