diff options
| author | Yong He <yonghe@outlook.com> | 2021-04-16 10:34:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-16 10:34:26 -0700 |
| commit | 79e92395f8ce3d92c446e3bb3250d19ce33decd5 (patch) | |
| tree | 2ac277fa299200da72cf03a2b5b96338f66aee5d /source/slang/slang-ir-dce.cpp | |
| parent | bad484d838590d0a2aaf1b5b8ac820634af2decb (diff) | |
Update `model-viewer` example and fixing compiler bugs. (#1795)
Diffstat (limited to 'source/slang/slang-ir-dce.cpp')
| -rw-r--r-- | source/slang/slang-ir-dce.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-ir-dce.cpp b/source/slang/slang-ir-dce.cpp index db01929a2..285e5100c 100644 --- a/source/slang/slang-ir-dce.cpp +++ b/source/slang/slang-ir-dce.cpp @@ -120,6 +120,15 @@ struct DeadCodeEliminationContext UInt operandCount = inst->getOperandCount(); for( UInt ii = 0; ii < operandCount; ++ii ) { + switch (inst->getOp()) + { + case kIROp_BoundInterfaceType: + if (inst->getOperand(ii)->getOp() == kIROp_WitnessTable) + continue; + break; + default: + break; + } markInstAsLive(inst->getOperand(ii)); } |
