-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a simple test case for licm from cmu letcure
- Loading branch information
1 parent
ac1ce55
commit 457ed01
Showing
6 changed files
with
213 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
compilers/rustyc/optimizer/tests/fixtures/ir_optimizer/licm/cmu_example_2/after.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function test_fun () -> void { | ||
block1: | ||
t1 = 10 | ||
t2 = 10 | ||
t3 = 10 | ||
jump 2 | ||
block2: | ||
jump 5 | ||
block3: | ||
phi t5, block3 t4, block2 t1 | ||
block4: | ||
ret void | ||
block5: | ||
t4 = add t2 t3 | ||
jump 3 | ||
} | ||
;; t1 -> i16 | ||
;; t2 -> i16 | ||
;; t3 -> i16 | ||
;; t4 -> i16 | ||
;; t5 -> i16 |
19 changes: 19 additions & 0 deletions
19
compilers/rustyc/optimizer/tests/fixtures/ir_optimizer/licm/cmu_example_2/before.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function test_fun () -> void { | ||
block1: | ||
t1 = 10 | ||
t2 = 10 | ||
t3 = 10 | ||
jump 2 | ||
block2: | ||
jump 3 | ||
block3: | ||
phi t5, block3 t4, block2 t1 | ||
t4 = add t2 t3 | ||
block4: | ||
ret void | ||
} | ||
;; t1 -> i16 | ||
;; t2 -> i16 | ||
;; t3 -> i16 | ||
;; t4 -> i16 | ||
;; t5 -> i16 |
9 changes: 9 additions & 0 deletions
9
compilers/rustyc/optimizer/tests/fixtures/ir_optimizer/licm/cmu_example_2/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|---------------| | ||
| Loop 1 | | ||
|---------------| | ||
| Header | BB 3 | | ||
| Tail | BB 3 | | ||
|---------------| | ||
| Blocks | BB 3 | | ||
|---------------| | ||
|---------------| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters