Commit Graph

7 Commits

Author SHA1 Message Date
Xiang Li 6a6f10fd23 [Docs] [HLSL] Add note about PCH support
PCH supported for HLSL is added when compile in -cc1 mode using -include-pch for test AST.
This change add some notes about the support of PCH for HLSL.

Reviewed By: beanz

Differential Revision: https://reviews.llvm.org/D134330
2022-10-07 10:49:21 -07:00
Chris Bieneman d20f9f8d21 [Docs] [HLSL] Add IR reference for HLSL
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.

Reviewed By: python3kgae

Differential Revision: https://reviews.llvm.org/D134304
2022-09-23 10:29:54 -05:00
Chris Bieneman a8a49923dd [HLSL] Call global destructors from entries
HLSL doesn't have a C++ runtime that supports `atexit` registration. To
enable global destructors we instead rely on the `llvm.global_dtor`
mechanism.

This change disables `atexit` generation for HLSL and updates the HLSL
code generation to call global destructors on the exit from entry
functions.

Depends on D132977.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D133518
2022-09-13 15:05:47 -05:00
Chris Bieneman d3c54a172d [HLSL] Call global constructors inside entry
HLSL doesn't have a runtime loader model that supports global
construction by a loader or runtime initializer. To allow us to leverage
global constructors with minimal code generation impact we put calls to
the global constructors inside the generated entry function.

Differential Revision: https://reviews.llvm.org/D132977
2022-09-09 09:01:28 -05:00
Chris Bieneman de8f372bfe [Docs] Fixing incorrect document title
Doh! This clearly slipped my review. Thanks DuckDuckGo for showing me
the error of my ways :).
2022-08-30 12:19:05 -05:00
Chris Bieneman 739a747b23 [Docs] [HLSL] Documenting HLSL Entry Functions
This document describes the basic usage and implementation details for
HLSL entry functions in Clang.

Reviewed By: python3kgae

Differential Revision: https://reviews.llvm.org/D132672
2022-08-30 12:18:44 -05:00
Chris Bieneman fc470013d1 [Docs] Add HLSL ResourceType documentation
Along with the new documentation this also re-organizes the HLSL docs
to a subdirectory. The hope is to continue to expand this documentation
as the HLSL implementation advances.

Differential Revision: https://reviews.llvm.org/D130794
2022-08-08 09:06:38 -05:00