summary refs log tree commit diff
AgeCommit message (Collapse)Author
2016-04-12fix type bug in abi3 testQuentin Carbonneaux
2016-04-12simplify fillpreds() codeQuentin Carbonneaux
2016-04-12diagnose some undefined usesQuentin Carbonneaux
2016-04-12oops, wrong test in abi classify()Quentin Carbonneaux
2016-04-11improve help message slightlyQuentin Carbonneaux
2016-04-09this can be falseQuentin Carbonneaux
I think I should check for Top when rewriting. Because for sure, we don't want to replace some temporary by Top, first, I can't represent it, and second, it'd mean that it is a temporary used undefined. The example that triggered the assertion was like that: @b0 jnz 1, @b1, @b3 @b1 %x =w phi @b0 10, @b2 %x1 jnz %x, @b2, @b3 @b2 %x1 =w sub %x, 1 jmp @b1 @b3 %x2 =w phi @b1 %x, @b0 42 So SCCP optimistically assumes %x is 10 when it goes through @b1, then at the branch, @b1->@b3 is left for dead. After that, @b2 is processed and the flow worklist is empty. Now uses are processed, %x2 will get processed regardless if its block is dead or not (it is at that time), then all the back-edges are dead so the phi is set to the lattice merge of tops only. BOOM! This leads to the question, should phis of dead blocks be processed? I'll check that later.
2016-04-09cosmetic fixes in llvm comparisonQuentin Carbonneaux
2016-04-09rebuild rpo after foldQuentin Carbonneaux
2016-04-09did I loose my c?Quentin Carbonneaux
2016-04-09enable constant foldingQuentin Carbonneaux
2016-04-09fix wrong assertion in foldQuentin Carbonneaux
2016-04-09oops, forgot to patch phi argumentsQuentin Carbonneaux
2016-04-09more debug tweaks in foldQuentin Carbonneaux
2016-04-09add a proper block deletion routineQuentin Carbonneaux
2016-04-09nicer debug infoQuentin Carbonneaux
2016-04-09quickly hack fold rewritingQuentin Carbonneaux
2016-04-08avoid gcc warning in emitQuentin Carbonneaux
2016-04-08simplify a buggy testQuentin Carbonneaux
I found it by compiling -O2 and seeing the ABI code fail. Further investigation revealed GCC trimmed away the last iteration of the loop because I was accessing the third element of an array of size two. This is undefined behavior, so GCC "proved" that the last iteration was never run.
2016-04-08prevent gcc warning in regaQuentin Carbonneaux
2016-04-08fix loop header detection bug in spillQuentin Carbonneaux
2016-04-08use union for punning in emitQuentin Carbonneaux
2016-04-07use cast in czero()Quentin Carbonneaux
2016-04-07inline latmerge() (cross fingers)Quentin Carbonneaux
2016-04-07adjustments in sccpQuentin Carbonneaux
2016-04-07add a canfold field to opdescQuentin Carbonneaux
2016-04-07add boring folding codeQuentin Carbonneaux
2016-04-06start work on constant propagationQuentin Carbonneaux
2016-04-05default to gnu gas formatQuentin Carbonneaux
2016-04-05use bsiter() for better performanceQuentin Carbonneaux
2016-04-05speedup bscount()Quentin Carbonneaux
2016-04-05yay, support freebsdQuentin Carbonneaux
2016-04-04fat il!Quentin Carbonneaux
2016-04-04reorder instructionsQuentin Carbonneaux
2016-04-04cosmetics in sysv abiQuentin Carbonneaux
A struct of size 0 is now marked as passed in memory. All the ABI code assumes structs passed in registers have size at least 8. This could have an impact on the alignment in the stack, but eh, I guess they are rare.
2016-04-04remove old selpar() codeQuentin Carbonneaux
2016-04-03fix alignment code in selpar()Quentin Carbonneaux
2016-04-03rewrite of selpar() for factoringQuentin Carbonneaux
2016-04-01typo in readmeQuentin Carbonneaux
2016-04-01don't try to keep use counts in abi()Quentin Carbonneaux
Abi lowering does not need use counts, but they are needed for instruction selection. I changed main to call filluse() between these two passes.
2016-04-01cheap massive performance gain on brainfuckQuentin Carbonneaux
2016-04-01tradeoff the type of bsiter()Quentin Carbonneaux
int is used all over the place for temporaries, maybe this should be changed, I don't know. Another thing to consider is that temporaries are currently on 12 bits (and will be on 29 or 30 bits in the future), so int will always be safe to store them. We just loose the free invariant of non-negativity.
2016-04-01use bsiter in critical loopQuentin Carbonneaux
2016-04-01add huge mandelbrot brainfuck exampleQuentin Carbonneaux
2016-04-01add big test file for qbeQuentin Carbonneaux
2016-03-31respect the order of the passesQuentin Carbonneaux
2016-03-31move abi code in a new fileQuentin Carbonneaux
2016-03-31cleanup error handlingQuentin Carbonneaux
2016-03-29do not echo compilation commands if verboseQuentin Carbonneaux
2016-03-29typos in il.txt, thanks Robert RansomQuentin Carbonneaux
2016-03-29get more entropy in callgen.mlQuentin Carbonneaux