summary refs log tree commit diff
AgeCommit message (Collapse)Author
2017-02-10tests for variable argument listsQuentin Carbonneaux
2017-02-10support variable argument listsQuentin Carbonneaux
This change is backward compatible, calls to "variadic" functions (like printf) must now be annotated (with ...).
2017-02-08make rsp and rbp globally liveQuentin Carbonneaux
2017-02-07update assert() missed in 7e1c1fQuentin Carbonneaux
2017-02-06fix edge deletion bug in sccpQuentin Carbonneaux
When an edge is deleted, the phis and predecessors of the destination block have to be updated. This is what blkdel() was doing, but at a level too coarse. The new function edgedel() allows to remove a single edge (and takes care of multiple edges).
2017-02-06robustness fix in fillfron()Quentin Carbonneaux
This makes it possible to call it several times in a row.
2017-02-06use uint for block idsQuentin Carbonneaux
2017-02-03create an index for the instructions in the IL docQuentin Rameau
2017-02-01fix the same bug in varget()Quentin Carbonneaux
2017-02-01fix bug in varadd(), thanks Ed DavisQuentin Carbonneaux
2017-01-20create an instruction index for the IL docQuentin Rameau
2017-01-20change 'b' and 'h' ordering in IL docQuentin Rameau
2017-01-12use a less obtuse api for vnew()Quentin Carbonneaux
2017-01-10isel fixes for lame apple assemblerQuentin Carbonneaux
2017-01-07remove styling from generated htmlQuentin Carbonneaux
2017-01-06prepare for new c9x infrastructureQuentin Carbonneaux
2017-01-04attempt to fix cc flags in testsQuentin Carbonneaux
2017-01-04improve performance of bsiter()Quentin Carbonneaux
2017-01-04more performance improvements in the parserQuentin Carbonneaux
2016-12-31use a perfect hash for lexingQuentin Carbonneaux
2016-12-31minor bugs in lexh toolQuentin Carbonneaux
2016-12-30new tool to improve lexing speedQuentin Carbonneaux
2016-12-29remove debugging stubQuentin Carbonneaux
2016-12-29do not create useless mem refsQuentin Carbonneaux
2016-12-29simplify seladdr()Quentin Carbonneaux
This also provides a violent fix to a bug causing an invalid addressing to be generated when indexing into a global variable. The fix is not satisfactory, though, as bad code is generated (instead of invalid code before).
2016-12-28fix escapes handling (patch from ac)Quentin Carbonneaux
2016-12-28loosen assertion in load eliminationQuentin Carbonneaux
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-21schedule loop nesting computations earlierQuentin Carbonneaux
2016-12-21fix wrong assertion in load eliminationQuentin Carbonneaux
The assertion fails incorrectly on a block right after the end of a loop.
2016-12-12use the new load optimizationQuentin Carbonneaux
2016-12-12new tests for the load optimizationQuentin Carbonneaux
2016-12-12implement a simple load elimination passQuentin Carbonneaux
2016-12-12implement a simple alias analysisQuentin Carbonneaux
2016-12-12create cfg.c for cfg-related functionsQuentin Carbonneaux
2016-12-12make newtmp() return zeroed out temporariesQuentin Carbonneaux
This was not necessary as temporaries were never freed and returned from an array zero initialized. But in the coming load optimization, we sometimes free temporaries by resetting fn->ntmp.
2016-12-12new eight queens testQuentin Carbonneaux
2016-12-08use a queue for copy eliminationQuentin Carbonneaux
2016-12-05move some liveness code where it belongsQuentin Carbonneaux
2016-12-05disable pie (default on some os)Quentin Carbonneaux
2016-11-09doc nitsQuentin Carbonneaux
2016-10-24return non-zero when tests failQuentin Carbonneaux
2016-10-24fix bug in folding of w comparisonsQuentin Carbonneaux
The casting to uint32_t made the code for comparing two signed words invalid. Interestingly, this can be fixed by casting to int32_t instead. Because sign extension is monotonic, all the unsigned comparisons remain valid. CVC4 can even check that for us: x, y : BITVECTOR(32); QUERY BVLT(SX(x, 64), SX(y, 64)) <=> BVLT(x, y); QUERY BVLE(SX(x, 64), SX(y, 64)) <=> BVLE(x, y); QUERY BVGT(SX(x, 64), SX(y, 64)) <=> BVGT(x, y); QUERY BVGE(SX(x, 64), SX(y, 64)) <=> BVGE(x, y);
2016-10-22fix bug in copy propagationQuentin Carbonneaux
The pass was not doing anything incorrect, but it missed some opportunities to optimize. On a copy heavy example I observed that, in the output of the pass a phi of the following shape remained: %a =w phi @A %c, @B %a Originally the phi for %a was: %a =w phi @A %b, @B %a Since %b was discovered a copy of %c, %a should have been eliminated and replaced with %c. I think the problem is that knowledge on the first argument of the phi %a changes as the algorithm progresses, a more detailed walk- through follows. In the first round of the algoritm, %a is discovered to be a copy of its first argument %b. phi(%b, %a) -> %b In the second round, %a is computed as the phi of %c (since the first argument changed) and %b (the result of the first iteration), in our lattice, the glb of those two is bottom. phi(%c, %b) -> %a (Bottom) Finally, there is a third round in which we compute %a as the phi of %a and %c, which again, gives bottom. phi(%c, %a) -> %a (Bottom) The bug is not tied to a phi of a copy, for example, if the first argument is speculated to be a copy of 0 and then, this knowledge is retracted; we will compute in sequence: phi(0, %a) -> 0 phi(%b, 0) -> %a (Bottom) phi(%b, %a) -> %a (Bottom) The way I fixed this is by ignoring arguments of the phi that were discovered to be copies of the phi node itself. This will make the last rounds above do the correct thing.
2016-10-19improve tests output for contbuildQuentin Carbonneaux
2016-10-19add magic for mobile viewing of docQuentin Carbonneaux
2016-09-27accept "ret" for functions with a return typeQuentin Carbonneaux
This happens to be needed for C. The standard mandates that a return value is used if the caller uses it. Surprisingly, if the return "value" is not used, the callee can use "return;". A better solution is to add an "undef" value and return it, "undef" would also have other use cases for compiling C.
2016-08-17silent a few warningsQuentin Carbonneaux
2016-08-16update help message of unit testerQuentin Carbonneaux
2016-08-16add support for unions in sysv abiQuentin Carbonneaux
2016-08-16parse union typesQuentin Carbonneaux