Commit graph

14 commits

Author SHA1 Message Date
Michael Forney
9de57265ce Use a dynamic array for phi arguments 2020-08-06 09:51:12 +02:00
Michael Forney
f622efa05a Rearrange the fields in Ins so the bit-fields get packed together 2019-03-14 10:12:55 +01:00
Quentin Carbonneaux
fd65f4275b improve range-checking macros
They are now linear and can be
safely used with arguments that
have side-effects. This patch
also introduces an iscall()
macro and uses it to fix a
missing check for Ovacall in
liveness analysis.
2019-03-12 20:53:18 +01:00
Michael Forney
52392caecf fix in load elimination (vacall is a call) 2019-03-07 19:28:12 +01:00
Quentin Carbonneaux
f1c865f4bc more compiler warnings... 2018-04-26 22:59:30 +02:00
Quentin Carbonneaux
a3a1451c5f intern symbol names
Symbols in the source file are still limited in
length because the rest of the code assumes that
strings always fit in NString bytes.

Regardless, there is already a benefit because
comparing/copying symbol names does not require
using strcmp()/strcpy() anymore.
2017-05-17 10:05:28 -04:00
Quentin Carbonneaux
5165fcae76 wrong assumption killsl() 2017-02-24 11:07:24 -05:00
Quentin Carbonneaux
0699cd2e57 improve the range of action of load elimination
When eliminating `load %foo`, don't limit the
search to the live range of %foo, but to the
live range of its aliasing information.

For example, if %foo is a constant offset into
a stack-allocated slot,

    %foo =l add %slot, 42

the search will proceed on all the code in
which %slot is live, not only below the
definition of %foo, like before.
2017-02-24 10:31:50 -05:00
Quentin Carbonneaux
1bb7652484 deduplicate loadsz & storesz 2017-02-24 09:50:35 -05:00
Quentin Carbonneaux
7e1c1f9f77 use uint for block ids 2017-02-06 14:36:27 -05:00
Quentin Carbonneaux
2b4ece6f99 use a less obtuse api for vnew() 2017-01-12 22:31:51 -05:00
Quentin Carbonneaux
52cc53185e loosen assertion in load elimination
The assertion was invalid, I was assuming il->blk was
b when writing it.  The new assertion should be right:
If the loop level were to decrease we would get out of
a cycle in cfg, this should not be possible unless we
go through a block with more than 1 predecessor.
2016-12-28 06:43:05 -05:00
Quentin Carbonneaux
d04ba5eae8 fix wrong assertion in load elimination
The assertion fails incorrectly on a block right
after the end of a loop.
2016-12-21 09:54:50 -05:00
Quentin Carbonneaux
3f147ed2e0 implement a simple load elimination pass 2016-12-12 22:17:03 -05:00