1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Use LLVM 4.0

This commit is contained in:
Nekotekina 2017-03-21 20:16:18 +03:00
parent ad72168143
commit 3e6f9faf71
8 changed files with 13 additions and 23 deletions

2
.gitmodules vendored
View File

@ -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

View File

@ -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

View File

@ -305,11 +305,6 @@ jit_compiler::jit_compiler(std::unordered_map<std::string, std::uintptr_t> init_
m_cpu = llvm::sys::getHostCPUName();
}
if (m_cpu == "skylake")
{
m_cpu = "haswell";
}
std::string result;
m_engine.reset(llvm::EngineBuilder(std::make_unique<llvm::Module>("", g_llvm_ctx))

View File

@ -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

2
llvm

@ -1 +1 @@
Subproject commit 051e787f26dbfdc26cf61a57bc82ca00dcb812e8
Subproject commit 4423e351176a92975739dd4ea43c2ff5877236ae

View File

@ -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)

View File

@ -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());

View File

@ -10,7 +10,7 @@
<Lib>
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Debug - LLVM'">..\llvm_build\Debug\lib</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Release - LLVM'">..\llvm_build\Release\lib</AdditionalLibraryDirectories>
<AdditionalDependencies>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</AdditionalDependencies>
<AdditionalDependencies>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</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemGroup />