This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix default device handling
ClosedPublic

Authored by arsenm on Jan 26 2016, 11:59 AM.

Details

Reviewers
tstellarAMD
Summary

When no device name is specified, default to kaveri
for HSA since SI is not supported and it woud fail.

Move default device handling to the TargetMachine
rather than the AMDGPUSubtarget. The module ISA version
is computed from the device name provided with the target
machine, so the attributes printed by the AsmPrinter were
inconsistent with those computed in the subtarget.

Also remove DevName field from subtarget since it's redundant
with getCPU() in the superclass.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 46025.Jan 26 2016, 11:59 AM
arsenm retitled this revision from to AMDGPU: Fix default device handling.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
tstellarAMD accepted this revision.Jan 26 2016, 2:20 PM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jan 26 2016, 2:20 PM
arsenm closed this revision.Jan 26 2016, 6:22 PM

r258901