From 90c123a177b6282e797ee4c90b17bee867876c1a Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 17 May 2022 13:12:59 -0400 Subject: Liveness tracking with phis (#2233) * #include an absolute path didn't work - because paths were taken to always be relative. * Refactor Liveness pass, such that locations can be found independently of setting up ranges. * Refactor around different stages of liveness span analysis. * WIP Take into account PHI temporaries in liveness tracking. * WIP First pass of PHI liveness refactor. * Add BlockIndex. * WIP Refactor phi liveness around inst runs. * More improvements around liveness tracking. * Bug fixes. Special handling to not add multiple ends, at starts of blocks and after accesses. * Fix test output. * Use IRInsertLoc to track insertion point. * Liveness markers don't have side effects. * Fix typo in liveness test. * Small improvements around setting SuccessorResult. * Fix memory issue around reallocation and RAIIStackArray. Update test output. * Update test output for liveness.slang. * Fix typo in SuccessorResult blockIndex. * Small tidy up. * Handle the root start block, correctly scoping the run. * Split BlockInfo into 'Root' and 'Function'. Store successors as BlockIndices. * Tidy up around liveness tracking. * Add head/tail support to ArrayViews. Use Count where appropriate. Use head/tail in liveness impl. --- source/slang/slang-ir.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index f4add4efc..9de2f5b4f 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -5842,6 +5842,10 @@ namespace Slang case kIROp_Block: return false; + /// Liveness markers have no side effects + case kIROp_LiveRangeStart: + case kIROp_LiveRangeEnd: + case kIROp_Nop: case kIROp_undefined: case kIROp_DefaultConstruct: -- cgit v1.2.3