Commit graph

38 commits

Author SHA1 Message Date
Quentin Carbonneaux
d8d17705c4 clean the commutativity + fix bug in emit
The commutativity information only makes sense for
arithmetic expressions.  To account for that, I introduced
a new tri-valued boolean type B3.  Memory operations, for
example, will receive an undefined commutativity trit.

The code emitter was buggy when rega emitted instructions
like 'rax = add 1, rax', this is now fixed using the
commutativity information (we rewrite it in 'rax = add
rax, 1').
2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
1a78659dfa cosmetics 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
390045cae1 compress parsref code a little 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
92be2fdd17 start improving constants support 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
5f14d7fd7c silence clang warning 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
854ecd4009 add crippled dce to the allocator 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
8899449c39 complete a crude register allocator 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
b6633a13bc finish spiller, now needs testing! 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
5bd9deac8d add more printing support 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
2981a267f4 add slot addressing and some more spilling 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
32cb8d315a define curi as a global too 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
a280eb6597 export error functions 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
e5a7482b54 rename mod to rem 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
77bdb3ae9e move main function out of parse.c 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
395891e95c fix phi handling in liveness 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
d7548fa5d7 add rpo test and some liveness code 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
6c5c11cb1d simplify block handling 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
7e53000a1f use argument array for all instructions 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
17e48f5221 change Ref to a struct 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
0cb8198493 fix some more parsing bugs 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
66c006eb6d fix some parsing bug of phi nodes 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
68c6feefbd add pretty printing function 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
a9b2d0338b change phi nodes representation 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
529920d4f4 give blocks an id 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
e4f07478ce fix naming 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
851e79f959 add rpo information to functions 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
935ab611f0 add predecessor computation 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
1d62b4bf47 fix multiple block definition check 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
ebe91da7fe cosmetics 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
653cc83c00 forward decls of enums are not allowed in iso c 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
15be4030ac factoring? in the lexer 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
a7f459b291 remove useless errstr 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
3765d2c33d rename branching cnd to jez 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
6d0ffe2291 fix comment 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
a40982bb2a add comments 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
7c92b5a0c4 trivial bugs 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
fc814c5873 attempt to complete the crappy parser 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
762330d6fa try writing a parser, painful 2015-09-15 23:01:27 -04:00