[all-commits] [llvm/llvm-project] c2063d: Switch DirectX Target to use the Itanium ABI (#111...
Greg Roth via All-commits
all-commits at lists.llvm.org
Thu Oct 10 11:58:49 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c2063de1593610eda0f4de33c3b89324642ed54c
https://github.com/llvm/llvm-project/commit/c2063de1593610eda0f4de33c3b89324642ed54c
Author: Greg Roth <grroth at microsoft.com>
Date: 2024-10-10 (Thu, 10 Oct 2024)
Changed paths:
M clang/lib/Basic/Targets/DirectX.h
M clang/lib/CodeGen/ItaniumCXXABI.cpp
M clang/test/CodeGenHLSL/ArrayTemporary.hlsl
M clang/test/CodeGenHLSL/BasicFeatures/OutputArguments.hlsl
M clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl
M clang/test/CodeGenHLSL/GlobalConstructorLib.hlsl
M clang/test/CodeGenHLSL/GlobalConstructors.hlsl
M clang/test/CodeGenHLSL/GlobalDestructors.hlsl
M clang/test/CodeGenHLSL/basic_types.hlsl
M clang/test/CodeGenHLSL/builtins/RWBuffer-annotations.hlsl
M clang/test/CodeGenHLSL/builtins/RWBuffer-elementtype.hlsl
M clang/test/CodeGenHLSL/builtins/RasterizerOrderedBuffer-annotations.hlsl
M clang/test/CodeGenHLSL/builtins/StructuredBuffer-annotations.hlsl
M clang/test/CodeGenHLSL/builtins/StructuredBuffer-elementtype.hlsl
M clang/test/CodeGenHLSL/builtins/abs.hlsl
M clang/test/CodeGenHLSL/builtins/ceil.hlsl
M clang/test/CodeGenHLSL/builtins/clamp.hlsl
M clang/test/CodeGenHLSL/builtins/cos.hlsl
M clang/test/CodeGenHLSL/builtins/exp.hlsl
M clang/test/CodeGenHLSL/builtins/exp2.hlsl
M clang/test/CodeGenHLSL/builtins/floor.hlsl
M clang/test/CodeGenHLSL/builtins/hlsl_resource_t.hlsl
M clang/test/CodeGenHLSL/builtins/log.hlsl
M clang/test/CodeGenHLSL/builtins/log10.hlsl
M clang/test/CodeGenHLSL/builtins/log2.hlsl
M clang/test/CodeGenHLSL/builtins/max.hlsl
M clang/test/CodeGenHLSL/builtins/min.hlsl
M clang/test/CodeGenHLSL/builtins/pow.hlsl
M clang/test/CodeGenHLSL/builtins/round.hlsl
M clang/test/CodeGenHLSL/builtins/saturate.hlsl
M clang/test/CodeGenHLSL/builtins/sin.hlsl
M clang/test/CodeGenHLSL/builtins/sqrt.hlsl
M clang/test/CodeGenHLSL/builtins/trunc.hlsl
M clang/test/CodeGenHLSL/export.hlsl
M clang/test/CodeGenHLSL/float3.hlsl
M clang/test/CodeGenHLSL/group_shared.hlsl
M clang/test/CodeGenHLSL/half.hlsl
M clang/test/CodeGenHLSL/implicit-norecurse-attrib.hlsl
M clang/test/CodeGenHLSL/inline-constructors.hlsl
M clang/test/CodeGenHLSL/inline-functions.hlsl
M clang/test/CodeGenHLSL/semantics/GroupIndex-codegen.hlsl
M clang/test/CodeGenHLSL/shift-mask.hlsl
M clang/test/CodeGenHLSL/sret_output.hlsl
M clang/test/CodeGenHLSL/static-local-ctor.hlsl
M clang/test/CodeGenHLSL/static_global_and_function_in_cb.hlsl
M clang/test/CodeGenHLSL/this-assignment-overload.hlsl
M clang/test/CodeGenHLSL/this-assignment.hlsl
M clang/test/CodeGenHLSL/this-reference.hlsl
Log Message:
-----------
Switch DirectX Target to use the Itanium ABI (#111632)
To consolidate behavior of function mangling and limit the number of
places that ABI changes will need to be made, this switches the DirectX
target used for HLSL to use the Itanium ABI from the Microsoft ABI. The
Itanium ABI has greater flexibility in decisions regarding mangling of
new types of which we have more than a few yet to add.
One effect of this will be that linking library shaders compiled with
DXC will not be possible with shaders compiled with clang. That isn't
considered a terribly interesting use case and one that would likely
have been onerous to maintain anyway.
This involved adding a function to call all global destructors as the
Microsoft ABI had done.
This requires a few changes to tests. Most notably the mangling style
has changed which accounts for most of the changes. In making those
changes, I took the opportunity to harmonize some very similar tests for
greater consistency. I also shaved off some unneeded run flags that had
probably been copied over from one test to another.
Other changes effected by using the new ABI include using different
types when manipulating smaller bitfields, eliminating an unnecessary
alloca in one instance in this-assignment.hlsl, changing the way static
local initialization is guarded, and changing the order of inout
parameters getting copied in and out. That last is a subtle change in
functionality, but one where there was sufficient inconsistency in the
past that standardizing is important, but the particular direction of
the standardization is less important for the sake of existing shaders.
fixes #110736
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