This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Partially move target handling code from clang to TargetParser
ClosedPublic

Authored by arsenm on Aug 20 2018, 11:34 AM.

Details

Summary

A future change in clang necessitates access of this information
from the driver, so move this into a common place.

Try to mimic something resembling the API the other targets are
using here.

One thing I'm uncertain about is how to split amdgcn and r600
handling. Here I've mostly duplicated the functions for each,
while keeping the same enums. I think this is a bit awkward
for the features which don't matter for amdgcn.

It's also a bit messy that this isn't a complete set of
subtarget features. This is just the minimum set needed
for the driver code. For example building the list of
subtarget feature names is still in clang.

Diff Detail

Event Timeline

arsenm created this revision.Aug 20 2018, 11:34 AM
This revision is now accepted and ready to land.Aug 21 2018, 3:11 AM
arsenm closed this revision.Aug 21 2018, 9:14 AM

r340291