This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Register a null MC streamer for -emit-codegen-only
ClosedPublic

Authored by arsenm on Oct 28 2022, 2:06 PM.

Details

Reviewers
scott.linder
kzhuravl
rampitec
MaskRay
Group Reviewers
Restricted Project
Summary

For some reason null is a valid MC target, used from clang with
-emit-codegen-only. Previously the target streamer was null,
which was inconsistently null checked resulting in crashes
if using amdhsa.

Diff Detail

Event Timeline

arsenm created this revision.Oct 28 2022, 2:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2022, 2:06 PM
arsenm requested review of this revision.Oct 28 2022, 2:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2022, 2:06 PM
Herald added a subscriber: wdng. · View Herald Transcript
MaskRay accepted this revision.Oct 28 2022, 2:16 PM
MaskRay added a subscriber: MaskRay.

LGTM with some nits

clang/test/Misc/backend-resource-limit-diagnostics.hip
1

The layering is strange. This patch ideally should land before the clang patch.

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
66

{ return true; }

Use clang-format

This revision is now accepted and ready to land.Oct 28 2022, 2:16 PM