summary refs log tree commit diff
path: root/ssa.c
AgeCommit message (Collapse)Author
2022-12-25new UNDEF RefQuentin Carbonneaux
Crashing loads of uninitialized memory proved to be a problem when implementing unions using qbe. This patch introduces a new UNDEF Ref to represent data that is known to be uninitialized. Optimization passes can make use of it to eliminate some code. In the last compilation stages, UNDEF is treated as the constant 0xdeaddead.
2022-11-22rename Tmp.ins to be more descriptiveQuentin Carbonneaux
2022-11-20fill definition site in filluse()Quentin Carbonneaux
2022-10-03fix case of Pool constantsQuentin Carbonneaux
2022-10-03refine width of parsb/ub/sh/uh opsQuentin Carbonneaux
2020-08-06Use a dynamic array for phi argumentsMichael Forney
2019-04-11properly detect ssa formQuentin Carbonneaux
Previously, we would skip ssa construction when a temporary has a single definition. This is only part of the ssa invariant: we must also check that all uses are dominated by the single definition. The new code does this. In fact, qbe does not store all the dominators for a block, so instead of walking the idom linked list we use a rough heuristic and declare conservatively that B0 dominates B1 when one of the two conditions is true: a. B0 is the start block b. B0 is B1 Some measurements on a big file from Michael Forney show that the code is still as fast as before this patch.
2019-03-01skip expensive ssa-building loop when possibleQuentin Carbonneaux
If a temporary is assigned exactly once (most are), there is no need to do any work to put it in ssa form. On an input file of ~35k loc, this makes the processing time go from 2.9 secs to 1.2 secs.
2018-04-26Fix compiler warnings.Emil Skoeldberg
Compiler warned about comparison between signed and unsigned values.
2017-05-16do not account for interferences in phi classesQuentin Carbonneaux
Before this commit, I tried to make sure that two interfering temporaries never ended up in the same phi class. This was to make sure that their register hints were not counterproductively stepping on each other's toes. The idea is fine, but: * the implementation is clumsy because it mixes the orthogonal concepts of (i) interference and (ii) phi classes; * the hinting process in the register allocator is hard to understand because the disjoint-set data structure used for phi classes is cut in arbitrary places. After this commit, the phi classes *really* are phi classes represented with a proper disjoint-set data structure.
2017-02-25do sign/zero extensions removal in copy.cQuentin Carbonneaux
2017-02-06use uint for block idsQuentin Carbonneaux
2017-01-12use a less obtuse api for vnew()Quentin Carbonneaux
2016-12-12create cfg.c for cfg-related functionsQuentin Carbonneaux
2016-08-15specify the allocation function in vnewQuentin Carbonneaux
2016-04-19check for trivial undefined uses in ssacheckQuentin Carbonneaux
2016-04-18factor some subtyping logic in clsmerge()Quentin Carbonneaux
2016-04-13handle odd jumps in blkdel() an renblk()Quentin Carbonneaux
2016-04-13do not compute def-use links for regsQuentin Carbonneaux
2016-04-13hack an ssa validator (likely buggy)Quentin Carbonneaux
2016-04-12fix bug in predecessors filling codeQuentin Carbonneaux
2016-04-12simplify fillpreds() codeQuentin Carbonneaux
2016-04-09add a proper block deletion routineQuentin Carbonneaux
2016-03-31cleanup error handlingQuentin Carbonneaux
2016-03-29new layout, put LICENSE in rootQuentin Carbonneaux