Skip to content

Commit 4838618

Browse files
committed
wip: [DirectX] Refactor resources into binding and type passes
This is a big refactor of resources into two separate passes (#118400), which also happens to fix #116849. Unfortunately it's quite large and probably not practical to review. I plan on splitting this into three changes: 1. Rework resource type info to work by accessing the target ext type 2. Introduce the resource type analysis pass 3. Add and use the createSymbol API
1 parent a480d51 commit 4838618

19 files changed

+1282
-917
lines changed

llvm/include/llvm/Analysis/DXILResource.h

Lines changed: 365 additions & 190 deletions
Large diffs are not rendered by default.

llvm/include/llvm/InitializePasses.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ void initializeDAHPass(PassRegistry &);
8484
void initializeDCELegacyPassPass(PassRegistry &);
8585
void initializeDXILMetadataAnalysisWrapperPassPass(PassRegistry &);
8686
void initializeDXILMetadataAnalysisWrapperPrinterPass(PassRegistry &);
87-
void initializeDXILResourceWrapperPassPass(PassRegistry &);
87+
void initializeDXILResourceBindingWrapperPassPass(PassRegistry &);
88+
void initializeDXILResourceTypeWrapperPassPass(PassRegistry &);
8889
void initializeDeadMachineInstructionElimPass(PassRegistry &);
8990
void initializeDebugifyMachineModulePass(PassRegistry &);
9091
void initializeDependenceAnalysisWrapperPassPass(PassRegistry &);

llvm/include/llvm/LinkAllPasses.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ struct ForcePassLinking {
7070
(void)llvm::createCallGraphViewerPass();
7171
(void)llvm::createCFGSimplificationPass();
7272
(void)llvm::createStructurizeCFGPass();
73-
(void)llvm::createDXILResourceWrapperPassPass();
73+
(void)llvm::createDXILResourceBindingWrapperPassPass();
74+
(void)llvm::createDXILResourceTypeWrapperPassPass();
7475
(void)llvm::createDeadArgEliminationPass();
7576
(void)llvm::createDeadCodeEliminationPass();
7677
(void)llvm::createDependenceAnalysisWrapperPass();

llvm/lib/Analysis/Analysis.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ void llvm::initializeAnalysis(PassRegistry &Registry) {
2525
initializeCallGraphDOTPrinterPass(Registry);
2626
initializeCallGraphViewerPass(Registry);
2727
initializeCycleInfoWrapperPassPass(Registry);
28-
initializeDXILResourceWrapperPassPass(Registry);
28+
initializeDXILResourceBindingWrapperPassPass(Registry);
29+
initializeDXILResourceTypeWrapperPassPass(Registry);
2930
initializeDependenceAnalysisWrapperPassPass(Registry);
3031
initializeDominanceFrontierWrapperPassPass(Registry);
3132
initializeDomViewerWrapperPassPass(Registry);

0 commit comments

Comments
 (0)