This is an archive of the discontinued LLVM Phabricator instance.

[HIPSPV][4/4] Add option to use llc to emit SPIR-V
AbandonedPublic

Authored by linjamaki on Sep 29 2021, 1:24 AM.

Details

Reviewers
Anastasia
Summary

Add two hidden options for emitting SPIR-V binary via LLC. The options are only meant for testing and development.

´--spirv-use-llc´ invokes in-tree llc. Not usable at the moment until the SPIR-V backend lands on LLVM.

´--spirv-use-llc=<path-to-llc>´ invokes llc tool given as path. Meant for trying out out-of-tree SPIR-V backend.

The HIPSPV tool chain is the only one responding to these options.

Diff Detail

Event Timeline

linjamaki created this revision.Sep 29 2021, 1:24 AM
linjamaki edited the summary of this revision. (Show Details)Oct 4 2021, 3:04 AM
linjamaki added a reviewer: Anastasia.
linjamaki updated this revision to Diff 376848.Oct 4 2021, 3:21 AM

Remove metavar from --spirv-use-llc.

linjamaki published this revision for review.Oct 4 2021, 3:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2021, 3:22 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Ok, is the idea to deprecate this flag once we switch to llc by default then?

Ok, is the idea to deprecate this flag once we switch to llc by default then?

The idea is to remove the flags if no one else needs them when the HIPSPV tool chain switches over to llc.

ormris removed a subscriber: ormris.Jan 18 2022, 4:26 PM

I think it might make more sense to use the option -fno-llvm-spirv as we don't advertise llc as a tool to the developers but llvm-spirv we do.

Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2022, 1:59 AM
Herald added a subscriber: MaskRay. · View Herald Transcript
linjamaki abandoned this revision.May 9 2022, 1:47 AM

Sounds good to me. I’ll make a new patch when there is a need for it and close this one.

Actually after some more thinking I have decided to go for a generic flag and I have created the review for it: https://reviews.llvm.org/D125679. Perhaps you can built your functionality on top of it when you get to it.