This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Emit module flag for all code object versions
ClosedPublic

Authored by yaxunl on Sep 21 2022, 6:29 AM.

Diff Detail

Event Timeline

yaxunl created this revision.Sep 21 2022, 6:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2022, 6:29 AM
yaxunl requested review of this revision.Sep 21 2022, 6:29 AM
arsenm added a subscriber: arsenm.Sep 21 2022, 6:38 AM
arsenm added inline comments.
clang/lib/CodeGen/CodeGenModule.cpp
586–588

What is the flag default value? What does it mean to target none?

yaxunl marked an inline comment as done.Sep 21 2022, 7:44 AM
yaxunl added inline comments.
clang/lib/CodeGen/CodeGenModule.cpp
586–588

What is the flag default value? What does it mean to target none?

Default value is COV_V4. COV_None is for device library, which needs to link with bitcode containing any code object version. COV_None is only specified with a clang -cc1 option which is used when compiling device library.

cfang accepted this revision.Sep 21 2022, 5:35 PM

LGTM

Should the module flag name be amdgpu_code_object_version or amdhsa_code_object_version?

This revision is now accepted and ready to land.Sep 21 2022, 5:35 PM
yaxunl marked an inline comment as done.Sep 22 2022, 10:53 AM

LGTM

Should the module flag name be amdgpu_code_object_version or amdhsa_code_object_version?

Good question.

@b-sumner Does code object version affects PAL? Thanks.

LGTM

Should the module flag name be amdgpu_code_object_version or amdhsa_code_object_version?

Good question.

@b-sumner Does code object version affects PAL? Thanks.

It should, we use the same code objects on PAL and ROCm.

LGTM

Should the module flag name be amdgpu_code_object_version or amdhsa_code_object_version?

Good question.

@b-sumner Does code object version affects PAL? Thanks.

It should, we use the same code objects on PAL and ROCm.

Thanks. Then amdgpu_code_object_version sounds like the right name.

This revision was landed with ongoing or failed builds.Sep 22 2022, 1:52 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 22 2022, 1:52 PM