mirror of
git://c9x.me/qbe.git
synced 2026-04-05 18:09:47 +00:00
- Many stylistic nits. - Removed blkmerge(). - Some minor bug fixes. - GCM reassoc is now "sink"; a pass that moves trivial ops in their target block with the same goal of reducing register pressure, but starting from instructions that benefit from having their inputs close.
20 lines
310 B
Plaintext
20 lines
310 B
Plaintext
export
|
|
function w $test(w %p1, w %p2) {
|
|
@start
|
|
@entry
|
|
%t1 =w copy 1
|
|
jnz %t1, @live, @dead1
|
|
@live
|
|
%t2 =w add %p1, %p2
|
|
ret %t2
|
|
@dead1
|
|
%t2 =w add %p1, %p2 # live ins in dead blk
|
|
@dead2
|
|
jnz %t1, @live, @dead1
|
|
}
|
|
|
|
# >>> driver
|
|
# extern int test(int p1, int p2);
|
|
# int main() { return test(1, 2) != 3; }
|
|
# <<<
|