mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-31 20:41:45 +01:00
Update LLVM to 18.1.8
This commit is contained in:
parent
ad6eba1670
commit
67703b49d8
@ -7,9 +7,9 @@ git submodule -q update --init --depth 1 $(awk '/path/ && !/llvm/ && !/opencv/ {
|
|||||||
|
|
||||||
# Prefer newer Clang than in base system (see also .ci/install-freebsd.sh)
|
# Prefer newer Clang than in base system (see also .ci/install-freebsd.sh)
|
||||||
# libc++ isn't in llvm* packages, so download manually
|
# libc++ isn't in llvm* packages, so download manually
|
||||||
fetch https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.1/llvm-project-16.0.1.src.tar.xz
|
fetch https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz
|
||||||
tar xf llvm*.tar.xz
|
tar xf llvm*.tar.xz
|
||||||
export CC=clang16 CXX=clang++16
|
export CC=clang18 CXX=clang++18
|
||||||
cmake -B libcxx_build -G Ninja -S llvm*/libcxx \
|
cmake -B libcxx_build -G Ninja -S llvm*/libcxx \
|
||||||
-DLLVM_CCACHE_BUILD=ON \
|
-DLLVM_CCACHE_BUILD=ON \
|
||||||
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
|
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh -ex
|
#!/bin/sh -ex
|
||||||
|
|
||||||
curl -fLo "./llvm.lock" "https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-16.0.1/llvmlibs_mt.7z.sha256"
|
curl -fLo "./llvm.lock" "https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-18.1.8/llvmlibs_mt.7z.sha256"
|
||||||
curl -fLo "./glslang.lock" "https://github.com/RPCS3/glslang/releases/download/custom-build-win/glslanglibs_mt.7z.sha256"
|
curl -fLo "./glslang.lock" "https://github.com/RPCS3/glslang/releases/download/custom-build-win/glslanglibs_mt.7z.sha256"
|
||||||
|
@ -9,7 +9,7 @@ export ASSUME_ALWAYS_YES=true
|
|||||||
pkg info # debug
|
pkg info # debug
|
||||||
|
|
||||||
# Prefer newer Clang than in base system (see also .ci/build-freebsd.sh)
|
# Prefer newer Clang than in base system (see also .ci/build-freebsd.sh)
|
||||||
pkg install llvm16
|
pkg install llvm18
|
||||||
|
|
||||||
# Mandatory dependencies (qt6-base is pulled via qt6-multimedia)
|
# Mandatory dependencies (qt6-base is pulled via qt6-multimedia)
|
||||||
pkg install git ccache cmake ninja qt6-multimedia qt6-svg glew openal-soft ffmpeg
|
pkg install git ccache cmake ninja qt6-multimedia qt6-svg glew openal-soft ffmpeg
|
||||||
|
@ -19,7 +19,7 @@ QT_DECL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtdeclarative${QT_SUFFIX}"
|
|||||||
QT_TOOL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttools${QT_SUFFIX}"
|
QT_TOOL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttools${QT_SUFFIX}"
|
||||||
QT_MM_URL="${QT_HOST}${QT_PREFIX}addons.qtmultimedia.${QT_PREFIX_2}qtmultimedia${QT_SUFFIX}"
|
QT_MM_URL="${QT_HOST}${QT_PREFIX}addons.qtmultimedia.${QT_PREFIX_2}qtmultimedia${QT_SUFFIX}"
|
||||||
QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
|
QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
|
||||||
LLVMLIBS_URL='https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-16.0.1/llvmlibs_mt.7z'
|
LLVMLIBS_URL='https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-18.1.8/llvmlibs_mt.7z'
|
||||||
GLSLANG_URL='https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z'
|
GLSLANG_URL='https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z'
|
||||||
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-1.3.268.0-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
|
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-1.3.268.0-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
|
||||||
|
|
||||||
|
8
3rdparty/llvm/CMakeLists.txt
vendored
8
3rdparty/llvm/CMakeLists.txt
vendored
@ -41,7 +41,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)
|
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 16.0 CONFIG)
|
find_package(LLVM 18.1 CONFIG)
|
||||||
if(NOT LLVM_FOUND)
|
if(NOT LLVM_FOUND)
|
||||||
message(FATAL_ERROR "Couldn't build LLVM from the submodule. You might need to run `git submodule update --init`")
|
message(FATAL_ERROR "Couldn't build LLVM from the submodule. You might need to run `git submodule update --init`")
|
||||||
endif()
|
endif()
|
||||||
@ -59,8 +59,8 @@ if(WITH_LLVM)
|
|||||||
message(FATAL_ERROR "Can't find LLVM libraries from the CMAKE_PREFIX_PATH path or LLVM_DIR. \
|
message(FATAL_ERROR "Can't find LLVM libraries from the CMAKE_PREFIX_PATH path or LLVM_DIR. \
|
||||||
Enable BUILD_LLVM option to build LLVM from included as a git submodule.")
|
Enable BUILD_LLVM option to build LLVM from included as a git submodule.")
|
||||||
endif()
|
endif()
|
||||||
if (LLVM_VERSION VERSION_LESS 16)
|
if (LLVM_VERSION VERSION_LESS 18)
|
||||||
message(FATAL_ERROR "Found LLVM version ${LLVM_VERSION}. Required version 16 or above. \
|
message(FATAL_ERROR "Found LLVM version ${LLVM_VERSION}. Required version 18 or above. \
|
||||||
Enable BUILD_LLVM option to build LLVM from included as a git submodule.")
|
Enable BUILD_LLVM option to build LLVM from included as a git submodule.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@ -68,7 +68,7 @@ if(WITH_LLVM)
|
|||||||
if (STATIC_LINK_LLVM)
|
if (STATIC_LINK_LLVM)
|
||||||
if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
|
if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
|
||||||
if(COMPILER_ARM)
|
if(COMPILER_ARM)
|
||||||
set(LLVM_TARGETS_TO_BUILD "AArch64;X86" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
|
set(LLVM_TARGETS_TO_BUILD "AArch64" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
|
||||||
else()
|
else()
|
||||||
set(LLVM_TARGETS_TO_BUILD "X86" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
|
set(LLVM_TARGETS_TO_BUILD "X86" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
|
||||||
endif()
|
endif()
|
||||||
|
2
3rdparty/llvm/llvm
vendored
2
3rdparty/llvm/llvm
vendored
@ -1 +1 @@
|
|||||||
Subproject commit cd89023f797900e4492da58b7bed36f702120011
|
Subproject commit 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff
|
4
3rdparty/llvm/llvm_build.vcxproj
vendored
4
3rdparty/llvm/llvm_build.vcxproj
vendored
@ -40,11 +40,11 @@
|
|||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||||
</CmakeReleaseCLI>
|
</CmakeReleaseCLI>
|
||||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||||
</CmakeDebugCLI>
|
</CmakeDebugCLI>
|
||||||
<CmakeCleanCLI>
|
<CmakeCleanCLI>
|
||||||
echo Cleaning..
|
echo Cleaning..
|
||||||
|
4
3rdparty/llvm/llvm_build_clang_cl.vcxproj
vendored
4
3rdparty/llvm/llvm_build_clang_cl.vcxproj
vendored
@ -40,11 +40,11 @@
|
|||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||||
</CmakeReleaseCLI>
|
</CmakeReleaseCLI>
|
||||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||||
</CmakeDebugCLI>
|
</CmakeDebugCLI>
|
||||||
<CmakeCleanCLI>
|
<CmakeCleanCLI>
|
||||||
echo Cleaning..
|
echo Cleaning..
|
||||||
|
@ -128,7 +128,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`)
|
**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) some of the following precompiled libs:
|
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) some of the following precompiled libs:
|
||||||
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-16.0.1/llvmlibs_mt.7z)
|
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-18.1.8/llvmlibs_mt.7z)
|
||||||
- [additional libs](https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z)
|
- [additional libs](https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z)
|
||||||
|
|
||||||
**NOTES:**
|
**NOTES:**
|
||||||
|
@ -678,11 +678,7 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
|
|||||||
.setErrorStr(&result)
|
.setErrorStr(&result)
|
||||||
.setEngineKind(llvm::EngineKind::JIT)
|
.setEngineKind(llvm::EngineKind::JIT)
|
||||||
.setMCJITMemoryManager(std::move(mem))
|
.setMCJITMemoryManager(std::move(mem))
|
||||||
#if LLVM_VERSION_MAJOR < 18
|
|
||||||
.setOptLevel(llvm::CodeGenOpt::Aggressive)
|
|
||||||
#else
|
|
||||||
.setOptLevel(llvm::CodeGenOptLevel::Aggressive)
|
.setOptLevel(llvm::CodeGenOptLevel::Aggressive)
|
||||||
#endif
|
|
||||||
.setCodeModel(flags & 0x2 ? llvm::CodeModel::Large : llvm::CodeModel::Small)
|
.setCodeModel(flags & 0x2 ? llvm::CodeModel::Large : llvm::CodeModel::Small)
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
//.setCodeModel(llvm::CodeModel::Large)
|
//.setCodeModel(llvm::CodeModel::Large)
|
||||||
|
@ -134,7 +134,7 @@ jobs:
|
|||||||
ARTDIR: $(Build.ArtifactStagingDirectory)
|
ARTDIR: $(Build.ArtifactStagingDirectory)
|
||||||
QT_VER: '6.7.3'
|
QT_VER: '6.7.3'
|
||||||
QT_VER_MAIN: '6'
|
QT_VER_MAIN: '6'
|
||||||
LLVM_COMPILER_VER: '16'
|
LLVM_COMPILER_VER: '18'
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: "macOS-13"
|
vmImage: "macOS-13"
|
||||||
@ -195,7 +195,7 @@ jobs:
|
|||||||
ARTDIR: $(Build.ArtifactStagingDirectory)
|
ARTDIR: $(Build.ArtifactStagingDirectory)
|
||||||
QT_VER: '6.7.3'
|
QT_VER: '6.7.3'
|
||||||
QT_VER_MAIN: '6'
|
QT_VER_MAIN: '6'
|
||||||
LLVM_COMPILER_VER: '16'
|
LLVM_COMPILER_VER: '18'
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: "macOS-13"
|
vmImage: "macOS-13"
|
||||||
|
@ -25,11 +25,12 @@
|
|||||||
LLVMBitstreamReader.lib;
|
LLVMBitstreamReader.lib;
|
||||||
LLVMBitWriter.lib;
|
LLVMBitWriter.lib;
|
||||||
LLVMCFGuard.lib;
|
LLVMCFGuard.lib;
|
||||||
LLVMCFIVerify.lib;
|
|
||||||
LLVMCodeGen.lib;
|
LLVMCodeGen.lib;
|
||||||
|
LLVMCodeGenTypes.lib;
|
||||||
LLVMCore.lib;
|
LLVMCore.lib;
|
||||||
LLVMCoroutines.lib;
|
LLVMCoroutines.lib;
|
||||||
LLVMCoverage.lib;
|
LLVMCoverage.lib;
|
||||||
|
LLVMDebugInfoBTF.lib;
|
||||||
LLVMDebugInfoCodeView.lib;
|
LLVMDebugInfoCodeView.lib;
|
||||||
LLVMDebuginfod.lib;
|
LLVMDebuginfod.lib;
|
||||||
LLVMDebugInfoDWARF.lib;
|
LLVMDebugInfoDWARF.lib;
|
||||||
@ -38,22 +39,23 @@
|
|||||||
LLVMDebugInfoMSF.lib;
|
LLVMDebugInfoMSF.lib;
|
||||||
LLVMDebugInfoPDB.lib;
|
LLVMDebugInfoPDB.lib;
|
||||||
LLVMDemangle.lib;
|
LLVMDemangle.lib;
|
||||||
LLVMDiff.lib;
|
|
||||||
LLVMDlltoolDriver.lib;
|
LLVMDlltoolDriver.lib;
|
||||||
LLVMDWARFLinker.lib;
|
LLVMDWARFLinker.lib;
|
||||||
|
LLVMDWARFLinkerClassic.lib;
|
||||||
LLVMDWARFLinkerParallel.lib;
|
LLVMDWARFLinkerParallel.lib;
|
||||||
LLVMDWP.lib;
|
LLVMDWP.lib;
|
||||||
LLVMExecutionEngine.lib;
|
LLVMExecutionEngine.lib;
|
||||||
LLVMExegesis.lib;
|
|
||||||
LLVMExegesisX86.lib;
|
|
||||||
LLVMExtensions.lib;
|
LLVMExtensions.lib;
|
||||||
LLVMFileCheck.lib;
|
LLVMFileCheck.lib;
|
||||||
|
LLVMFrontendDriver.lib;
|
||||||
LLVMFrontendHLSL.lib;
|
LLVMFrontendHLSL.lib;
|
||||||
|
LLVMFrontendOffloading.lib;
|
||||||
LLVMFrontendOpenACC.lib;
|
LLVMFrontendOpenACC.lib;
|
||||||
LLVMFrontendOpenMP.lib;
|
LLVMFrontendOpenMP.lib;
|
||||||
LLVMFuzzerCLI.lib;
|
LLVMFuzzerCLI.lib;
|
||||||
LLVMFuzzMutate.lib;
|
LLVMFuzzMutate.lib;
|
||||||
LLVMGlobalISel.lib;
|
LLVMGlobalISel.lib;
|
||||||
|
LLVMHipStdPar.lib;
|
||||||
LLVMInstCombine.lib;
|
LLVMInstCombine.lib;
|
||||||
LLVMInstrumentation.lib;
|
LLVMInstrumentation.lib;
|
||||||
LLVMIntelJITEvents.lib;
|
LLVMIntelJITEvents.lib;
|
||||||
@ -67,10 +69,10 @@
|
|||||||
LLVMLineEditor.lib;
|
LLVMLineEditor.lib;
|
||||||
LLVMLinker.lib;
|
LLVMLinker.lib;
|
||||||
LLVMLTO.lib;
|
LLVMLTO.lib;
|
||||||
|
LLVMMC.lib;
|
||||||
LLVMMCA.lib;
|
LLVMMCA.lib;
|
||||||
LLVMMCDisassembler.lib;
|
LLVMMCDisassembler.lib;
|
||||||
LLVMMCJIT.lib;
|
LLVMMCJIT.lib;
|
||||||
LLVMMC.lib;
|
|
||||||
LLVMMCParser.lib;
|
LLVMMCParser.lib;
|
||||||
LLVMMIRParser.lib;
|
LLVMMIRParser.lib;
|
||||||
LLVMObjCARCOpts.lib;
|
LLVMObjCARCOpts.lib;
|
||||||
@ -78,6 +80,7 @@
|
|||||||
LLVMObject.lib;
|
LLVMObject.lib;
|
||||||
LLVMObjectYAML.lib;
|
LLVMObjectYAML.lib;
|
||||||
LLVMOption.lib;
|
LLVMOption.lib;
|
||||||
|
LLVMOrcDebugging.lib;
|
||||||
LLVMOrcJIT.lib;
|
LLVMOrcJIT.lib;
|
||||||
LLVMOrcShared.lib;
|
LLVMOrcShared.lib;
|
||||||
LLVMOrcTargetProcess.lib;
|
LLVMOrcTargetProcess.lib;
|
||||||
@ -89,11 +92,13 @@
|
|||||||
LLVMSelectionDAG.lib;
|
LLVMSelectionDAG.lib;
|
||||||
LLVMSupport.lib;
|
LLVMSupport.lib;
|
||||||
LLVMSymbolize.lib;
|
LLVMSymbolize.lib;
|
||||||
LLVMTableGenGlobalISel.lib;
|
|
||||||
LLVMTableGen.lib;
|
LLVMTableGen.lib;
|
||||||
|
LLVMTableGenCommon.lib;
|
||||||
|
LLVMTableGenGlobalISel.lib;
|
||||||
LLVMTarget.lib;
|
LLVMTarget.lib;
|
||||||
LLVMTargetParser.lib;
|
LLVMTargetParser.lib;
|
||||||
LLVMTextAPI.lib;
|
LLVMTextAPI.lib;
|
||||||
|
LLVMTextAPIBinaryReader.lib;
|
||||||
LLVMTransformUtils.lib;
|
LLVMTransformUtils.lib;
|
||||||
LLVMVectorize.lib;
|
LLVMVectorize.lib;
|
||||||
LLVMWindowsDriver.lib;
|
LLVMWindowsDriver.lib;
|
||||||
|
@ -26,11 +26,12 @@
|
|||||||
LLVMBitstreamReader.lib;
|
LLVMBitstreamReader.lib;
|
||||||
LLVMBitWriter.lib;
|
LLVMBitWriter.lib;
|
||||||
LLVMCFGuard.lib;
|
LLVMCFGuard.lib;
|
||||||
LLVMCFIVerify.lib;
|
|
||||||
LLVMCodeGen.lib;
|
LLVMCodeGen.lib;
|
||||||
|
LLVMCodeGenTypes.lib;
|
||||||
LLVMCore.lib;
|
LLVMCore.lib;
|
||||||
LLVMCoroutines.lib;
|
LLVMCoroutines.lib;
|
||||||
LLVMCoverage.lib;
|
LLVMCoverage.lib;
|
||||||
|
LLVMDebugInfoBTF.lib;
|
||||||
LLVMDebugInfoCodeView.lib;
|
LLVMDebugInfoCodeView.lib;
|
||||||
LLVMDebuginfod.lib;
|
LLVMDebuginfod.lib;
|
||||||
LLVMDebugInfoDWARF.lib;
|
LLVMDebugInfoDWARF.lib;
|
||||||
@ -39,22 +40,23 @@
|
|||||||
LLVMDebugInfoMSF.lib;
|
LLVMDebugInfoMSF.lib;
|
||||||
LLVMDebugInfoPDB.lib;
|
LLVMDebugInfoPDB.lib;
|
||||||
LLVMDemangle.lib;
|
LLVMDemangle.lib;
|
||||||
LLVMDiff.lib;
|
|
||||||
LLVMDlltoolDriver.lib;
|
LLVMDlltoolDriver.lib;
|
||||||
LLVMDWARFLinker.lib;
|
LLVMDWARFLinker.lib;
|
||||||
|
LLVMDWARFLinkerClassic.lib;
|
||||||
LLVMDWARFLinkerParallel.lib;
|
LLVMDWARFLinkerParallel.lib;
|
||||||
LLVMDWP.lib;
|
LLVMDWP.lib;
|
||||||
LLVMExecutionEngine.lib;
|
LLVMExecutionEngine.lib;
|
||||||
LLVMExegesis.lib;
|
|
||||||
LLVMExegesisX86.lib;
|
|
||||||
LLVMExtensions.lib;
|
LLVMExtensions.lib;
|
||||||
LLVMFileCheck.lib;
|
LLVMFileCheck.lib;
|
||||||
|
LLVMFrontendDriver.lib;
|
||||||
LLVMFrontendHLSL.lib;
|
LLVMFrontendHLSL.lib;
|
||||||
|
LLVMFrontendOffloading.lib;
|
||||||
LLVMFrontendOpenACC.lib;
|
LLVMFrontendOpenACC.lib;
|
||||||
LLVMFrontendOpenMP.lib;
|
LLVMFrontendOpenMP.lib;
|
||||||
LLVMFuzzerCLI.lib;
|
LLVMFuzzerCLI.lib;
|
||||||
LLVMFuzzMutate.lib;
|
LLVMFuzzMutate.lib;
|
||||||
LLVMGlobalISel.lib;
|
LLVMGlobalISel.lib;
|
||||||
|
LLVMHipStdPar.lib;
|
||||||
LLVMInstCombine.lib;
|
LLVMInstCombine.lib;
|
||||||
LLVMInstrumentation.lib;
|
LLVMInstrumentation.lib;
|
||||||
LLVMIntelJITEvents.lib;
|
LLVMIntelJITEvents.lib;
|
||||||
@ -68,10 +70,10 @@
|
|||||||
LLVMLineEditor.lib;
|
LLVMLineEditor.lib;
|
||||||
LLVMLinker.lib;
|
LLVMLinker.lib;
|
||||||
LLVMLTO.lib;
|
LLVMLTO.lib;
|
||||||
|
LLVMMC.lib;
|
||||||
LLVMMCA.lib;
|
LLVMMCA.lib;
|
||||||
LLVMMCDisassembler.lib;
|
LLVMMCDisassembler.lib;
|
||||||
LLVMMCJIT.lib;
|
LLVMMCJIT.lib;
|
||||||
LLVMMC.lib;
|
|
||||||
LLVMMCParser.lib;
|
LLVMMCParser.lib;
|
||||||
LLVMMIRParser.lib;
|
LLVMMIRParser.lib;
|
||||||
LLVMObjCARCOpts.lib;
|
LLVMObjCARCOpts.lib;
|
||||||
@ -79,6 +81,7 @@
|
|||||||
LLVMObject.lib;
|
LLVMObject.lib;
|
||||||
LLVMObjectYAML.lib;
|
LLVMObjectYAML.lib;
|
||||||
LLVMOption.lib;
|
LLVMOption.lib;
|
||||||
|
LLVMOrcDebugging.lib;
|
||||||
LLVMOrcJIT.lib;
|
LLVMOrcJIT.lib;
|
||||||
LLVMOrcShared.lib;
|
LLVMOrcShared.lib;
|
||||||
LLVMOrcTargetProcess.lib;
|
LLVMOrcTargetProcess.lib;
|
||||||
@ -90,11 +93,13 @@
|
|||||||
LLVMSelectionDAG.lib;
|
LLVMSelectionDAG.lib;
|
||||||
LLVMSupport.lib;
|
LLVMSupport.lib;
|
||||||
LLVMSymbolize.lib;
|
LLVMSymbolize.lib;
|
||||||
LLVMTableGenGlobalISel.lib;
|
|
||||||
LLVMTableGen.lib;
|
LLVMTableGen.lib;
|
||||||
|
LLVMTableGenCommon.lib;
|
||||||
|
LLVMTableGenGlobalISel.lib;
|
||||||
LLVMTarget.lib;
|
LLVMTarget.lib;
|
||||||
LLVMTargetParser.lib;
|
LLVMTargetParser.lib;
|
||||||
LLVMTextAPI.lib;
|
LLVMTextAPI.lib;
|
||||||
|
LLVMTextAPIBinaryReader.lib;
|
||||||
LLVMTransformUtils.lib;
|
LLVMTransformUtils.lib;
|
||||||
LLVMVectorize.lib;
|
LLVMVectorize.lib;
|
||||||
LLVMWindowsDriver.lib;
|
LLVMWindowsDriver.lib;
|
||||||
|
@ -40,19 +40,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <llvm/IR/Verifier.h>
|
#include <llvm/IR/Verifier.h>
|
||||||
#include <llvm/Transforms/Utils/BasicBlockUtils.h>
|
#include <llvm/Transforms/Utils/BasicBlockUtils.h>
|
||||||
#if LLVM_VERSION_MAJOR < 17
|
|
||||||
#include <llvm/Support/FormattedStream.h>
|
|
||||||
#include <llvm/TargetParser/Host.h>
|
|
||||||
#include <llvm/Object/ObjectFile.h>
|
|
||||||
#include <llvm/IR/InstIterator.h>
|
|
||||||
#include <llvm/IR/LegacyPassManager.h>
|
|
||||||
#include <llvm/Transforms/Scalar.h>
|
|
||||||
#else
|
|
||||||
#include <llvm/Analysis/CGSCCPassManager.h>
|
#include <llvm/Analysis/CGSCCPassManager.h>
|
||||||
#include <llvm/Analysis/LoopAnalysisManager.h>
|
#include <llvm/Analysis/LoopAnalysisManager.h>
|
||||||
#include <llvm/Passes/PassBuilder.h>
|
#include <llvm/Passes/PassBuilder.h>
|
||||||
#include <llvm/Transforms/Scalar/EarlyCSE.h>
|
#include <llvm/Transforms/Scalar/EarlyCSE.h>
|
||||||
#endif
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#else
|
#else
|
||||||
@ -5615,29 +5606,6 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module<lv2_obj>& module
|
|||||||
translator.build_interpreter();
|
translator.build_interpreter();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LLVM_VERSION_MAJOR < 17
|
|
||||||
legacy::FunctionPassManager pm(_module.get());
|
|
||||||
|
|
||||||
// Basic optimizations
|
|
||||||
//pm.add(createCFGSimplificationPass());
|
|
||||||
//pm.add(createPromoteMemoryToRegisterPass());
|
|
||||||
pm.add(createEarlyCSEPass());
|
|
||||||
//pm.add(createTailCallEliminationPass());
|
|
||||||
//pm.add(createInstructionCombiningPass());
|
|
||||||
//pm.add(createBasicAAWrapperPass());
|
|
||||||
//pm.add(new MemoryDependenceAnalysis());
|
|
||||||
//pm.add(createLICMPass());
|
|
||||||
//pm.add(createLoopInstSimplifyPass());
|
|
||||||
//pm.add(createNewGVNPass());
|
|
||||||
//pm.add(createDeadStoreEliminationPass());
|
|
||||||
//pm.add(createSCCPPass());
|
|
||||||
//pm.add(createReassociatePass());
|
|
||||||
//pm.add(createInstructionCombiningPass());
|
|
||||||
//pm.add(createInstructionSimplifierPass());
|
|
||||||
//pm.add(createAggressiveDCEPass());
|
|
||||||
//pm.add(createCFGSimplificationPass());
|
|
||||||
//pm.add(createLintPass()); // Check
|
|
||||||
#else
|
|
||||||
// Create the analysis managers.
|
// Create the analysis managers.
|
||||||
// These must be declared in this order so that they are destroyed in the
|
// These must be declared in this order so that they are destroyed in the
|
||||||
// correct order due to inter-analysis-manager references.
|
// correct order due to inter-analysis-manager references.
|
||||||
@ -5662,7 +5630,6 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module<lv2_obj>& module
|
|||||||
FunctionPassManager fpm;
|
FunctionPassManager fpm;
|
||||||
// Basic optimizations
|
// Basic optimizations
|
||||||
fpm.addPass(EarlyCSEPass());
|
fpm.addPass(EarlyCSEPass());
|
||||||
#endif
|
|
||||||
|
|
||||||
u32 guest_code_size = 0;
|
u32 guest_code_size = 0;
|
||||||
u32 min_addr = umax;
|
u32 min_addr = umax;
|
||||||
@ -5691,11 +5658,7 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module<lv2_obj>& module
|
|||||||
{
|
{
|
||||||
#ifdef ARCH_X64 // TODO
|
#ifdef ARCH_X64 // TODO
|
||||||
// Run optimization passes
|
// Run optimization passes
|
||||||
#if LLVM_VERSION_MAJOR < 17
|
|
||||||
pm.run(*func);
|
|
||||||
#else
|
|
||||||
fpm.run(*func, fam);
|
fpm.run(*func, fam);
|
||||||
#endif
|
|
||||||
#endif // ARCH_X64
|
#endif // ARCH_X64
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -5713,11 +5676,7 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module<lv2_obj>& module
|
|||||||
{
|
{
|
||||||
#ifdef ARCH_X64 // TODO
|
#ifdef ARCH_X64 // TODO
|
||||||
// Run optimization passes
|
// Run optimization passes
|
||||||
#if LLVM_VERSION_MAJOR < 17
|
|
||||||
pm.run(*func);
|
|
||||||
#else
|
|
||||||
fpm.run(*func, fam);
|
fpm.run(*func, fam);
|
||||||
#endif
|
|
||||||
#endif // ARCH_X64
|
#endif // ARCH_X64
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2774,12 +2774,7 @@ void PPUTranslator::MFOCRF(ppu_opcode_t op)
|
|||||||
if (op.l11)
|
if (op.l11)
|
||||||
{
|
{
|
||||||
// MFOCRF
|
// MFOCRF
|
||||||
|
|
||||||
#if LLVM_VERSION_MAJOR < 17
|
|
||||||
const u64 pos = countLeadingZeros<u32>(op.crm) - 24;
|
|
||||||
#else
|
|
||||||
const u64 pos = countl_zero<u32>(op.crm) - 24;
|
const u64 pos = countl_zero<u32>(op.crm) - 24;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (pos >= 8 || 0x80u >> pos != op.crm)
|
if (pos >= 8 || 0x80u >> pos != op.crm)
|
||||||
{
|
{
|
||||||
@ -3066,11 +3061,7 @@ void PPUTranslator::MTOCRF(ppu_opcode_t op)
|
|||||||
if (op.l11)
|
if (op.l11)
|
||||||
{
|
{
|
||||||
// MTOCRF
|
// MTOCRF
|
||||||
#if LLVM_VERSION_MAJOR < 17
|
|
||||||
const u64 pos = countLeadingZeros<u32>(op.crm) - 24;
|
|
||||||
#else
|
|
||||||
const u64 pos = countl_zero<u32>(op.crm) - 24;
|
const u64 pos = countl_zero<u32>(op.crm) - 24;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (pos >= 8 || 0x80u >> pos != op.crm)
|
if (pos >= 8 || 0x80u >> pos != op.crm)
|
||||||
{
|
{
|
||||||
|
@ -43,11 +43,6 @@ const extern spu_decoder<spu_iflag> g_spu_iflag;
|
|||||||
#include <llvm/IR/Verifier.h>
|
#include <llvm/IR/Verifier.h>
|
||||||
#include <llvm/TargetParser/Host.h>
|
#include <llvm/TargetParser/Host.h>
|
||||||
#include <llvm/Transforms/Utils/BasicBlockUtils.h>
|
#include <llvm/Transforms/Utils/BasicBlockUtils.h>
|
||||||
#if LLVM_VERSION_MAJOR < 17
|
|
||||||
#include <llvm/IR/LegacyPassManager.h>
|
|
||||||
#include <llvm/Transforms/Scalar.h>
|
|
||||||
#include <llvm/Analysis/AliasAnalysis.h>
|
|
||||||
#else
|
|
||||||
#include <llvm/Analysis/CGSCCPassManager.h>
|
#include <llvm/Analysis/CGSCCPassManager.h>
|
||||||
#include <llvm/Analysis/LoopAnalysisManager.h>
|
#include <llvm/Analysis/LoopAnalysisManager.h>
|
||||||
#include <llvm/IR/PassManager.h>
|
#include <llvm/IR/PassManager.h>
|
||||||
@ -58,7 +53,6 @@ const extern spu_decoder<spu_iflag> g_spu_iflag;
|
|||||||
#include <llvm/Transforms/Scalar/LICM.h>
|
#include <llvm/Transforms/Scalar/LICM.h>
|
||||||
#include <llvm/Transforms/Scalar/LoopPassManager.h>
|
#include <llvm/Transforms/Scalar/LoopPassManager.h>
|
||||||
#include <llvm/Transforms/Scalar/SimplifyCFG.h>
|
#include <llvm/Transforms/Scalar/SimplifyCFG.h>
|
||||||
#endif
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#else
|
#else
|
||||||
@ -2567,21 +2561,6 @@ public:
|
|||||||
m_function_table->eraseFromParent();
|
m_function_table->eraseFromParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LLVM_VERSION_MAJOR < 17
|
|
||||||
// Initialize pass manager
|
|
||||||
legacy::FunctionPassManager pm(_module.get());
|
|
||||||
|
|
||||||
// Basic optimizations
|
|
||||||
pm.add(createEarlyCSEPass());
|
|
||||||
pm.add(createCFGSimplificationPass());
|
|
||||||
//pm.add(createNewGVNPass());
|
|
||||||
pm.add(createDeadStoreEliminationPass());
|
|
||||||
pm.add(createLICMPass());
|
|
||||||
pm.add(createAggressiveDCEPass());
|
|
||||||
pm.add(createDeadCodeEliminationPass());
|
|
||||||
//pm.add(createLintPass()); // Check
|
|
||||||
#else
|
|
||||||
|
|
||||||
// Create the analysis managers.
|
// Create the analysis managers.
|
||||||
// These must be declared in this order so that they are destroyed in the
|
// These must be declared in this order so that they are destroyed in the
|
||||||
// correct order due to inter-analysis-manager references.
|
// correct order due to inter-analysis-manager references.
|
||||||
@ -2610,7 +2589,6 @@ public:
|
|||||||
fpm.addPass(DSEPass());
|
fpm.addPass(DSEPass());
|
||||||
fpm.addPass(createFunctionToLoopPassAdaptor(LICMPass(LICMOptions()), true));
|
fpm.addPass(createFunctionToLoopPassAdaptor(LICMPass(LICMOptions()), true));
|
||||||
fpm.addPass(ADCEPass());
|
fpm.addPass(ADCEPass());
|
||||||
#endif
|
|
||||||
|
|
||||||
for (auto& f : *m_module)
|
for (auto& f : *m_module)
|
||||||
{
|
{
|
||||||
@ -2620,11 +2598,7 @@ public:
|
|||||||
for (const auto& func : m_functions)
|
for (const auto& func : m_functions)
|
||||||
{
|
{
|
||||||
const auto f = func.second.fn ? func.second.fn : func.second.chunk;
|
const auto f = func.second.fn ? func.second.fn : func.second.chunk;
|
||||||
#if LLVM_VERSION_MAJOR < 17
|
|
||||||
pm.run(*f);
|
|
||||||
#else
|
|
||||||
fpm.run(*f, fam);
|
fpm.run(*f, fam);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear context (TODO)
|
// Clear context (TODO)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user