summaryrefslogtreecommitdiffstats
path: root/source/core/slang-array-view.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2022-05-17 13:39:01 -0400
committerGitHub <noreply@github.com>2022-05-17 10:39:01 -0700
commit716e75b9ed1acfaee3dc7f3bc347ad17fca65e05 (patch)
tree81552465bd34dc37293c4d82215d88f50d443d11 /source/core/slang-array-view.h
parent90c123a177b6282e797ee4c90b17bee867876c1a (diff)
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.
Diffstat (limited to 'source/core/slang-array-view.h')
-rw-r--r--source/core/slang-array-view.h5
1 files changed, 5 insertions, 0 deletions
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)