diff options
| author | Yong He <yonghe@outlook.com> | 2023-02-16 16:44:04 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-16 16:44:04 -0800 |
| commit | 245466d89cfe54b78da486f06d470bc6daaf4625 (patch) | |
| tree | 522e0af1a9d2756182e143cdc85031ea1bbc2aa0 /source/slang/slang-ir-explicit-global-init.cpp | |
| parent | 4c4826d47eeef4675daae4ae53ff76f4d5ebd84a (diff) | |
Remove `SharedIRBuilder`. (#2657)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-explicit-global-init.cpp')
| -rw-r--r-- | source/slang/slang-ir-explicit-global-init.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/slang/slang-ir-explicit-global-init.cpp b/source/slang/slang-ir-explicit-global-init.cpp index 94c065514..a65118d5a 100644 --- a/source/slang/slang-ir-explicit-global-init.cpp +++ b/source/slang/slang-ir-explicit-global-init.cpp @@ -40,8 +40,6 @@ struct MoveGlobalVarInitializationToEntryPointsPass { IRModule* m_module; - SharedIRBuilder* m_sharedBuilder; - // In the Slang IR, a global variable represents a pointer // to the storage for the variable but it *also* encodes // the logic used to compute the initial value of that @@ -72,9 +70,6 @@ struct MoveGlobalVarInitializationToEntryPointsPass { m_module = module; - SharedIRBuilder sharedBuilder(module); - m_sharedBuilder = &sharedBuilder; - // We start by looking for global variables with // initialization logic in the IR, and processing // each to produce a split variable (now without @@ -120,7 +115,7 @@ struct MoveGlobalVarInitializationToEntryPointsPass void processGlobalVarWithInit(IRGlobalVar* globalVar, IRBlock* firstBlock) { - IRBuilder builder(m_sharedBuilder); + IRBuilder builder(m_module); builder.setInsertBefore(globalVar); // Becaue an `IRGlobalVar` reprsents a pointer to the storage @@ -174,7 +169,7 @@ struct MoveGlobalVarInitializationToEntryPointsPass // We are going to insert initiailization logic at the start // of the first block of the entry point. // - IRBuilder builder(m_sharedBuilder); + IRBuilder builder(m_module); builder.setInsertBefore(firstBlock->getFirstOrdinaryInst()); for( auto globalVarInfo : m_globalVarsWithInit ) |
