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

7 Коммитов

Автор SHA1 Сообщение Дата
Chris B 45eec33ad4
Backport -ftime-trace from upstream llvm & clang (#4873)
* Backport -ftime-trace from upstream llvm & clang

This change back-ports the -ftime-trace feature implemented by Aras
Pranckevičius (@aras-p) into DXC.

Aras has a great blog post describing the motivaiton for this feature
and how to use it (see:
https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-prof
iler-for-Clang/).

As shaders are getting more and more complex we need better timing data
for ourselves as compiler writers and our users as HLSL writers to know
how to improve compile times of complex shaders.

This implementation is a starting point to give us data to help drive
our efforts to improve compile-time performance.

Because DXC's LLVM is very far removed from the version of LLVM the
patch was originally written for this change is not strictly a
cherry-pick of
https://github.com/llvm/llvm-project/commit/d880de2d19d46f7cfea7aa593602
458440bc1e8d. Instead this change is a manually applied and
reconstructed patch with significant alterations along the way. The
alaterations are performed by myself, but credit for the patch remains
with @aras-p.

Patch by Aras Pranckevičius (@aras-p).
2022-12-14 10:15:28 -06:00
Xiang Li 4452103355
Change getPassName return type to StringRef. (#4247) 2022-02-10 14:14:43 -08:00
Helena Kotas 4391420da4
Integration from OS repo (#2541)
Includes OS PR #2130654: C++17 readiness: Enable /std:c++17 globally: Fixes for C2039 Errors
2019-10-22 15:43:26 -07:00
Tex Riddell 892765cc4b Default to stripping reflection from DXIL and fix a bunch of fallout.
Two test options, -Qstrip_reflect_from_dxil and -Qkeep_reflect_in_dxil
for making tests work with reflection removed, since many tests are relying
on main module disassembly-reassembly between test phases and reflection
metadata will no longer be present there.  The strip option is for the
few cases where tests don't want the reflection kept in DXIL by default.

Validator no longer requires function annotations for no reason.

Fix places where remove global hook was not being called when functions
were removed manually from the list.

StripReflection now deletes function annotations, unless targeting lib or
old validator that required them.  Preserve global constructor list and
add annotation for 1.4 validator.  The global hook fixes were required
here, otherwise annotations would refer to dead functions during linking.
Struct annotations may not be removed in library case when they still need
translation to legacy types.

Allow missing struct annotation when not necessary to upgrade the layout.

Preserve usage in reflection by upgrading the module, emitting metadata,
cloning for reflection, then restoring validator version and re-emit
metadata.

Fix size for 16-bit type for usage and reflected size.

Make various batch reflection tests require validator 1.5, since these
tests rely on module disassembly->assembly, which will not preserve extra
usage metadata for reflection in 1.4.

Include reflection part in IDxcAssembler, but don't strip from module,
since there are no options to prevent this from breaking a lot of tests.

Don't strip reflection from offline lib target.
2019-08-19 00:39:39 -07:00
Marcelo Lopez Ruiz d5bb3089cf Add support for custom allocators (#390)
Supporting a custom allocator for dxcompiler.
Adds recovery for exceptions and out-of-memory handling.
Add custom allocator support to linker.
Fix for release-only test failure.
Removes assertion about presence of command-line option registration
2017-07-06 16:45:48 -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