-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set SLC=0 for ATM LowerGpuRt: fix a type confusion Honor NonUniform decorations on OpAccessChain operands Force WGP when NGG is in passthrough mode Use idxen modifier for (RW)StructuredBuffers Compatible with LLVM upstream change that moved Utility funcs to Utils Include Line Correlation Info for Tools via LLPC [Continuations] Cleanup Complete op lowering [CompilerUtils] Improve handling of freeze in ValueOriginTracker [compilerutils] Add GetGlobalInModule to CrossModuleInliner amdllpc: some usability improvements [Continuations] Add SpecializeDriverShadersPass Split up gl_in array type. [Continuations] Remove stack lowering define Use inbounds gep to index row major matrix llvmraytracing: Remove support for _AmdContinuationsGetFlags Properly encapsulate state that affects GPURT specialization llvmraytracing: only support a waitmask of -1 llvmraytracing: remove remaining traces of EnqueueCall compilerutils: fix a warning [LowerGlobals] Mark globals with `buffer.index` users as readonly Implement structural GEP dialect for in/out llvmraytracing: add LLPC/LLVM scratch/global address spaces llpc/ProcessGpuRtLibrary: use earlyGpurtTransform [Continuations] Make use of `llvm::zip` in `CleanupContinuationsPass::updateCpsFunctionArgs` Adjust the llvm-tblgen memory limit lgc: split lowering of GroupMemcpyOp for mesh/task shaders to MeshTaskShader PatchResourceCollect: stop cleaning undef output value in some cases [Continuations] Freeze poison that is stored to payload Fix wrong pipeline dump message Fix issues with coherent Update SPIR-V header to latest version Simplify load of attribute ring buffer descriptor [Continuations] Enable Traversal specialization test Adjust tests to take into account upstream overload of rsrc and samp arguments [Continuations] Fix signed/unsigned comparison warning LowerRaytracingPipeline: tease apart return handling and any-hit exit handling LowerRaytracingPipeline: unify function end handling lgc: support int4 in cooperative matrix Add rounding mode for PackHalf2x16 [Continuations] Fix unused variable warning lgc: Add MsgPackScanner [Continuations] Remove `LegacyCleanupContinuations` pass LowerCooperativeMatrix: fix compile warning due to missing break statement lgc: New RegStackUsage to propagate reg/stack usage [LGC] Add helper lane state for subgroups Add client name to SPIR-V frontend Use more flexible readfirstlane Gate argument definition for `GEP::collectOffset`. [Continuations] Introduce dummy `csp` argument for `lgc.cps.jump` [Continuations] Tolerate non-waiting AwaitTraversal Add AmdExtD3DShaderIntrinsics_LoadDwordAtAddrx3 Add more BuiltIn which has primitive index in mesh shader Rewrite the helper getShaderModuleUsageInfo [Continuations] Replace isLgcRtOp helper with isDialectOp helper from dialects Downgrade scope Device to Workgroup if permitted Optimize performance for PrimSetup Update submodule llvm-dialects Remove inactive built-ins for last vertex processing stage Fix internal hash for color export shader Fix call to lookupIntrinsicID [Continuations] Move Simplifying GEP helpers to CompilerUtils [PatchBufferOp] Generate struct buffer cmpxchg intrinsics [LGC] Refactor default wave size setting [Continuations] Derive `DispatchSystemData` type from `_cont_DispatchRaysIndex3` [Continuations] Replace "lgc.rt" starts_with check Rename some classes and files Optimize PointSize write when the value is 1.0 [Continuations] Handle `_AmdGetShaderRecordIndex` calls [LowerBufferOperations] Check for uniform buffer pointers for s_buffer_load lgc: Mark applicable LgcDialect and Builder ops as NoDivergenceSource
- Loading branch information
Showing
400 changed files
with
16,539 additions
and
5,242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
## | ||
####################################################################################################################### | ||
# | ||
# Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to | ||
# deal in the Software without restriction, including without limitation the | ||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
# sell copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
# IN THE SOFTWARE. | ||
# | ||
####################################################################################################################### | ||
|
||
# Include this file to set LLVM_MAIN_REVISION, for when it is needed at cmake level rather than C++ level. | ||
|
||
if (NOT LLVM_MAIN_REVISION) | ||
# A sneaky way to get the LLVM source directory, assuming we are included from a LLVM external | ||
# project such as LGC or LLPCFE. | ||
get_filename_component(LLVM_SOURCE_DIR "${CPACK_RESOURCE_FILE_LICENSE}" DIRECTORY) | ||
if (NOT LLVM_SOURCE_DIR) | ||
message(FATAL_ERROR "LLVM_SOURCE_DIR not found") | ||
endif() | ||
|
||
# Scrape LLVM_MAIN_REVISION out of llvm-config.h.cmake. If not found, set to a high number. | ||
set(LLVM_CONFIG_H_NAME "${LLVM_SOURCE_DIR}/include/llvm/Config/llvm-config.h.cmake") | ||
file(READ "${LLVM_CONFIG_H_NAME}" LLVM_CONFIG_H_CONTENTS) | ||
string(REGEX REPLACE "^.* LLVM_MAIN_REVISION ([0-9]+).*$" "\\1" LLVM_MAIN_REVISION "${LLVM_CONFIG_H_CONTENTS}") | ||
if ("${LLVM_MAIN_REVISION}" STREQUAL "${LLVM_CONFIG_H_CONTENTS}") | ||
set(LLVM_MAIN_REVISION 999999999) | ||
endif() | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
*********************************************************************************************************************** | ||
* | ||
* Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to | ||
* deal in the Software without restriction, including without limitation the | ||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
* sell copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
* IN THE SOFTWARE. | ||
* | ||
**********************************************************************************************************************/ | ||
|
||
//===- DxilUtils.h - --------------------------------------------------------------------------------------------===// | ||
// | ||
// Shared DXIl-related helpers. | ||
// | ||
//===--------------------------------------------------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "llvm/ADT/StringRef.h" | ||
|
||
namespace CompilerUtils::dxil { | ||
|
||
// Try to demangle function names in the DXIL format: | ||
// ...\01?FuncName@@... | ||
// @param funcName : Name of the callee | ||
// @returns: the original string if the name was not demangleable or the demangled function name. | ||
inline llvm::StringRef tryDemangleFunctionName(llvm::StringRef inputName) { | ||
assert(!inputName.empty()); | ||
|
||
constexpr static llvm::StringRef manglingPrefix = "\01?"; | ||
|
||
// Expect both characters to be there, and `\01?` to occur before `@@` | ||
size_t start = inputName.find(manglingPrefix); | ||
if (start == llvm::StringRef::npos) | ||
return inputName; | ||
|
||
// The case start >= end is implicitly checked by the second call to `find`. | ||
const size_t end = inputName.find("@@", start); | ||
if (end == llvm::StringRef::npos) | ||
return inputName; | ||
|
||
start += manglingPrefix.size(); | ||
|
||
// Extract unmangled name: Return everything after the first occurrence of `\01?` and before the first occurrence of | ||
// `@@` after `?`. | ||
return inputName.substr(start, end - start); | ||
} | ||
|
||
} // namespace CompilerUtils::dxil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.