Farzon Lotfi 5ac624c823
[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](https://github.com/llvm/llvm-project/issues/89646)
2024-11-13 16:36:24 -05:00

27 lines
978 B
LLVM

; RUN: llc -mtriple=dxil-pc-shadermodel6.3-library -debug-pass=Structure < %s -o /dev/null 2>&1 | \
; RUN: grep -v "Verify generated machine code" | FileCheck %s
; REQUIRES: asserts
; CHECK-LABEL: Pass Arguments:
; CHECK-NEXT: Target Library Information
; CHECK-NEXT: Target Transform Information
; CHECK-NEXT: ModulePass Manager
; CHECK-NEXT: DXIL Intrinsic Expansion
; CHECK-NEXT: DXIL Data Scalarization
; CHECK-NEXT: DXIL Array Flattener
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Scalarize vector operations
; CHECK-NEXT: DXIL Resource analysis
; CHECK-NEXT: DXIL Op Lowering
; CHECK-NEXT: DXIL Finalize Linkage
; CHECK-NEXT: DXIL resource Information
; CHECK-NEXT: DXIL Shader Flag Analysis
; CHECK-NEXT: DXIL Module Metadata analysis
; CHECK-NEXT: DXIL Translate Metadata
; CHECK-NEXT: DXIL Prepare Module
; CHECK-NEXT: DXIL Metadata Pretty Printer
; CHECK-NEXT: Print Module IR