aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2020-11-22symaddr: give a type to OP_SYMADDRLuc Van Oostenryck1-4/+4
2020-11-22Merge branch 'cleanup' into nextLuc Van Oostenryck3-21/+8
2020-11-22Merge branch 'optim-cgoto' into nextLuc Van Oostenryck12-6/+159
2020-11-22not: simplify ((x cmp y) {&,|,^} (x !cmp y)) --> {0,1,1}Luc Van Oostenryck2-4/+21
2020-11-22not: simplify (~x {&,|,^} x) --> {0,~0,~0}Luc Van Oostenryck2-4/+63
2020-11-22opcode: add helpers opcode_negate() & opcode_swap()Luc Van Oostenryck1-0/+10
2020-11-22canon: simplify calculation of canonical orderLuc Van Oostenryck2-15/+29
2020-11-22canon: put PSEUDO_REGs in canonical order tooLuc Van Oostenryck2-1/+3
2020-11-22canon: put PSEUDO_ARGs in canonical order tooLuc Van Oostenryck4-12/+14
2020-11-22not: add testcases for canonicalization & simplification of negationsLuc Van Oostenryck6-0/+73
2020-11-21add a new instruction for label-as-valueLuc Van Oostenryck10-17/+63
2020-11-21simplify CGOTO(SEL(x, L1, L2)) into CBR x, L1, L2Luc Van Oostenryck2-1/+22
2020-11-21simplify OP_COMPUTEDGOTO with unique and known targetLuc Van Oostenryck2-1/+30
2020-11-21simplify kill_insn() of unops and unop-ish instructionsLuc Van Oostenryck1-13/+5
2020-11-21remove unneeded REPEAT_SYMBOL_CLEANUPLuc Van Oostenryck3-8/+3
2020-11-21fix kill_insn(OP_SETVAL)Luc Van Oostenryck1-1/+1
2020-11-21add testcases for COMPUTEDGOTO simplificationLuc Van Oostenryck3-0/+57
2020-11-19Merge branches 'cleanup-postop' and 'cleanup-linearize'Luc Van Oostenryck2-6/+1
2020-11-19Merge branch 'diamond'Luc Van Oostenryck2-2/+114
2020-11-19simplify unrestricted postopLuc Van Oostenryck1-2/+1
2020-11-19Merge branch 'unqual'Luc Van Oostenryck5-2/+77
2020-11-18unqual: statement expressions should drop qualifiersLuc Van Oostenryck2-2/+1
2020-11-18unqual: comma expressions should drop qualifiersLuc Van Oostenryck2-2/+1
2020-11-18unqual: unqualify_type() should check for null ctypesLuc Van Oostenryck1-0/+2
2020-11-18unqual: add testcasesLuc Van Oostenryck4-0/+75
2020-11-18casts should drop qualifiersLuc Van Oostenryck2-0/+27
2020-11-17linearize: remove unneeded forward declarationsLuc Van Oostenryck1-4/+0
2020-11-17Merge branch 'pack-early'Luc Van Oostenryck18-39/+269
2020-11-17simplify CBR-CBR on the same conditionLuc Van Oostenryck1-0/+106
2020-11-17rebuild dominance tree during CFG cleanupLuc Van Oostenryck1-2/+8
2020-11-17cfg: early CFG simplificationLuc Van Oostenryck12-11/+102
2020-11-17cfg: call simplify_memops() unconditionally.Luc Van Oostenryck4-3/+40
2020-11-17cfg: add missing REPEAT_CFG_CLEANUPLuc Van Oostenryck2-1/+2
2020-11-17cfg: remove phi-nodes when merging BBsLuc Van Oostenryck1-0/+23
2020-11-17cfg: remove phi-sources when merging BBsLuc Van Oostenryck2-1/+42
2020-11-15cfg: extract merge_bb() from pack_basic_blocks()Luc Van Oostenryck1-23/+35
2020-11-15cfg: add testcase for phi-adjusting during BB mergeLuc Van Oostenryck1-0/+24
2020-11-15testcase: avoid UNDEFLuc Van Oostenryck1-2/+3
2020-11-14doc: add header for flow simplification related documentationLuc Van Oostenryck2-3/+5
2020-11-16doc: add header for optimization related documentationLuc Van Oostenryck2-2/+7
2020-11-16doc: add some doc to flowgraph.hLuc Van Oostenryck2-0/+21
2020-11-16doc: fix extracted autodoc when short description ends with a ?Luc Van Oostenryck1-2/+3
2020-11-16doc: add some doc about using NULL or VOID in ptrlistsLuc Van Oostenryck1-0/+12
2020-11-16doc: Sphinx's option ':noindex:' have been renamed into ':noindexentry:'Luc Van Oostenryck1-1/+1
2020-11-12linearize: fix a couple of 'selfcheck' warningsRamsay Jones1-0/+2
2020-11-11Merge branch 'debug'Luc Van Oostenryck3-3/+20
2020-11-09Merge branch 'optim-cmp' into nextLuc Van Oostenryck20-237/+582
2020-11-09Merge branch 'optim-sel' into nextLuc Van Oostenryck9-21/+122
2020-11-09fix linear_isdigit()'s itypeLuc Van Oostenryck1-0/+1
2020-11-08select: simplify select(x, x, 0) --> xLuc Van Oostenryck3-9/+5
2020-11-08select: simplify handling of select(x, 0, x) --> 0Luc Van Oostenryck2-5/+11
2020-11-08cmp: simplify compares and sign/zero extendLuc Van Oostenryck3-12/+42
2020-11-08cmp: simplify zext(x) cmpu CLuc Van Oostenryck2-1/+4
2020-11-08cmp: simplify zext(x) cmps CLuc Van Oostenryck2-1/+14
2020-11-08cmp: canonicalize sext(x) cmpu C (with C >= SMAX)Luc Van Oostenryck2-1/+12
2020-11-08cmp: simplify sext(x) cmps {SMAX,SMIN}Luc Van Oostenryck2-1/+14
2020-11-08cmp: simplify zext(x) cmp C --> x cmp CLuc Van Oostenryck4-3/+11
2020-11-08cmp: simplify sext(x) cmp C --> x cmp CLuc Van Oostenryck2-1/+24
2020-11-08cmp: canonicalize unsigned (x {<=,>} SMAX)Luc Van Oostenryck2-1/+4
2020-11-08cmp: canonicalize unsigned compare with UMAX or UMAX-1Luc Van Oostenryck2-1/+8
2020-11-08cmp: simplify unsigned (x {<=,>} UMAX) into {1,0}Luc Van Oostenryck2-1/+5
2020-11-08cmp: canonicalize unsigned (x {<,>=} C) --> (x {<=,>} C-1)Luc Van Oostenryck2-2/+7
2020-11-08cmp: use a few helpers for the simplification of comparesLuc Van Oostenryck1-20/+32
2020-11-08cmp: move some code in a separate function: simplify_compare_constant()Luc Van Oostenryck1-31/+43
2020-11-08cmp: add signed/unsigned to opcode tableLuc Van Oostenryck3-85/+90
2020-11-07simplify SEL(x == y, x, y) and friendsLuc Van Oostenryck2-0/+24
2020-11-07select: simplify handling of constant cond or src1 == src2Luc Van Oostenryck1-8/+6
2020-11-07select: simplify SEL(SEL(x, C1, C2), y, z) --> y (with C1, C2 != 0)Luc Van Oostenryck2-1/+3
2020-11-07select: simplify SEL(SEL(x, C, 0), C, 0) --> SEL(x, C, 0) == condLuc Van Oostenryck1-0/+3
2020-11-07select: simplify SEL(SEL(x, C, 0), y, z) --> SEL(x, y, z) and its dualLuc Van Oostenryck3-2/+20
2020-11-07select: add some testcases for select simplificationLuc Van Oostenryck5-0/+54
2020-11-05cmp: add testcases for the simplification of comparesLuc Van Oostenryck15-0/+293
2020-11-02cmp: adapt testcase for compares' canonicalizationLuc Van Oostenryck1-111/+14
2020-11-01Merge branch 'typed-cmp'Luc Van Oostenryck7-5/+75
2020-11-01linearize __builtin_isdigit()Luc Van Oostenryck4-0/+65
2020-11-01fix usage count in linearize_fma()Luc Van Oostenryck2-4/+4
2020-11-01fix init_linearized_builtins()Luc Van Oostenryck1-1/+1
2020-11-01testsuite: add a new tag: check-output-returnsLuc Van Oostenryck3-0/+33
2020-11-01testsuite: add a new tag: check-output-matchLuc Van Oostenryck3-0/+47
2020-11-01do not call simplify_instruction() if already removedLuc Van Oostenryck2-3/+2
2020-11-07add debug helpers: show_insn_bb() & show_insn_entry()Luc Van Oostenryck1-0/+18
2020-11-01eval_insn: give an explicit type to compare's operandsLuc Van Oostenryck6-7/+30
2020-11-01eval_insn: add testcases for incorrect type in OP_SET_*Luc Van Oostenryck3-0/+47
2020-10-27Merge branch 'one_use'Luc Van Oostenryck2-11/+11
2020-10-27replace nbr_users() & multi_users() by one_use()Luc Van Oostenryck2-11/+11
2020-10-27Merge branches 'cleanup-linearize', 'inline-use', 'inline-def', 'pure-call', ...Luc Van Oostenryck10-70/+71
2020-10-26handle more graciously labels with no statementLuc Van Oostenryck1-0/+5
2020-10-25fix testing if a OP_CALL's function is pureLuc Van Oostenryck1-3/+3
2020-10-25add helper first_symbol()Luc Van Oostenryck1-0/+5
2020-10-25kill dead instructions before any other simplificationsLuc Van Oostenryck1-46/+5
2020-10-25OP_CALL should use the full function typeLuc Van Oostenryck1-2/+0
2020-10-25linearize: OP_INLINE should not use the function symbolLuc Van Oostenryck1-1/+1
2020-10-24Merge branches 'optim-setuimm' and 'optim-unop' into nextLuc Van Oostenryck9-5/+163
2020-10-24Merge branch 'fix-llvm-11' into nextLuc Van Oostenryck1-46/+29
2020-10-24unop: simplify ~(-x) --> x - 1Luc Van Oostenryck2-1/+4
2020-10-24unop: simplify ~(x ^ C) --> x ^ ~CLuc Van Oostenryck2-1/+6
2020-10-24unop: simplify ~(C - x) --> x + ~CLuc Van Oostenryck2-1/+6
2020-10-24unop: simplify ~(x + C) --> ~C - xLuc Van Oostenryck2-1/+7
2020-10-24unop: simplify -(~x) --> x + 1Luc Van Oostenryck2-1/+4
2020-10-24unop: simplify -(x - y) --> y - xLuc Van Oostenryck2-1/+4
2020-10-24unop: simplify -(x + C) --> -C - xLuc Van Oostenryck2-1/+7
2020-10-24unop: prepare simplify_unop() to handle more casesLuc Van Oostenryck1-5/+10
2020-10-23canonicalize unsigned compares against 0 or 1Luc Van Oostenryck2-1/+25
2020-10-23simplify unsigned compares against 0Luc Van Oostenryck2-0/+20
2020-10-23cleanup linearize_cond_branch()Luc Van Oostenryck1-12/+5
2020-10-23unop: add testcases for unop simplificationsLuc Van Oostenryck7-0/+78
2020-10-23llvm: fix crash with llvm-11 / use real phi-nodesLuc Van Oostenryck1-46/+29
2020-10-22warn on all missing parameter typesLuc Van Oostenryck6-6/+22
2020-10-22add testcase for missing inline definitionLuc Van Oostenryck1-0/+30
2020-10-22memops need long offsetsLuc Van Oostenryck2-4/+4
2020-10-22Merge branch 'optim-base' into nextLuc Van Oostenryck18-64/+397
2020-10-21optim: fix some testcases related to bitfield manipulationLuc Van Oostenryck2-5/+8
2020-10-20Merge branch 'bf-sign' into nextLuc Van Oostenryck10-22/+60
2020-10-20sub: simplify x + (y - x) --> yLuc Van Oostenryck2-1/+4
2020-10-20sub: simplify (x - y) + y --> xLuc Van Oostenryck2-1/+5
2020-10-20sub: simplify x - (y + x) --> -yLuc Van Oostenryck2-1/+2
2020-10-20sub: simplify x - (x + y) --> -yLuc Van Oostenryck2-1/+4
2020-10-20sub: simplify (x + y) - y --> xLuc Van Oostenryck2-1/+2
2020-10-20sub: simplify (x + y) - x --> yLuc Van Oostenryck2-1/+8
2020-10-20add: simplify (-x + y) --> (y - x)Luc Van Oostenryck2-1/+8
2020-10-20add: simplify (x + -y) --> (x - y)Luc Van Oostenryck2-2/+15
2020-10-20sub: simplify (x - -y) --> (x + y)Luc Van Oostenryck2-2/+15
2020-10-20sub: simplify (C - y) + D --> eval(C+D) - yLuc Van Oostenryck2-1/+20
2020-10-20sub: simplify C - (D - z) --> z + eval(C-D)Luc Van Oostenryck2-1/+8
2020-10-20sub: simplify C - (y + D) --> eval(C-D) - yLuc Van Oostenryck2-1/+18
2020-10-20sub: canonicalize (0 - x) into -xLuc Van Oostenryck2-1/+4
2020-10-20sub: reorganize handling of OP_{ADD,SUB}s with constant rightsideLuc Van Oostenryck1-9/+11
2020-10-20reassoc: simplify (x # C) # K --> x # eval(C # K)Luc Van Oostenryck2-1/+5
2020-10-20constants must be truncated to the operation's sizeLuc Van Oostenryck2-2/+1
2020-10-20add a flag to identify commutative & associative opsLuc Van Oostenryck3-48/+76
2020-10-20unop: add helper replace_with_unop()Luc Van Oostenryck1-0/+14
2020-10-20unop: add helper eval_unop()Luc Van Oostenryck1-0/+12
2020-10-20extract eval_op() from eval_insn()Luc Van Oostenryck1-5/+9
2020-10-20let switch_pseudo() return REPEAT_CSELuc Van Oostenryck1-1/+2
2020-10-20add testcases about OP_ADD & OP_SUB simplificationsLuc Van Oostenryck15-0/+171
2020-10-19Merge branch 'builtin-atomic' into nextLuc Van Oostenryck6-32/+136
2020-10-19builtin: add support for remaining atomic builtinsLuc Van Oostenryck1-0/+5
2020-10-19builtin: add support for __atomic_clear()Luc Van Oostenryck2-0/+16
2020-10-19builtin: add builtin type: [volatile] pointer to boolLuc Van Oostenryck2-0/+4
2020-10-19builtin: add support for others generic atomic builtinsLuc Van Oostenryck1-0/+10
2020-10-19builtin: add support for __atomic_add_fetch(), ...Luc Van Oostenryck1-0/+12
2020-10-19builtin: add predefines for __ATOMIC_RELAXED & friendsLuc Van Oostenryck1-0/+7
2020-10-19builtin: __sync_synchronize() too is variadicLuc Van Oostenryck1-1/+1
2020-10-19builtin: fix evaluation of __sync_lock_releaseLuc Van Oostenryck1-1/+1
2020-10-19builtin: evaluate __sync_*_fetch*()Luc Van Oostenryck2-13/+37
2020-10-19builtin: make eval_sync_compare_and_swap() more genericLuc Van Oostenryck1-17/+32
2020-10-19Merge branch 'warn-address-builtin' into nextLuc Van Oostenryck2-10/+19
2020-10-18Sparse v0.6.3v0.6.3Luc Van Oostenryck2-3/+4
2020-10-16fix null pointer deref on return expression with invalid typeLuc Van Oostenryck2-1/+10
2020-10-16warn when taking the address of a built-in functionLuc Van Oostenryck2-10/+19
2020-10-16testsuite: fix location of error messagesLuc Van Oostenryck1-3/+3
2020-10-14update TODO listLuc Van Oostenryck1-8/+21
2020-10-14flex-array: fix typo in warning messageLuc Van Oostenryck2-3/+3
2020-10-14builtin: add builtin type for volatile void *Luc Van Oostenryck2-0/+4
2020-10-14builtin: add generic .args methodLuc Van Oostenryck1-0/+7
2020-10-12Sparse v0.6.3-rc1v0.6.3-rc1Luc Van Oostenryck2-1/+2
2020-10-12doc: add release notes for incoming v0.6.3Luc Van Oostenryck1-4/+54
2020-10-11Merge branch 'more-builtin' (early part)Luc Van Oostenryck1-0/+8
2020-10-09builtin: teach sparse about __builtin_ia32_pause()Luc Van Oostenryck1-0/+8
2020-10-09flex-array: fix location for nesting of flexible membersLuc Van Oostenryck2-3/+3
2020-10-09Merge branch 'misc'Luc Van Oostenryck5-9/+5
2020-10-09Merge branch 'usual-conv'Luc Van Oostenryck3-32/+47
2020-10-09flex-array: allow arrays of unions with flexible members.Ilya Maximets7-1/+44
2020-10-08fix usual conversion of integersLuc Van Oostenryck2-31/+45
2020-10-08fix evaluation of pointer to bool conversionsLuc Van Oostenryck2-1/+2
2020-10-08build: rule for validation needs to be FORCEdLuc Van Oostenryck1-1/+1
2020-10-08add helpers is_struct_type() & is_union_type()Ilya Maximets1-0/+14
2020-10-06unop: fix access to defining instruction in simplify_unop()Luc Van Oostenryck1-4/+2
2020-10-06remove definition of removed OP_{AND,OR}_BOOLLuc Van Oostenryck1-2/+0
2020-10-06Merge branch 'flex-array-base'Luc Van Oostenryck11-18/+177
2020-10-06flex-array: remove unneeded testLuc Van Oostenryck1-22/+0
2020-10-04add builtin types for size_t*, intmax_t* & ptrdiff_t*Luc Van Oostenryck2-0/+9
2020-10-04add builtin types for signed char* and short *Luc Van Oostenryck2-0/+4
2020-10-04add builtin type for wide stringsLuc Van Oostenryck2-0/+9
2020-10-01testsuite: fix erroneous commentLuc Van Oostenryck1-1/+1
2020-10-01fix Hurd PATH_MAX ...Luc Van Oostenryck1-1/+1
2020-10-01flex-array: warn on flexible array in nested aggregate typesLuc Van Oostenryck5-1/+14
2020-10-01flex-array: warn an arrays containing a flexible arrayLuc Van Oostenryck5-1/+12
2020-10-01flex-array: warn when using sizeof() on a flexible arrayLuc Van Oostenryck5-1/+13
2020-10-01flex-array: add helper has_flexible_array()Luc Van Oostenryck1-0/+7
2020-10-01flex-array: identify structures with a flexible array memberLuc Van Oostenryck2-0/+7
2020-10-01flex-array: warn if flexible array is not lastLuc Van Oostenryck2-1/+2
2020-10-01flex-array: warn on flexible arrays in unionsLuc Van Oostenryck1-0/+3
2020-10-01flex-array: detect structures with a flexible array memberLuc Van Oostenryck1-0/+2
2020-10-01flex-array: flexible array members have zero size and alignment is OKLuc Van Oostenryck2-2/+0
2020-10-01flex-array: do not lay out invalid struct membersLuc Van Oostenryck1-2/+4
2020-10-01flex-array: factor out common part of lay_out_{struct,union}()Luc Van Oostenryck1-16/+8
2020-10-01flex-array: add testcasesLuc Van Oostenryck6-0/+133
2020-09-16teach sparse about -funsigned-bitfieldsLuc Van Oostenryck10-22/+60
2020-09-07Merge branch 'linear-fma' into nextLuc Van Oostenryck5-2/+57
2020-09-07builtin: teach sparse to linearize __builtin_fma()Luc Van Oostenryck2-0/+39
2020-09-07builtin: add declaration for __builtin_fma{,f,l}()Luc Van Oostenryck1-0/+3
2020-09-07builtin: allow linearization to failLuc Van Oostenryck1-2/+5
2020-09-07add support for a new instruction: OP_FMADDLuc Van Oostenryck3-0/+10
2020-09-07Merge branch 'replace-with-val' into nextLuc Van Oostenryck1-14/+15
2020-09-06testsuite: easier testing via script & makefileLuc Van Oostenryck1-2/+2
2020-09-05replace_with_{pseudo,value}() can be tail-callsLuc Van Oostenryck1-8/+4
2020-09-05use replace_with_value()Luc Van Oostenryck1-8/+8
2020-09-05add helper replace_with_value()Luc Van Oostenryck1-0/+5
2020-08-18Merge branch 'union-cast' into masterLuc Van Oostenryck7-20/+129