Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Also, the version was bumped to 0.2.1 (from 0.2.0) due to the changes.
Fix: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/15
|
|
The project version was also changed as the entrypoints to the library
have been modified.
Command used:
/usr/share/clang/run-clang-tidy.py -header-filter "(./include/SPIRV.h|./lib/SPIRV/Mangler/FunctionDescriptor.h|./lib/SPIRV/Mangler/ManglingUtils.h|./lib/SPIRV/Mangler/NameMangleAPI.h|./lib/SPIRV/Mangler/ParameterType.h|./lib/SPIRV/Mangler/Refcount.h|./lib/SPIRV/libSPIRV/libSPIRV.h|./lib/SPIRV/libSPIRV/SPIRVBasicBlock.h|./lib/SPIRV/libSPIRV/SPIRVDebug.h|./lib/SPIRV/libSPIRV/SPIRVDecorate.h|./lib/SPIRV/libSPIRV/SPIRVEntry.h|./lib/SPIRV/libSPIRV/SPIRVEnum.h|./lib/SPIRV/libSPIRV/SPIRVError.h|./lib/SPIRV/libSPIRV/SPIRVErrorEnum.h|./lib/SPIRV/libSPIRV/SPIRVExtInst.h|./lib/SPIRV/libSPIRV/SPIRVFunction.h|./lib/SPIRV/libSPIRV/SPIRVInstruction.h|./lib/SPIRV/libSPIRV/SPIRVIsValidEnum.h|./lib/SPIRV/libSPIRV/SPIRVModule.h|./lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h|./lib/SPIRV/libSPIRV/SPIRVOpCode.h|./lib/SPIRV/libSPIRV/SPIRVOpCodeEnum.h|./lib/SPIRV/libSPIRV/SPIRVStream.h|./lib/SPIRV/libSPIRV/SPIRVType.h|./lib/SPIRV/libSPIRV/SPIRVUtil.h|./lib/SPIRV/libSPIRV/SPIRVValue.h|./lib/SPIRV/runtime/OpenCL/inc/spirv.h|./lib/SPIRV/runtime/OpenCL/inc/spirv_convert.h|./lib/SPIRV/OCLUtil.h|./lib/SPIRV/OCLTypeToSPIRV.h|./lib/SPIRV/SPIRVInternal.h|./lib/SPIRV/SPIRVMDBuilder.h|./lib/SPIRV/SPIRVMDWalker.h|./lib/SPIRV/SPIRVWriterPass.h)" -checks="-*,readability-identifier-naming" `find . -iname "*.cpp"`
Manual edits:
* lib/SPIRV/Mangler/FunctionDescriptor.cpp
* lib/SPIRV/libSPIRV/SPIRVEntry.h
* lib/SPIRV/libSPIRV/SPIRVDecorate.h
* lib/SPIRV/libSPIRV/SPIRVValue.h
* lib/SPIRV/libSPIRV/SPIRVStream.h
* lib/SPIRV/libSPIRV/SPIRVInstruction.h
* lib/SPIRV/Mangler/ParameterType.cpp
* lib/SPIRV/Mangler/Mangler.cpp
* lib/SPIRV/OCL20ToSPIRV.cpp
* lib/SPIRV/Mangler/ParameterType.h
* lib/SPIRV/SPIRVLowerOCLBlocks.cpp
* lib/SPIRV/SPIRVUtil.cpp
* lib/SPIRV/Mangler/Refcount.h
|
|
Commands run:
* clang-format -i `find . -iname "*.cpp"`
* clang-format -i `find . -iname "*.h"`
Files manually reverted:
* lib/SPIRV/libSPIRV/OpenCL.std.h
* lib/SPIRV/runtime/OpenCL/inc/spirv.h
* lib/SPIRV/runtime/OpenCL/inc/spirv_convert.h
Files manually edited (to fix their first line):
* lib/SPIRV/OCL20ToSPIRV.cpp
* lib/SPIRV/OCL21ToSPIRV.cpp
* lib/SPIRV/SPIRVInternal.h
* lib/SPIRV/SPIRVLowerBool.cpp
* lib/SPIRV/SPIRVLowerMemmove.cpp
* lib/SPIRV/SPIRVToOCL20.cpp
* lib/SPIRV/libSPIRV/SPIRVBasicBlock.cpp
* lib/SPIRV/libSPIRV/SPIRVBasicBlock.h
* lib/SPIRV/libSPIRV/SPIRVDebug.cpp
* lib/SPIRV/libSPIRV/SPIRVDebug.h
* lib/SPIRV/libSPIRV/SPIRVDecorate.cpp
* lib/SPIRV/libSPIRV/SPIRVDecorate.h
* lib/SPIRV/libSPIRV/SPIRVEntry.cpp
* lib/SPIRV/libSPIRV/SPIRVEntry.h
* lib/SPIRV/libSPIRV/SPIRVError.h
* lib/SPIRV/libSPIRV/SPIRVExtInst.h (also added missing include to
SPIRVEnum.h)
* lib/SPIRV/libSPIRV/SPIRVFunction.cpp
* lib/SPIRV/libSPIRV/SPIRVFunction.h
* lib/SPIRV/libSPIRV/SPIRVInstruction.cpp
* lib/SPIRV/libSPIRV/SPIRVInstruction.h
* lib/SPIRV/libSPIRV/SPIRVModule.cpp
* lib/SPIRV/libSPIRV/SPIRVModule.h
* lib/SPIRV/libSPIRV/SPIRVStream.cpp
* lib/SPIRV/libSPIRV/SPIRVStream.h
* lib/SPIRV/libSPIRV/SPIRVType.cpp
* lib/SPIRV/libSPIRV/SPIRVUtil.h
* lib/SPIRV/libSPIRV/SPIRVValue.cpp
* lib/SPIRV/libSPIRV/SPIRVValue.h
|
|
The code was currently using a mix of DOS-style and UNIX-style; LLVM
itself uses UNIX-style.
Commands used:
* dos2unix `find include -iname "*"`
* dos2unix `find lib -iname "*"`
* dos2unix `find test -iname "*"`
* dos2unix `find tools -iname "*"`
|
|
v2: convert to lower case
|
|
Change-Id: I10dc4476c2851a54434a47406fff0840da0b9951
|
|
Change-Id: I97247b6472ff75ea83e12a485e06809ad2d2061c
|
|
Before this commit the SPIR-V/LLVM Translator was part of the LLVM tree.
The history has been rewritten before this commit, so everything not related to
SPIR-V was removed with git filter-branch. Some directories were moved around to
be in accordance with http://llvm.org/docs/Projects.html#source-tree-layout
Also adding CMakeLists.txt and LIT config files.
|
|
Add asserts for potential nullprt-s.
|
|
- Delete OpenCLVer parameter of oclIsBuiltin function. This parameter was used to detect CPP kernel language and was later replaced by isCPP parameter.
- Fixed detection of OpenCL 2.0+ in OCL20To12 module pass.
- Fixed warnings about defining unused variables and extra semicolon.
|
|
The produced file contains a header, proper include guards, includes to
necessary headers and put the code within the `SPIRV` namespace.
|
|
|
|
|
|
|
|
Previously, searching for `ExecutionMode` would match against `ExecutionModel`
as well, which is not the desired behaviour.
|
|
Add gen_spirv.bash script for generating code from spirv.h
|
|
|
|
set.
|
|
- Added SPIRVWriterPass.
- Switched from std::ostream to llvm::raw_ostream.
|
|
not in the translated builtin function name.
Fix generator enum name.
Fix mem leak when mangling opaque type names. Should not use new in StringSwitch Case since it is always executed even the case fails.
Bump up version to 2.
|
|
Add translation of SPIR 1.2/2.0 metadata to SPIR-V metadata
Fix OpExtension/OpSourceExtension to have one extension string instead of spaced separated multiple extension strings in each instruction.
Fix OpExecutionMode for ExecutionModeVectorTypeHint to use encoding instead of type id/string.
Fix bug about reading empty string in text format SPIR-V.
Allow llvm_spirv to use -o - for output to stdout.
Fix OpEntryPoint to add name of entry pointer function.
|
|
decoration.
Add prefix for return type for vload/vloada since function type can differ by only return type.
Set ouputing stack trace on error.
|
|
|
|
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.
|
|
Fix bug about OpMemoryBarrier word count.
Fix build failure on Ubuntu due to class member named as Op.
Refactoring translation of atomic builtin functions.
|
|
SPIR loader when lowering islessgreater for double16 type args.
|
|
|
|
to spirv r30819.
|
|
Now it's part of llvm release branch.
|
|
Added SPIR-V library with reader/writer from/to LLVM IR with spir name mangler library from
https://github.com/KhronosGroup/SPIR-Tools/tree/master/spir-tools/spir_name_mangler
rev. bebbc22f5125fde2243bfa4eedb615f663a96172.
|