DirectXShaderCompiler/lib/DXIL
Tex Riddell 77f146e932
Fix issues with resource array aliasing support (#3810)
SROA: Skip arrays of object/matrix as well.

Fix issues with ReplaceUseOfZeroInit*

  - Fix ReplaceUseOfZeroInitPostDom bailing on use of memcpy dest.
    When memcpy not in entry block, any use of dest after memcpy would abort
    replacement, as if it was unsafe to replace dest with src.  But uses
    of dest dominated by memcpy *are* safe to replace.
  - Fix ReplaceUseOfZeroInit* misuse of post-dom.
    Post-dom was used to detect whether it was safe to replace uses of dest
    before the memcpy with zero when dest was zeroinitialized.  But post-dom
    is not the right way to tell if this is safe.  It is unsafe if any uses
    *could* follow the memcpy.  So the new test is to gather a set of blocks
    that could be reachable from the successors of the memcpy block (where
    memcpy ends the block because we split it there).  If so, it is not safe
    to replace the use with zeroinitializer, and because it was not dominated
    by the memcpy either, it's not safe to replace dest with src here either,
    so memcpy replacement must abort.
  - Re-merge blocks after splitting in ReplaceUseOfZeroInitBeforeDef.
    Restore CFG after ReplaceUseOfZeroInitBeforeDef, rather than leaving it
    in more of a mess to be cleaned up much later.
    This has the side benefit of preserving more trivial entry-block
    replacement opportunities.

DFE should apply to internal functions in lib target as well.

  - Also, iterating over RemoveUnusedFunctions will allow removal of more
    functions only called by other internal functions being removed.

Add LowerStaticGlobalIntoAlloca before SROA for LowerMemcpy opportunities

  - Existing location after SROA must also be there for non-resource aggregates
  - Don't preserve zeroinitializer when moving static GV to alloca for objects
  - Minor opt in LowerStaticGlobalIntoAlloca: skip fn decls more cheaply
2021-06-02 14:55:28 -07:00
..
CMakeLists.txt Implement Shader Model 6.6 (#3293) 2020-12-02 21:10:44 -08:00
DxilCBuffer.cpp Move DxilModule into DXIL directory. (#1599) 2018-10-16 00:28:35 -07:00
DxilCompType.cpp Implement Shader Model 6.6 (#3293) 2020-12-02 21:10:44 -08:00
DxilCounters.cpp Allow variable offsets to gathers (#3764) 2021-05-11 17:04:58 -07:00
DxilInterpolationMode.cpp Move DxilModule into DXIL directory. (#1599) 2018-10-16 00:28:35 -07:00
DxilMetadataHelper.cpp Fold bitcast-to-base into GEP in MergeGepUse, plus refactor and resource fixes (#3801) 2021-05-26 20:17:50 -07:00
DxilModule.cpp Update legacy structs during compile (#3659) 2021-05-25 13:12:26 -07:00
DxilOperations.cpp Allow variable offsets to gathers (#3764) 2021-05-11 17:04:58 -07:00
DxilPDB.cpp Added an pdb writer overload that doesn't take any input blobs (#3715) 2021-04-28 15:13:17 -07:00
DxilResource.cpp Update BaseAlignLog2 field in ResourceProperties for StructuredBuffer (#3652) 2021-04-01 04:55:31 -07:00
DxilResourceBase.cpp Mutate resource to handle for shader model 6.6+. (#3374) 2021-01-21 17:16:06 -08:00
DxilResourceBinding.cpp Add getElementStride to DxilResourceProperties. (#3312) 2020-12-12 17:21:28 -08:00
DxilResourceProperties.cpp Update BaseAlignLog2 field in ResourceProperties for StructuredBuffer (#3652) 2021-04-01 04:55:31 -07:00
DxilSampler.cpp Move DxilModule into DXIL directory. (#1599) 2018-10-16 00:28:35 -07:00
DxilSemantic.cpp Revert "Report error for unsupported types of SV semantics (#3043)" (#3532) 2021-03-02 21:24:25 -08:00
DxilShaderFlags.cpp Fix Dxil validator compat and test issues (#3610) 2021-03-21 15:00:53 -07:00
DxilShaderModel.cpp Bump shader model to 6.7 (#3679) 2021-04-10 12:24:49 -07:00
DxilSignature.cpp Merged PR 116: Add support for HLSL Meshlets 2019-07-11 20:19:23 +00:00
DxilSignatureElement.cpp Implement Shader Model 6.6 (#3293) 2020-12-02 21:10:44 -08:00
DxilSubobject.cpp HLSL test infrastucture and other refactoring and helper classes (#2682) 2020-02-06 21:49:21 -08:00
DxilTypeSystem.cpp Fold bitcast-to-base into GEP in MergeGepUse, plus refactor and resource fixes (#3801) 2021-05-26 20:17:50 -07:00
DxilUtil.cpp Fix issues with resource array aliasing support (#3810) 2021-06-02 14:55:28 -07:00
LLVMBuild.txt Move DxilModule into DXIL directory. (#1599) 2018-10-16 00:28:35 -07:00