Commit graph

51 commits

Author SHA1 Message Date
Quentin Carbonneaux
a67ffa423c check for overflow in ssa.c (abi fuzzer) 2016-03-22 12:16:09 -04:00
Quentin Carbonneaux
240cfcd5cd support return of structs 2016-03-17 13:41:12 -04:00
Quentin Carbonneaux
165392ab63 leave only the most important free todos 2016-02-27 22:36:58 -05:00
Quentin Carbonneaux
6f808867f1 oops, fix wrong bitset allocation 2016-02-26 16:28:35 -05:00
Quentin Carbonneaux
744cf01321 convert ssa.c to bitsets 2016-02-26 12:51:43 -05:00
Quentin Carbonneaux
134cfc4541 re-add ssa construction 2016-02-04 12:58:51 -05:00
Ori Bernstein
1a677839aa index() conflicts with string.h on freebsd
rename it to avoid the conflict.
2016-01-03 15:07:48 -05:00
Quentin Carbonneaux
c8f0945672 update comment in ssa.c 2015-11-30 13:26:43 -05:00
Quentin Carbonneaux
119bf2c5b0 fill class information in filluse() 2015-11-30 12:54:16 -05:00
Quentin Carbonneaux
d6fb05a233 disable optimizations 2015-11-27 11:32:38 -05:00
Quentin Carbonneaux
bbaf4fd61b start memopt(), still buggy 2015-11-19 21:38:35 -05:00
Quentin Carbonneaux
c744281317 uniformize looping on instructions
I am actually not sure if "i-b->ins < b->nins" is the best way,
maybe the comparison with the last instruction is a little more
efficient...  At least it is uniform now.
2015-11-16 17:54:16 -05:00
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