This is an archive of the discontinued LLVM Phabricator instance.

[Docs] [HLSL] Add IR reference for HLSL
ClosedPublic

Authored by beanz on Sep 20 2022, 12:45 PM.

Details

Summary

HLSL uses a variety of named IR metadata and attributes to convey
additional information from the frontend to the backend. This document
tries to capture and document the named annotations to provide a
reference for future contributors.

Event Timeline

beanz created this revision.Sep 20 2022, 12:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2022, 12:45 PM
Herald added a subscriber: Anastasia. · View Herald Transcript
beanz requested review of this revision.Sep 20 2022, 12:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2022, 12:45 PM
python3kgae added inline comments.Sep 20 2022, 1:33 PM
clang/docs/HLSL/HLSLIRReference.rst
13

Once we document a metadata attribute, is it OK to update the format later?

beanz added inline comments.Sep 20 2022, 1:35 PM
clang/docs/HLSL/HLSLIRReference.rst
13

Absolutely, none of this is a binding ABI, this document is just intended to be a reference.

python3kgae added inline comments.Sep 20 2022, 1:46 PM
clang/docs/HLSL/HLSLIRReference.rst
21

Maybe only external global variables?

beanz added inline comments.Sep 20 2022, 1:47 PM
clang/docs/HLSL/HLSLIRReference.rst
21

Do they have to be external? static RWBuffer<int> Buf is valid right?

python3kgae added inline comments.Sep 20 2022, 1:52 PM
clang/docs/HLSL/HLSLIRReference.rst
21

static ones don't need to be in the table.

beanz updated this revision to Diff 462299.Sep 22 2022, 2:52 PM

Updating documentation for hlsl.uavs, thanks @python3kgae!

python3kgae accepted this revision.Sep 22 2022, 3:18 PM
This revision is now accepted and ready to land.Sep 22 2022, 3:18 PM
This revision was automatically updated to reflect the committed changes.