diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-05-17 13:39:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-17 10:39:01 -0700 |
| commit | 716e75b9ed1acfaee3dc7f3bc347ad17fca65e05 (patch) | |
| tree | 81552465bd34dc37293c4d82215d88f50d443d11 /tests | |
| parent | 90c123a177b6282e797ee4c90b17bee867876c1a (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 'tests')
| -rw-r--r-- | tests/experimental/liveness/liveness.slang.expected | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/tests/experimental/liveness/liveness.slang.expected b/tests/experimental/liveness/liveness.slang.expected index 77f14714e..7301d88bf 100644 --- a/tests/experimental/liveness/liveness.slang.expected +++ b/tests/experimental/liveness/liveness.slang.expected @@ -102,15 +102,9 @@ int someSlowFunc_0(int a_0) #line 27 livenessEnd_1(i_0, 0); -#line 27 - uint _S6 = v_0; - -#line 27 - livenessEnd_0(v_0, 0); - - return int(_S6); + return int(v_0); } @@ -126,16 +120,16 @@ struct SomeStruct_0 #line 17 SomeStruct_0 makeSomeStruct_0() { - const int _S7[100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + const int _S6[100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #line 19 - SomeStruct_0 s_0 = { 0, 0, _S7 }; + SomeStruct_0 s_0 = { 0, 0, _S6 }; return s_0; } #line 15 -layout(std430, binding = 1) buffer _S8 { +layout(std430, binding = 1) buffer _S7 { int _data[]; } anotherBuffer_0; @@ -155,7 +149,7 @@ int somethingElse_0(inout SomeStruct_0 s_2) #line 4 -layout(std430, binding = 0) buffer _S9 { +layout(std430, binding = 0) buffer _S8 { int _data[]; } outputBuffer_0; @@ -221,14 +215,14 @@ void main() livenessStart_2(t_0, 0); #line 57 - SomeStruct_0 _S10 = makeSomeStruct_0(); + SomeStruct_0 _S9 = makeSomeStruct_0(); #line 57 - t_0 = _S10; - const int _S11[100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + t_0 = _S9; + const int _S10[100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #line 58 - SomeStruct_0 u_0 = { 0, 0, _S11 }; + SomeStruct_0 u_0 = { 0, 0, _S10 }; #line 58 SomeStruct_0 u_1; @@ -258,7 +252,7 @@ void main() #line 68 x_1 = u_0; x_1.x_0 = ((anotherBuffer_0)._data[(uint(v_1 & 3))]) + 1; - SomeStruct_0 _S12 = x_1; + SomeStruct_0 _S11 = x_1; #line 70 livenessEnd_2(x_1, 0); @@ -267,7 +261,7 @@ void main() livenessStart_2(u_1, 0); #line 70 - u_1 = _S12; + u_1 = _S11; #line 70 } @@ -276,58 +270,58 @@ void main() s_3.c_0[index_0 & 7] = s_3.c_0[index_0 & 7] + 1; - int _S13 = s_3.x_0 + t_0.x_0; + int _S12 = s_3.x_0 + t_0.x_0; #line 76 - SomeStruct_0 _S14 = u_1; + SomeStruct_0 _S13 = u_1; #line 76 livenessEnd_2(u_1, 0); #line 76 - int _S15 = _S13 + _S14.x_0; + int _S14 = _S12 + _S13.x_0; #line 76 - int _S16 = doThing_0(t_0); + int _S15 = doThing_0(t_0); #line 76 - int _S17 = _S15 + _S16; + int _S16 = _S14 + _S15; #line 76 - int _S18 = somethingElse_0(t_0); + int _S17 = somethingElse_0(t_0); #line 76 livenessEnd_2(t_0, 0); #line 76 - int _S19 = _S17 + _S18; + int _S18 = _S16 + _S17; #line 76 - int _S20 = s_3.c_0[2]; + int _S19 = s_3.c_0[2]; #line 76 livenessEnd_2(s_3, 0); #line 76 - int _S21 = _S19 + _S20; + int _S20 = _S18 + _S19; #line 76 - int _S22 = res_0; + int _S21 = res_0; #line 76 livenessEnd_1(res_0, 0); #line 76 - int res_1 = _S22 + _S21; + int res_1 = _S21 + _S20; #line 52 - int _S23 = i_2; + int _S22 = i_2; #line 52 livenessEnd_1(i_2, 0); #line 52 - int i_3 = _S23 + 1; + int i_3 = _S22 + 1; #line 52 livenessStart_0(i_2, 0); @@ -348,13 +342,13 @@ void main() livenessEnd_1(i_2, 0); #line 52 - int _S24 = res_0; + int _S23 = res_0; #line 52 livenessEnd_1(res_0, 0); #line 79 - ((outputBuffer_0)._data[(uint(index_0))]) = _S24; + ((outputBuffer_0)._data[(uint(index_0))]) = _S23; return; } |
