Commit graph

46 commits

Author SHA1 Message Date
Quentin Carbonneaux
ad5dae18f4 move dumpts() into util, add bsequal() 2016-02-26 11:38:57 -05:00
Quentin Carbonneaux
bfef767349 be future proof in usage message :) 2016-02-15 17:45:15 -05:00
Quentin Carbonneaux
16e430935d collect and emit fp constants 2016-02-15 16:34:16 -05:00
Quentin Carbonneaux
131e210b38 re-enable all optimizations 2016-02-04 14:01:07 -05:00
Quentin Carbonneaux
134cfc4541 re-add ssa construction 2016-02-04 12:58:51 -05:00
Quentin Carbonneaux
45b6017a61 finish emit lifting, seems ok now 2016-02-03 15:50:02 -05:00
Quentin Carbonneaux
8d1f2f9d2c compile rega 2016-01-29 10:07:19 -05:00
Quentin Carbonneaux
dcbcd651c5 enable new spilling pass 2016-01-05 15:03:00 -05:00
Quentin Carbonneaux
1dc0089684 wip on instruction selection 2015-12-08 13:39:30 -05:00
Quentin Carbonneaux
866b981a55 test liveness 2015-11-30 12:53:53 -05:00
Quentin Carbonneaux
af1a5079fd change the wide bit to a class number 2015-11-30 11:44:37 -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
0aa9e83211 add initial version of copy elimination 2015-11-13 15:22:58 -05:00
Quentin Carbonneaux
a3a1fc0c80 move usage computation in filluse() 2015-11-11 21:21:54 -05:00
Quentin Carbonneaux
9f1ecf974e fix some bugs, call ssa() in func() 2015-11-10 18:07:56 -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
27bcd5a3c6 fillphi() now comes before filllive() 2015-10-30 13:20:42 -04:00
Quentin Carbonneaux
d5afba7909 change end comment for functions 2015-10-08 23:03:24 -04:00
Quentin Carbonneaux
2642ff022c improve debug output 2015-10-08 22:05:30 -04:00
Quentin Carbonneaux
e53054c076 allow multiple functions in file 2015-10-08 22:02:32 -04:00
Quentin Carbonneaux
fb423f749c finish implementing data parsing 2015-10-07 22:26:13 -04:00
Quentin Carbonneaux
72fc455978 add pool memory management 2015-10-06 22:51:51 -04:00
Quentin Carbonneaux
a18e0ef50f clean the command line interface 2015-10-05 15:57:04 -04:00
Quentin Carbonneaux
f3bd48945e add union-find based phi-class computation 2015-09-25 13:02:44 -04:00
Quentin Carbonneaux
f7bfa2e435 heavy modification of call handling
The IR generated by calls was very bulky because two
instructions were used for marking the live range of
a clobber.

This patch attempts to store the information of what
registers are use/def/clobber in the call instruction
itself, this leads to more compact code (even more
when we'll have SSE registers).  However, I find that
the amount of extra code needed is not really
easonable.  Fortunately it is not too invasive, thus
if the complexity creeps in, it should be easy to
revert.
2015-09-15 23:01:33 -04:00
Quentin Carbonneaux
87ab8941ed start work on aggregate types
The parser now has some code to parse the description
of structured types.

I tried to be even less specific than LLVM "type" by
creating just enough abstraction so that I can deal
with both AARCH64 and x64.  The base types used in the
definition of an aggregate are really just syntactic sugar
to give a structure a size and an alignment.  Only the
location of float components matters for the compilation.
In particular this means that the front-ends have to know
how the ABI works to pass/return small integer types.
This also means that the font-end has to be aware of the
layout of structures.

Chris Lattner has a proposition [1] for LLVM that is still
pending and goes in the direction of giving more control
of the ABI the front-end.

[1]: http://www.nondot.org/sabre/LLVMNotes/ExtendedIntegerResults.txt
2015-09-15 23:01:32 -04:00
Quentin Carbonneaux
7beed9e6cf update emit to the new setting 2015-09-15 23:01:32 -04:00
Quentin Carbonneaux
7594f57a3e more modifications to rega 2015-09-15 23:01:32 -04:00
Quentin Carbonneaux
28110b1439 add a size to all operations (wip) 2015-09-15 23:01:32 -04:00
Quentin Carbonneaux
df358ad6d2 use correct sizes during reg allocation 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
bd0a00e555 perform isel before code emission 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
fd964388f7 add a code emitter for at&t syntax 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
36da4b30cc test isel 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
2a4fbbc6e0 move some debug output out of main 2015-09-15 23:01:29 -04:00
Quentin Carbonneaux
58c314eeaf cosmetics 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
5ad565e299 improve output, add debug array 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
6e8e6d3368 show more spilling data 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
a6168e6ed5 attempt more correct loop marking 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
4f9a5df76b more testing code 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
7f8a6d025c test code for the spiller 2015-09-15 23:01:28 -04:00
Quentin Carbonneaux
0f0ee0466e rework liveness to compute reg pressure 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