[all-commits] [llvm/llvm-project] db279c: [HLSL] Change default linkage of HLSL functions to...
Helena Kotas via All-commits
all-commits at lists.llvm.org
Fri Aug 16 10:32:31 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: db279c72f2fea755c8e66cc1f0a69954764e9284
https://github.com/llvm/llvm-project/commit/db279c72f2fea755c8e66cc1f0a69954764e9284
Author: Helena Kotas <hekotas at microsoft.com>
Date: 2024-08-16 (Fri, 16 Aug 2024)
Changed paths:
M llvm/lib/Target/DirectX/CMakeLists.txt
A llvm/lib/Target/DirectX/DXILFinalizeLinkage.cpp
A llvm/lib/Target/DirectX/DXILFinalizeLinkage.h
M llvm/lib/Target/DirectX/DirectX.h
M llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
M llvm/test/CodeGen/DirectX/conflicting-bitcast-insert.ll
A llvm/test/CodeGen/DirectX/finalize_linkage.ll
M llvm/test/CodeGen/DirectX/omit-bitcast-insert.ll
Log Message:
-----------
[HLSL] Change default linkage of HLSL functions to internal (#95331)
An HLSL function has internal linkage by default unless it is:
1. shader entry point function
2. marked with the `export` keyword
(https://github.com/llvm/llvm-project/issues/92812)
3. patch constant function (not implemented yet)
This PR adds a link-time pass `DXILFinalizeLinkage` that updates the
linkage of functions to make sure only shader entry points and exported
functions are visible from the module (have _program linkage_). All
other functions will be updated to have internal linkage.
Related spec update: microsoft/hlsl-specs#295
Fixes #llvm/llvm-project#92071
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list