Skip to content

Commit 5ac624c

Browse files
authored
[DirectX] Flatten arrays (#114332)
- Relevant piece is `DXILFlattenArrays.cpp` - Loads and Store Instruction visits are just for finding GetElementPtrConstantExpr and splitting them. - Allocas needed to be replaced with flattened allocas. - Global arrays were similar to allocas. Only interesting piece here is around initializers. - Most of the work went into building correct GEP chains. The approach here was a recursive strategy via `recursivelyCollectGEPs`. - All intermediary GEPs get marked for deletion and only the leaf GEPs get updated with the new index. fixes [89646](#89646)
1 parent de6d48d commit 5ac624c

13 files changed

+861
-13
lines changed

llvm/lib/Target/DirectX/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ add_llvm_target(DirectXCodeGen
2222
DXContainerGlobals.cpp
2323
DXILDataScalarization.cpp
2424
DXILFinalizeLinkage.cpp
25+
DXILFlattenArrays.cpp
2526
DXILIntrinsicExpansion.cpp
2627
DXILOpBuilder.cpp
2728
DXILOpLowering.cpp

0 commit comments

Comments
 (0)