Commit graph

39 commits

Author SHA1 Message Date
Quentin Carbonneaux
cde5a4871b fix a few bugs in filluse() 2015-11-13 15:21:53 -05:00
Quentin Carbonneaux
291c39565f store the use locations for temporaries 2015-11-13 13:12:22 -05:00
Quentin Carbonneaux
a3a1fc0c80 move usage computation in filluse() 2015-11-11 21:21:54 -05:00
Quentin Carbonneaux
4fdee5720a change debug formatting 2015-11-10 20:28:22 -05:00
Quentin Carbonneaux
2deff35ded add a few safeguards 2015-11-10 20:26:22 -05:00
Quentin Carbonneaux
9f1ecf974e fix some bugs, call ssa() in func() 2015-11-10 18:07:56 -05:00
Quentin Carbonneaux
351d0b4b61 now, cross fingers and test 2015-11-10 18:07:26 -05:00
Quentin Carbonneaux
8f91dfb44a do not insert dead phis 2015-11-09 22:19:07 -05:00
Quentin Carbonneaux
8ed8f1cd4c provide BZERO macro for bitsets 2015-11-09 21:34:59 -05:00
Quentin Carbonneaux
b5330f2a44 recognize locals in phiins() 2015-11-09 21:30:38 -05:00
Quentin Carbonneaux
c81ed54562 fix bug in frontier discovery 2015-11-09 17:00:57 -05:00
Quentin Carbonneaux
34b4e56ca4 start conventional ssa construction 2015-11-09 16:02:41 -05:00
Quentin Carbonneaux
7abf421ea2 make phi-class handling more local
The phi classes are no longer in a union-find
structure, instead each temporary argument of
a phi node gets a pointer to it.  The hinting
of the phi node is then shared with its the
one of its arguments.  When liveness proceeds
and finds out that two elements with same
hinting (a phi node and one of its arguments
or two arguments of the same phi node)
interfere, one of them has its phi pointer
reset, that way, the hinting won't be shared.
2015-10-31 23:39:52 -04:00
Quentin Carbonneaux
614130e431 remove liveness heuristic in fillphi() 2015-10-30 13:20:42 -04:00
Quentin Carbonneaux
72fc455978 add pool memory management 2015-10-06 22:51:51 -04:00
Quentin Carbonneaux
99ad19546d use new vector functions instead of reallocs 2015-10-06 20:42:54 -04:00
Quentin Carbonneaux
2273d22ced do not merge phi classes of interfering temps 2015-09-26 16:34:18 -04:00
Quentin Carbonneaux
f3bd48945e add union-find based phi-class computation 2015-09-25 13:02:44 -04:00
Quentin Carbonneaux
28110b1439 add a size to all operations (wip) 2015-09-15 23:01:32 -04:00
Quentin Carbonneaux
3b708f506f use loop frequency in ties of rpo 2015-09-15 23:01:32 -04:00
Quentin Carbonneaux
dcf07ba55c minor change in rpo walking 2015-09-15 23:01:30 -04:00
Quentin Carbonneaux
9456200d91 use a new Ref type for registers
This might not be a good idea, the problem was that
many spurious registers would be added to the Bits
data-structures during compilation (and would
always remain 0).  However, doing the above
modification de-uniformizes the handling of temps
and regs, this makes the code longer and not
really nicer.  Also, additional Bits structures
are required to track the registers independently.

Overall this might be a bad idea to revert.
2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
8d2d674466 start change of representation for registers 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
cf307002d9 start work on word/long handling 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
a280eb6597 export error functions 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
f3eb798d54 do not use _ in identifiers 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
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
5a21c7af52 patch jumps too in ssafix 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
9c958d75a3 update ssa module 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
529920d4f4 give blocks an id 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
d165818c66 remove useless parameter in top,bot def 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
8f5548f558 update ssafix, still buggy 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
cec786d530 first blood at ssa reconstruction 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
5f39a368ac free old rpo information before overwriting 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
11db0b61d9 properly clear predecessors in fillpreds 2015-09-15 23:01:27 -04:00
Quentin Carbonneaux
935ab611f0 add predecessor computation 2015-09-15 23:01:27 -04:00