From 716e75b9ed1acfaee3dc7f3bc347ad17fca65e05 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 17 May 2022 13:39:01 -0400 Subject: Special handling around return and liveness (#2234) * #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. * Special handling if return is effectively a live variable. * Update test output for improved return handling. * Refactor how handling of return accesses. Fix issue around liveness starts. * Disable release warning for unused method. * Some small improvements around liveness pass. --- source/core/slang-array-view.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/core/slang-array-view.h') diff --git a/source/core/slang-array-view.h b/source/core/slang-array-view.h index f6ac92004..99609ef69 100644 --- a/source/core/slang-array-view.h +++ b/source/core/slang-array-view.h @@ -72,6 +72,11 @@ namespace Slang return -1; } + bool containsMemory(const ThisType& rhs) const + { + return rhs.getBuffer() >= getBuffer() && rhs.end() <= end(); + } + bool operator==(const ThisType& rhs) const { if (&rhs == this) -- cgit v1.2.3