diff options
| author | Yong He <yonghe@outlook.com> | 2018-12-13 12:26:36 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-13 12:26:36 -0800 |
| commit | 970b58a209e06afc7bd104e4701abfbb055f7c4d (patch) | |
| tree | cf57d89d6292d2f471c286b1b1c8d62d6b68bf84 /source/slang/ir-constexpr.cpp | |
| parent | 8d13c06ab51f4993f5c56772e83fba3c384674df (diff) | |
| parent | 822ed708364b257b7d2f61ecb8a51a4c96f7edaa (diff) | |
Merge branch 'master' into dictfix
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 |
