Update llvm to 21.1.7

This commit is contained in:
Megamouse 2025-03-04 22:05:35 +01:00
parent cbba687ffa
commit 0a2ff4f630
6 changed files with 16 additions and 11 deletions

View file

@ -215,7 +215,7 @@ jobs:
QT_VER: '6.10.1'
QT_VER_MSVC: 'msvc2022'
QT_DATE: '202511161843'
LLVM_VER: '19.1.7'
LLVM_VER: '21.1.7'
VULKAN_VER: '1.3.268.0'
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
CCACHE_SHA: '1f39f3ad5aae3fe915e99ad1302633bc8f6718e58fa7c0de2b0ba7e080f0f08c'
@ -413,7 +413,7 @@ jobs:
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
QT_VER_MAIN: '6'
LLVM_COMPILER_VER: '19'
LLVM_COMPILER_VER: '21'
steps:
- name: Checkout repository
uses: actions/checkout@main

View file

@ -51,7 +51,7 @@ if(WITH_LLVM)
set(STATIC_LINK_LLVM ON CACHE BOOL "Link against LLVM statically. This will get set to ON if you build LLVM from the submodule." FORCE)
find_package(LLVM 19.1 CONFIG)
find_package(LLVM 21.1 CONFIG)
if(NOT LLVM_FOUND)
message(FATAL_ERROR "Couldn't build LLVM from the submodule. You might need to run `git submodule update --init`")
endif()

2
3rdparty/llvm/llvm vendored

@ -1 +1 @@
Subproject commit cd708029e0b2869e80abe31ddb175f7c35361f90
Subproject commit 292dc2b86f66e39f4b85ec8b185fd8b60f5213ce

View file

@ -131,7 +131,7 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
**NOTE:** The recommended build configuration is `Release`. (On older revisions: `Release - LLVM`)
To speed up the compilation time, you may want to download and extract to `<rpcs3_root>\build\lib_ext\<$(Configuration)>-x64` (e.g. `c:\rpcs3\build\lib_ext\Release-x64`; the path needs to be created) the following precompiled lib:
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-19.1.7/llvmlibs_mt.7z)
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-21.1.7/llvmlibs_mt.7z)
**NOTES:**
- `<$(Configuration)>` can assume values `Release` or `Debug`.

View file

@ -43,8 +43,8 @@
LLVMBitstreamReader.lib;
LLVMBitWriter.lib;
LLVMCFGuard.lib;
LLVMCGData.lib;
LLVMCodeGen.lib;
LLVMCodeGenData.lib;
LLVMCodeGenTypes.lib;
LLVMCore.lib;
LLVMCoroutines.lib;
@ -53,12 +53,14 @@
LLVMDebugInfoCodeView.lib;
LLVMDebuginfod.lib;
LLVMDebugInfoDWARF.lib;
LLVMDebugInfoDWARFLowLevel.lib;
LLVMDebugInfoGSYM.lib;
LLVMDebugInfoLogicalView.lib;
LLVMDebugInfoMSF.lib;
LLVMDebugInfoPDB.lib;
LLVMDemangle.lib;
LLVMDlltoolDriver.lib;
LLVMDWARFCFIChecker.lib;
LLVMDWARFLinker.lib;
LLVMDWARFLinkerClassic.lib;
LLVMDWARFLinkerParallel.lib;
@ -66,6 +68,8 @@
LLVMExecutionEngine.lib;
LLVMExtensions.lib;
LLVMFileCheck.lib;
LLVMFrontendAtomic.lib;
LLVMFrontendDirective.lib;
LLVMFrontendDriver.lib;
LLVMFrontendHLSL.lib;
LLVMFrontendOffloading.lib;
@ -118,6 +122,7 @@
LLVMTableGenCommon.lib;
LLVMTarget.lib;
LLVMTargetParser.lib;
LLVMTelemetry.lib;
LLVMTextAPI.lib;
LLVMTextAPIBinaryReader.lib;
LLVMTransformUtils.lib;

View file

@ -1149,7 +1149,7 @@ struct llvm_fshl
static llvm::Function* get_fshl(llvm::IRBuilder<>* ir)
{
const auto _module = ir->GetInsertBlock()->getParent()->getParent();
return llvm::Intrinsic::getDeclaration(_module, llvm::Intrinsic::fshl, {llvm_value_t<T>::get_type(ir->getContext())});
return llvm::Intrinsic::getOrInsertDeclaration(_module, llvm::Intrinsic::fshl, {llvm_value_t<T>::get_type(ir->getContext())});
}
static llvm::Value* fold(llvm::IRBuilder<>* ir, llvm::Value* v1, llvm::Value* v2, llvm::Value* v3)
@ -1221,7 +1221,7 @@ struct llvm_fshr
static llvm::Function* get_fshr(llvm::IRBuilder<>* ir)
{
const auto _module = ir->GetInsertBlock()->getParent()->getParent();
return llvm::Intrinsic::getDeclaration(_module, llvm::Intrinsic::fshr, {llvm_value_t<T>::get_type(ir->getContext())});
return llvm::Intrinsic::getOrInsertDeclaration(_module, llvm::Intrinsic::fshr, {llvm_value_t<T>::get_type(ir->getContext())});
}
static llvm::Value* fold(llvm::IRBuilder<>* ir, llvm::Value* v1, llvm::Value* v2, llvm::Value* v3)
@ -2220,7 +2220,7 @@ struct llvm_add_sat
static llvm::Function* get_add_sat(llvm::IRBuilder<>* ir)
{
const auto _module = ir->GetInsertBlock()->getParent()->getParent();
return llvm::Intrinsic::getDeclaration(_module, intr, {llvm_value_t<T>::get_type(ir->getContext())});
return llvm::Intrinsic::getOrInsertDeclaration(_module, intr, {llvm_value_t<T>::get_type(ir->getContext())});
}
llvm::Value* eval(llvm::IRBuilder<>* ir) const
@ -2303,7 +2303,7 @@ struct llvm_sub_sat
static llvm::Function* get_sub_sat(llvm::IRBuilder<>* ir)
{
const auto _module = ir->GetInsertBlock()->getParent()->getParent();
return llvm::Intrinsic::getDeclaration(_module, intr, {llvm_value_t<T>::get_type(ir->getContext())});
return llvm::Intrinsic::getOrInsertDeclaration(_module, intr, {llvm_value_t<T>::get_type(ir->getContext())});
}
llvm::Value* eval(llvm::IRBuilder<>* ir) const
@ -3592,7 +3592,7 @@ public:
llvm::Function* get_intrinsic(llvm::Intrinsic::ID id)
{
const auto _module = m_ir->GetInsertBlock()->getParent()->getParent();
return llvm::Intrinsic::getDeclaration(_module, id, {get_type<Types>()...});
return llvm::Intrinsic::getOrInsertDeclaration(_module, id, {get_type<Types>()...});
}
template <typename T1, typename T2>