diff options
Diffstat (limited to 'source/slang/slang-ir-dce.cpp')
| -rw-r--r-- | source/slang/slang-ir-dce.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-ir-dce.cpp b/source/slang/slang-ir-dce.cpp index 4359e7e92..7c1cda75f 100644 --- a/source/slang/slang-ir-dce.cpp +++ b/source/slang/slang-ir-dce.cpp @@ -256,6 +256,11 @@ struct DeadCodeEliminationContext } } + if (options.keepLayoutsAlive && inst->findDecoration<IRLayoutDecoration>()) + { + return true; + } + // A basic block is an interesting case. Knowing that a function // is live means that its entry block is live, but the liveness // of any other blocks is determined by whether they are referenced |
