From aa03cea0da38b2950e6f8694dc8b1405352eda66 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 5 May 2022 12:30:10 -0400 Subject: Output SPIR-V lifetimes (#2221) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP tracking liveness. * Skeleton around adding liveness instructions. * Calling into liveness tracking logic. Adds live start to var insts. * Liveness macros have initial output. * Looking at different initialization scenarios. * Some discussion around liveness. * WIP for working out liveness end. * WIP Updated liveness using use lists. * Is now adding liveness information * Some small fixes. * WIP around liveness. * Seems to output liveness correctly for current scenario. * Tidy up liveness code. * Update comment arounds liveness to current status. * Small fixes to liveness test. * Add support for call in liveness analysis. * Improve liveness example with array access. * Small updates to comments. * Disable liveness test because inconsistencies with output on CI system. * First pass support for GLSL SPIR-V liveness support. * Add the SPIRVOpDecoration. * Fix signature for OpLivenessStop. * Simplified by having a Kind type. * Fix some issues brought up in PR. * Rename liveness instructions. * Merge with var-lifetime. Small improvements. * Improvements to the documentation/naming in GLSL liveness pass. Add comment around possible improvements to the liveness pass. --- source/slang/slang-emit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/slang/slang-emit.cpp') diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 0f43762c1..1b94c588b 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -39,6 +39,7 @@ #include "slang-ir-validate.h" #include "slang-ir-wrap-structured-buffers.h" #include "slang-ir-liveness.h" +#include "slang-ir-glsl-liveness.h" #include "slang-legalize-types.h" #include "slang-lower-to-ir.h" @@ -762,6 +763,11 @@ Result linkAndOptimizeIR( addLivenessTrackingToModule(irModule); dumpIRIfEnabled(codeGenContext, irModule, "LIVENESS"); + + if (isKhronosTarget(targetRequest)) + { + applyGLSLLiveness(irModule); + } } // We include one final step to (optionally) dump the IR and validate -- cgit v1.2.3