summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-constexpr.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-02-16 16:44:04 -0800
committerGitHub <noreply@github.com>2023-02-16 16:44:04 -0800
commit245466d89cfe54b78da486f06d470bc6daaf4625 (patch)
tree522e0af1a9d2756182e143cdc85031ea1bbc2aa0 /source/slang/slang-ir-constexpr.cpp
parent4c4826d47eeef4675daae4ae53ff76f4d5ebd84a (diff)
Remove `SharedIRBuilder`. (#2657)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-constexpr.cpp')
-rw-r--r--source/slang/slang-ir-constexpr.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/slang/slang-ir-constexpr.cpp b/source/slang/slang-ir-constexpr.cpp
index 2bbb9618c..c1f14fe24 100644
--- a/source/slang/slang-ir-constexpr.cpp
+++ b/source/slang/slang-ir-constexpr.cpp
@@ -13,7 +13,6 @@ struct PropagateConstExprContext
DiagnosticSink* sink;
- SharedIRBuilder sharedBuilder;
IRBuilder builder;
List<IRInst*> workList;
@@ -21,7 +20,7 @@ struct PropagateConstExprContext
IRBuilder* getBuilder() { return &builder; }
- Session* getSession() { return sharedBuilder.getSession(); }
+ Session* getSession() { return module->getSession(); }
DiagnosticSink* getSink() { return sink; }
};
@@ -278,9 +277,7 @@ bool propagateConstExprBackward(
PropagateConstExprContext* context,
IRGlobalValueWithCode* code)
{
- SharedIRBuilder sharedBuilder(context->getModule());
-
- IRBuilder builder(sharedBuilder);
+ IRBuilder builder(context->getModule());
builder.setInsertInto(code);
bool anyChanges = false;
@@ -503,8 +500,7 @@ void propagateConstExpr(
PropagateConstExprContext context;
context.module = module;
context.sink = sink;
- context.sharedBuilder.init(module);
- context.builder.init(context.sharedBuilder);
+ context.builder = IRBuilder(module);
// We need to propagate information both forward and backward.
//