diff options
Diffstat (limited to 'source/slang/ir-constexpr.cpp')
| -rw-r--r-- | source/slang/ir-constexpr.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/slang/ir-constexpr.cpp b/source/slang/ir-constexpr.cpp index 1f80bc010..684958ffe 100644 --- a/source/slang/ir-constexpr.cpp +++ b/source/slang/ir-constexpr.cpp @@ -16,8 +16,8 @@ struct PropagateConstExprContext SharedIRBuilder sharedBuilder; IRBuilder builder; - List<IRGlobalValue*> workList; - HashSet<IRGlobalValue*> onWorkList; + List<IRInst*> workList; + HashSet<IRInst*> onWorkList; IRBuilder* getBuilder() { return &builder; } @@ -158,7 +158,7 @@ bool propagateConstExprForward( void maybeAddToWorkList( PropagateConstExprContext* context, - IRGlobalValue* gv) + IRInst* gv) { if( !context->onWorkList.Contains(gv) ) { @@ -484,10 +484,7 @@ void propagateConstExpr( for( auto ii : module->getGlobalInsts() ) { - auto gv = as<IRGlobalValue>(ii); - if (!gv) - continue; - maybeAddToWorkList(&context, gv); + maybeAddToWorkList(&context, ii); } // We will iterate applying propagation to one global value at a time |
