summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlexey Bader <alexey.bader@intel.com>2015-09-14 13:06:27 +0300
committerAlexey Bader <alexey.bader@intel.com>2015-09-14 14:43:57 +0300
commita3a17ef9b85defbd99e9b8e40b37bf4fdcdf79f5 (patch)
tree3daf8f85ee591b4ebae10bd8c93dd6a636b28c76 /tools
parent0c25b606d2cacb879eb344226b8dbe2314d0e9ac (diff)
[SPIRV] Added mem2reg pass to regularize unoptimized LLVM IR.
llvm-spirv tool is supposed to be run with an unoptimized output of clang, which contains a lot of constructions like: %a.addr = alloca i32 addrspace(1)*, align 4 store i32 addrspace(1)* %a, i32 addrspace(1)** %a.addr, align 4 %0 = load i32 addrspace(1)** %a.addr, align 4 Which must be removed for correct translation to SPiR-V. TODO: probably we will need to add SROA to regularization passes in order to handle aggregate data types.
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-spirv/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/llvm-spirv/CMakeLists.txt b/tools/llvm-spirv/CMakeLists.txt
index eec7607..d868689 100644
--- a/tools/llvm-spirv/CMakeLists.txt
+++ b/tools/llvm-spirv/CMakeLists.txt
@@ -6,6 +6,7 @@ set(LLVM_LINK_COMPONENTS
SPIRVLib
Core
Support
+ TransformUtils
)
add_llvm_tool(llvm-spirv