Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
Adam Yang 0c3cab299f
Fixed broken debug info for "out" and "inout" args. (#2914) 2020-05-26 13:32:26 -07:00
Adam Yang 9bf9701ca7
Separated dead block removal to its own pass. Fixed bug where dead resources are not removed (#2744) 2020-03-04 19:04:27 -08:00
Adam Yang 227c8e6f5a
Added instructions to preserve intermediate values of computations. (#2721) 2020-03-03 00:29:42 -08:00
Tex Riddell f4965b71dd Integrate dxcapi v2 and other changes from internal (#2575)
* Integrate changes from internal.

- dxcapi v2
- new dxc options
- DxilValueCache
- PDB and NoOpt improvements
- noop / llvm::donothing() support

* Update dxrfallbacklayer for dxcapi internal changes

* Reorder diag block based on whether pDiag is set first.

* llvm::donothing() requires dxil 1.6 / SM 6.6 for now, lib as well.

* Fixes for spir-v, non-VC compiler and non-Windows builds

- DEFINE_CROSS_PLATFORM_UUIDOF for new interfaces
- add SAL annotations
- turn output argument validation for -P into warning
- handle warnings without concatenating them to main output
- update spirv preprocessing and compilation paths
- return E_NOTIMPL from IDxcUtils::CreateReflection
- cleanup: DxcContainerBuilder back to uft8, DxcTestUtils: remove comment

* Fix some warnings from clang/gcc.

* Fix unicode conversion problems on linux, where sizeof(wchar_t) == 4

Note this is an intermediate fix.
On linux, what we are calling utf16 is actually a wide string
that's probably utf32.  This change fixes issues introduced by
the new interface changes so things are consistent and pass tests.

A future fix should correct the encodings so they are correctly labeled
on platforms where wchar_t doesn't mean UTF16.

* Return false for IsBufferNullTerminated when CP_ACP.

One test for Disassembler was crashing because it created a pinned blob
with a size of 1 << 31 + 1 without actual memory backing this.  The
IsBufferNullTerminated would attempt to see if this was null terminated,
causing AV.

This change also removes CP_UTF8 from this test when it was creating
binary blobs, not UTF8 text blobs.
2019-11-13 16:16:45 -08:00
Adam Yang e32833cac7
Loop count for all trivial form loops. Mem2Reg only when necessary. (#2250)
* Comments and small adjustments

* Deleting loops from scalar evolution correctly

* Better error/warning message
2019-06-07 18:40:43 -07:00
Tristan Labelle f89e3b7150
Add support for RWRawByteBuffer.Store<T> (#2176)
Adds support for templatized RWRawByteBuffer.Store<T>. To avoid SROA making us lose the original layout of any struct arguments, a new pass runs before SROA and breaks down such cases into per-element stores. So better be careful with the likes of buf.Store(0, (int[65536])0);...
2019-05-09 11:51:38 -07:00
Adam Yang 91f37618db
Turn stores to initializer for static variable where possible. (#2122) 2019-04-22 08:59:06 -07:00
Adam Yang 51c6cfb01c
Created custom unroll pass to optionally include certain exit blocks. (#1752) 2018-12-11 14:04:46 -08:00
Xiang Li 6c4b87efd9 Create pass for Lower static global into allocas. (#341) 2017-06-07 17:14:43 -07:00
Xiang Li 9edb1a553e Lower static global resource and local resource to handle. (#276)
1. Add ResourceToHandle pass to lower resource to handle.
2. Don't performPromotion in SROA_HLSL.
3. Add Option support for DynamicIndexingVectorToArray.
4. Fix bug in GetPassOption.
5. Replace GEP ptr, 0 with ptr in DynamicIndexingVectorToArray::ReplaceStaticIndexingOnVector.
6. Run mem2reg before DxilGenerationPass.
7.Legalize EvalOperations before change vector to array.
2017-05-05 18:31:35 -07:00
David Peixotto 0ba250e9dc Add pass to hoist constant arrays (#205)
This commit adds a new pass to hoist arrays from local to global scope
when the array only contains constant values. A local array will use
alloca and stores for initialization, but a global array uses a global
variable with a constant initializer.

The idea is that a global array with constant initializer will allow the
backend compilers to produce better code because it is much easier to see
that the array is fully constant.
2017-04-11 13:58:16 -07:00
David Peixotto f805233b49 Revert license text in banner comments to original llvm verbage (#33)
Fix #30: Revert license text in banner comments to original llvm verbage

This commit removes the Microsoft-specific copyright in llvm files
and reverts the copyright wording to the original llvm wording.

We used the following method to find the files to change:
1. Find all files in DirectXShaderCompiler that are also in llvm 3.7
2. For those files that have the Microsoft-specific copyright, revert
   it to the original llvm copyright as present in llvm 3.7
3. Revert the copyright in a few files that are not in llvm, but are
   mostly copies of files in llvm:
	lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
	lib\Transforms\Scalar\Reg2MemHLSL.cpp

Leave the Microsoft-specific copyright header in files not present
in stock llvm:

    include\dxc\*
    lib\HLSL\*
    lib\DxcSupport\*
    tools\clang\test\HLSL\*
    tools\clang\test\CodeGenHLSL\*
    tools\clang\unittests\HLSL\*
    tools\clang\unittests\HLSLHost\*
    tools\clang\tools\dxcompiler\*
    tools\clang\tools\dxa\*
    tools\clang\tools\dxc\*
    tools\clang\tools\dxopt\*
    tools\clang\tools\dxr\*
    tools\clang\tools\dxv\*
    tools\clang\tools\dotnetc\*
    utils\hct\*
    CONTRIBUTING.md
    COPYRIGHT
    LICENSE-MIT
    README.md
    cmake\modules\FindD3D12.cmake
    cmake\modules\FindDiaSDK.cmake
    cmake\modules\FindTAEF.cmake
    docs\DXIL.rst
    docs\HLSLChanges.rst
    docs\_themes\dxc-theme\layout.html
    docs\_themes\dxc-theme\theme.conf
    docs\_themes\dxc-theme\static\dxc-theme.css
    include\llvm\llvm_assert\assert.h
    include\llvm\llvm_assert\cassert
    include\llvm\Support\MSFileSystem.h
    include\llvm\Support\OacrIgnoreCond.h
    lib\MSSupport\CMakeLists.txt
    lib\MSSupport\MSFileSystemImpl.cpp
    lib\Support\assert.cpp
    lib\Support\MSFileSystemBasic.cpp
    lib\Support\Windows\MSFileSystem.inc.cpp
    lib\Transforms\Scalar\Reg2MemHLSL.cpp
    lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
    tools\clang\docs\UsingDxc.rst
    tools\clang\include\clang\AST\HlslTypes.h
    tools\clang\include\clang\Basic\BuiltinsDXIL.def
    tools\clang\include\clang\Basic\LangOptions.fixed.def
    tools\clang\include\clang\Parse\ParseHLSL.h
    tools\clang\include\clang\Sema\SemaHLSL.h
    tools\clang\lib\AST\ASTContextHLSL.cpp
    tools\clang\lib\AST\HlslTypes.cpp
    tools\clang\lib\CodeGen\CGHLSLMS.cpp
    tools\clang\lib\CodeGen\CGHLSLRuntime.cpp
    tools\clang\lib\CodeGen\CGHLSLRuntime.h
    tools\clang\lib\Frontend\Rewrite\FrontendActions_rewrite.cpp
    tools\clang\lib\Parse\HLSLRootSignature.cpp
    tools\clang\lib\Parse\HLSLRootSignature.h
    tools\clang\lib\Parse\ParseHLSL.cpp
    tools\clang\lib\Sema\gen_intrin_main_tables_15.h
    tools\clang\lib\Sema\SemaHLSL.cpp
    tools\clang\tools\d3dcomp\CMakeLists.txt
    tools\clang\tools\d3dcomp\d3dcomp.cpp
    tools\clang\tools\d3dcomp\d3dcomp.def
    tools\clang\tools\libclang\dxcisenseimpl.cpp
    tools\clang\tools\libclang\dxcisenseimpl.h
    tools\clang\tools\libclang\dxcrewriteunused.cpp
    tools\clang\tools\libclang\libclang.rc
    tools\dxexp\CMakeLists.txt
    tools\dxexp\dxexp.cpp
    tools\dxexp\LLVMBuild.txt
2017-01-24 17:54:00 -08:00
Marcelo Lopez Ruiz 6ee4074a4b first commit 2016-12-28 11:52:27 -08:00