Skip to content

Commit ba9100e

Browse files
committed
Update llvm to 21.1.4
1 parent 3c401e7 commit ba9100e

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

.github/workflows/rpcs3.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
CCACHE_DIR: /tmp/ccache_dir
137137
QT_VER: '6.7.3'
138138
QT_VER_MAIN: '6'
139-
LLVM_COMPILER_VER: '19'
139+
LLVM_COMPILER_VER: '21'
140140
RELEASE_MESSAGE: ../GitHubReleaseMessage.txt
141141
UPLOAD_COMMIT_HASH: ${{ matrix.UPLOAD_COMMIT_HASH }}
142142
UPLOAD_REPO_FULL_NAME: ${{ matrix.UPLOAD_REPO_FULL_NAME }}
@@ -215,7 +215,7 @@ jobs:
215215
QT_VER: '6.10.0'
216216
QT_VER_MSVC: 'msvc2022'
217217
QT_DATE: '202510021201'
218-
LLVM_VER: '19.1.7'
218+
LLVM_VER: '21.1.4'
219219
VULKAN_VER: '1.3.268.0'
220220
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
221221
CCACHE_SHA: '1f39f3ad5aae3fe915e99ad1302633bc8f6718e58fa7c0de2b0ba7e080f0f08c'
@@ -413,7 +413,7 @@ jobs:
413413
env:
414414
CCACHE_DIR: ${{ github.workspace }}/ccache
415415
QT_VER_MAIN: '6'
416-
LLVM_COMPILER_VER: '19'
416+
LLVM_COMPILER_VER: '21'
417417
steps:
418418
- name: Checkout repository
419419
uses: actions/checkout@main

3rdparty/llvm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ if(WITH_LLVM)
5151

5252
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)
5353

54-
find_package(LLVM 19.1 CONFIG)
54+
find_package(LLVM 21.1 CONFIG)
5555
if(NOT LLVM_FOUND)
5656
message(FATAL_ERROR "Couldn't build LLVM from the submodule. You might need to run `git submodule update --init`")
5757
endif()

3rdparty/llvm/llvm

Submodule llvm updated from cd70802 to 222fc11

BUILDING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
130130
**NOTE:** The recommended build configuration is `Release`. (On older revisions: `Release - LLVM`)
131131

132132
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:
133-
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-19.1.7/llvmlibs_mt.7z)
133+
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-21.1.4/llvmlibs_mt.7z)
134134

135135
**NOTES:**
136136
- `<$(Configuration)>` can assume values `Release` or `Debug`.

buildfiles/msvc/rpcs3_default.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
LLVMBitstreamReader.lib;
4444
LLVMBitWriter.lib;
4545
LLVMCFGuard.lib;
46+
LLVMCGData.lib;
4647
LLVMCodeGen.lib;
47-
LLVMCodeGenData.lib;
4848
LLVMCodeGenTypes.lib;
4949
LLVMCore.lib;
5050
LLVMCoroutines.lib;
@@ -53,19 +53,23 @@
5353
LLVMDebugInfoCodeView.lib;
5454
LLVMDebuginfod.lib;
5555
LLVMDebugInfoDWARF.lib;
56+
LLVMDebugInfoDWARFLowLevel.lib;
5657
LLVMDebugInfoGSYM.lib;
5758
LLVMDebugInfoLogicalView.lib;
5859
LLVMDebugInfoMSF.lib;
5960
LLVMDebugInfoPDB.lib;
6061
LLVMDemangle.lib;
6162
LLVMDlltoolDriver.lib;
63+
LLVMDWARFCFIChecker.lib;
6264
LLVMDWARFLinker.lib;
6365
LLVMDWARFLinkerClassic.lib;
6466
LLVMDWARFLinkerParallel.lib;
6567
LLVMDWP.lib;
6668
LLVMExecutionEngine.lib;
6769
LLVMExtensions.lib;
6870
LLVMFileCheck.lib;
71+
LLVMFrontendAtomic.lib;
72+
LLVMFrontendDirective.lib;
6973
LLVMFrontendDriver.lib;
7074
LLVMFrontendHLSL.lib;
7175
LLVMFrontendOffloading.lib;
@@ -118,6 +122,7 @@
118122
LLVMTableGenCommon.lib;
119123
LLVMTarget.lib;
120124
LLVMTargetParser.lib;
125+
LLVMTelemetry.lib;
121126
LLVMTextAPI.lib;
122127
LLVMTextAPIBinaryReader.lib;
123128
LLVMTransformUtils.lib;

rpcs3/Emu/CPU/CPUTranslator.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ struct llvm_fshl
11491149
static llvm::Function* get_fshl(llvm::IRBuilder<>* ir)
11501150
{
11511151
const auto _module = ir->GetInsertBlock()->getParent()->getParent();
1152-
return llvm::Intrinsic::getDeclaration(_module, llvm::Intrinsic::fshl, {llvm_value_t<T>::get_type(ir->getContext())});
1152+
return llvm::Intrinsic::getOrInsertDeclaration(_module, llvm::Intrinsic::fshl, {llvm_value_t<T>::get_type(ir->getContext())});
11531153
}
11541154

11551155
static llvm::Value* fold(llvm::IRBuilder<>* ir, llvm::Value* v1, llvm::Value* v2, llvm::Value* v3)
@@ -1221,7 +1221,7 @@ struct llvm_fshr
12211221
static llvm::Function* get_fshr(llvm::IRBuilder<>* ir)
12221222
{
12231223
const auto _module = ir->GetInsertBlock()->getParent()->getParent();
1224-
return llvm::Intrinsic::getDeclaration(_module, llvm::Intrinsic::fshr, {llvm_value_t<T>::get_type(ir->getContext())});
1224+
return llvm::Intrinsic::getOrInsertDeclaration(_module, llvm::Intrinsic::fshr, {llvm_value_t<T>::get_type(ir->getContext())});
12251225
}
12261226

12271227
static llvm::Value* fold(llvm::IRBuilder<>* ir, llvm::Value* v1, llvm::Value* v2, llvm::Value* v3)
@@ -2220,7 +2220,7 @@ struct llvm_add_sat
22202220
static llvm::Function* get_add_sat(llvm::IRBuilder<>* ir)
22212221
{
22222222
const auto _module = ir->GetInsertBlock()->getParent()->getParent();
2223-
return llvm::Intrinsic::getDeclaration(_module, intr, {llvm_value_t<T>::get_type(ir->getContext())});
2223+
return llvm::Intrinsic::getOrInsertDeclaration(_module, intr, {llvm_value_t<T>::get_type(ir->getContext())});
22242224
}
22252225

22262226
llvm::Value* eval(llvm::IRBuilder<>* ir) const
@@ -2303,7 +2303,7 @@ struct llvm_sub_sat
23032303
static llvm::Function* get_sub_sat(llvm::IRBuilder<>* ir)
23042304
{
23052305
const auto _module = ir->GetInsertBlock()->getParent()->getParent();
2306-
return llvm::Intrinsic::getDeclaration(_module, intr, {llvm_value_t<T>::get_type(ir->getContext())});
2306+
return llvm::Intrinsic::getOrInsertDeclaration(_module, intr, {llvm_value_t<T>::get_type(ir->getContext())});
23072307
}
23082308

23092309
llvm::Value* eval(llvm::IRBuilder<>* ir) const
@@ -3592,7 +3592,7 @@ class cpu_translator
35923592
llvm::Function* get_intrinsic(llvm::Intrinsic::ID id)
35933593
{
35943594
const auto _module = m_ir->GetInsertBlock()->getParent()->getParent();
3595-
return llvm::Intrinsic::getDeclaration(_module, id, {get_type<Types>()...});
3595+
return llvm::Intrinsic::getOrInsertDeclaration(_module, id, {get_type<Types>()...});
35963596
}
35973597

35983598
template <typename T1, typename T2>
@@ -4007,7 +4007,7 @@ llvm::CallInst* llvm_asm(
40074007
const std::string& constraints,
40084008
llvm::LLVMContext& context)
40094009
{
4010-
llvm::ArrayRef<llvm::Type*> types_ref = std::nullopt;
4010+
llvm::ArrayRef<llvm::Type*> types_ref = {};
40114011
std::vector<llvm::Type*> types;
40124012
types.reserve(args.size());
40134013

0 commit comments

Comments
 (0)