From 3e6f9faf7119be09196930ac6f10c32a319986ed Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 21 Mar 2017 20:16:18 +0300 Subject: [PATCH] Use LLVM 4.0 --- .gitmodules | 2 +- .travis.yml | 15 +++++---------- Utilities/JIT.cpp | 5 ----- appveyor.yml | 4 ++-- llvm | 2 +- rpcs3/CMakeLists.txt | 4 ++-- rpcs3/Emu/Cell/PPUThread.cpp | 2 +- rpcs3_llvm.props | 2 +- 8 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.gitmodules b/.gitmodules index cd79988c2f..c62acab232 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,7 @@ [submodule "llvm"] path = llvm url = https://github.com/llvm-mirror/llvm - branch = release_38 + branch = release_40 [submodule "rsx_program_decompiler"] path = rsx_program_decompiler url = https://github.com/RPCS3/rsx_program_decompiler diff --git a/.travis.yml b/.travis.yml index c6c7513189..5bc6a6610d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,18 +43,14 @@ before_install: pip install --user cpp-coveralls requests[security]; else brew update; brew update; - brew install ccache glew wxwidgets llvm38; + brew install ccache glew wxwidgets llvm40; fi; before_script: - git submodule update --init rsx_program_decompiler asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal - mkdir build - cd build - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then - cmake ..; - else - cmake .. -DLLVM_DIR=/usr/local/opt/llvm38/lib/llvm-3.8/share/llvm/cmake; - fi; + - cmake .. script: # Add a command to show all the variables. May be useful for debugging Travis. @@ -67,19 +63,18 @@ addons: apt: sources: - ubuntu-toolchain-r-test - #- llvm-toolchain-trusty-3.8 temporarily disabled + - llvm-toolchain-trusty-4.0 packages: - cmake - libopenal-dev - freeglut3-dev - libglew-dev - libc6-dev - #- llvm-3.8 - #- llvm-3.8-dev + - llvm-4.0 + - llvm-4.0-dev - libedit-dev - g++-5 - gcc-5 - #- clang-3.6 - libstdc++-5-dev - lib32stdc++6 - zlib1g-dev diff --git a/Utilities/JIT.cpp b/Utilities/JIT.cpp index 0c8ec2135e..90e133159c 100644 --- a/Utilities/JIT.cpp +++ b/Utilities/JIT.cpp @@ -305,11 +305,6 @@ jit_compiler::jit_compiler(std::unordered_map init_ m_cpu = llvm::sys::getHostCPUName(); } - if (m_cpu == "skylake") - { - m_cpu = "haswell"; - } - std::string result; m_engine.reset(llvm::EngineBuilder(std::make_unique("", g_llvm_ctx)) diff --git a/appveyor.yml b/appveyor.yml index 4411e1e7b7..d803efb863 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,14 +17,14 @@ before_build: - 7z x zlib.7z -aos -oC:\rpcs3\ > null - 7z x vulkan.7z -aos -oC:\rpcs3\Vulkan > null - if %configuration%==Release (cmake -G "Visual Studio 14 Win64" -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON) - else (7z x llvmlibs.7z -aos -oC:\rpcs3 > null && cmake -G "Visual Studio 14 Win64" -DLLVM_DIR=C:/rpcs3/llvm_build/share/llvm/cmake -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON) + else (7z x llvmlibs.7z -aos -oC:\rpcs3 > null && cmake -G "Visual Studio 14 Win64" -DLLVM_DIR=C:/rpcs3/llvm_build/lib/cmake/llvm -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON) build_script: - cmake --build . --config Release -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" install: - appveyor DownloadFile "https://dl.dropboxusercontent.com/s/c1by0uulee6g8th/wxWidgets.7z?dl=0" -FileName wxWidgets.7z - - appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B-98fOyaZKJ5YWVnb29JZXFQWkU" -FileName llvmlibs.7z + - appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRY2k3Q2Yya05lcm8" -FileName llvmlibs.7z - appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRa21fbDQteTN1dGs" -FileName vulkan.7z - appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B6v_qtb9hkicQ2hHa2dRbF83cE0" -FileName zlib.7z - set WXWIN=C:\rpcs3\wxWidgets diff --git a/llvm b/llvm index 051e787f26..4423e35117 160000 --- a/llvm +++ b/llvm @@ -1 +1 @@ -Subproject commit 051e787f26dbfdc26cf61a57bc82ca00dcb812e8 +Subproject commit 4423e351176a92975739dd4ea43c2ff5877236ae diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index 389f41aa77..544204163c 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -88,7 +88,7 @@ if(NOT MSVC) endif() find_package(OpenGL REQUIRED) find_package(OpenAL REQUIRED) -find_package(LLVM 3.8 CONFIG) +find_package(LLVM 4.0 CONFIG) include("${wxWidgets_USE_FILE}") @@ -151,7 +151,7 @@ if(WIN32) endif() if(NOT LLVM_FOUND) - Message("LLVM not found! LLVM 3.8 is required. RPCS3 will be compiled without LLVM support.") + Message("LLVM not found! LLVM 4.0 is required. RPCS3 will be compiled without LLVM support.") else() add_definitions(${LLVM_DEFINITIONS}) add_definitions(-DLLVM_AVAILABLE) diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 5aab71f230..ff3021fdde 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -1003,7 +1003,7 @@ extern void ppu_initialize(const ppu_module& info) //pm.add(new MemoryDependenceAnalysis()); pm.add(createLICMPass()); pm.add(createLoopInstSimplifyPass()); - pm.add(createGVNPass()); + //pm.add(createGVNPass()); pm.add(createDeadStoreEliminationPass()); pm.add(createSCCPPass()); pm.add(createInstructionCombiningPass()); diff --git a/rpcs3_llvm.props b/rpcs3_llvm.props index 6dde5d8d9d..9e95717589 100644 --- a/rpcs3_llvm.props +++ b/rpcs3_llvm.props @@ -10,7 +10,7 @@ ..\llvm_build\Debug\lib ..\llvm_build\Release\lib - LLVMProfileData.lib;LLVMDebugInfoCodeView.lib;LLVMInstrumentation.lib;LLVMMCJIT.lib;LLVMRuntimeDyld.lib;LLVMVectorize.lib;LLVMX86CodeGen.lib;LLVMX86Disassembler.lib;LLVMExecutionEngine.lib;LLVMAsmPrinter.lib;LLVMSelectionDAG.lib;LLVMCodeGen.lib;LLVMScalarOpts.lib;LLVMInstCombine.lib;LLVMTransformUtils.lib;LLVMAnalysis.lib;LLVMTarget.lib;LLVMX86Desc.lib;LLVMX86AsmPrinter.lib;LLVMObject.lib;LLVMMCParser.lib;LLVMBitReader.lib;LLVMCore.lib;LLVMX86Utils.lib;LLVMMC.lib;LLVMX86Info.lib;LLVMSupport.lib;LLVMMCDisassembler.lib;LLVMipo.lib + LLVMProfileData.lib;LLVMDebugInfoCodeView.lib;LLVMDebugInfoMSF.lib;LLVMInstrumentation.lib;LLVMMCJIT.lib;LLVMRuntimeDyld.lib;LLVMVectorize.lib;LLVMX86CodeGen.lib;LLVMGlobalISel.lib;LLVMX86Disassembler.lib;LLVMExecutionEngine.lib;LLVMAsmPrinter.lib;LLVMSelectionDAG.lib;LLVMCodeGen.lib;LLVMScalarOpts.lib;LLVMInstCombine.lib;LLVMTransformUtils.lib;LLVMAnalysis.lib;LLVMTarget.lib;LLVMX86Desc.lib;LLVMX86AsmPrinter.lib;LLVMObject.lib;LLVMMCParser.lib;LLVMBitReader.lib;LLVMCore.lib;LLVMX86Utils.lib;LLVMMC.lib;LLVMX86Info.lib;LLVMSupport.lib;LLVMMCDisassembler.lib;LLVMipo.lib