1v0.6.0 (2018-12-26) 2=================== 3 4The source code can be found at its usual repository: 5 git://git.kernel.org/pub/scm/devel/sparse/sparse.git v0.6.0 6 7The tarballs are found at: 8 https://www.kernel.org/pub/software/devel/sparse/dist/ 9 10Many thanks to people who have contributed to the 888 non-merge 11patches of this release: 12 13 Ramsay Jones, Randy Dunlap, Uwe Kleine-König, Joey Pabalinas, 14 John Levon, Ben Dooks, Jann Horn, Logan Gunthorpe, Vincenzo 15 Frascino and Tycho Andersen. 16 17Special thanks to Ramsay Jones who has reviewed numerous of my 18patches, tested many of my series and found many of my typos. 19 20 21Best wishes for 2019 22-- Luc Van Oostenryck 23 24 25The changes since the pre-release (v0.6.0-rc1) are: 26 27* add -Wbitwise-pointer to warn on casts to/from bitwise pointers 28* beautify how types are displayed: 29* no more <noident> 30* no more redundant type specifiers 31* remove double space 32* some cleanup of the build system: 33* only need includedir from llvm-config 34* check if sparse-llvm needs libc++ 35* remove -finline-functions from CFLAGS 36* some random cleanup: 37* remove unneeded declarations in "compat.h" 38* remove unused arg in add_branch() 39* allocate BBs after the guards 40* remove redundant check of _Bool bitsize 41* remove unused regno() 42* remove self-assignment of base_type 43* some documentation: 44* update comment for struct-expression::cast_expression 45* fix list formatting in inline doc 46* document that identifiers are now OK for address spaces 47* add TODO list. 48 49The main changes since the previous release (v0.5.2) are: 50 51* by default, disable warnings about unknown attributes 52* no more warnings about sizeof(void) unless -Wpointer-arith is given 53* add support for __has_attribute() & __has_builtin() 54* many fixes for type evaluation/checking 55* the build should be more friendly for distros 56* a huge number of testcases have been added to the testsuite 57* the handling of cast instructions has been completely revamped 58* the SSA conversion has been is now corrected and has been rewritten with a variant of the classical algorithm 59* documentation is now handled with Sphinx and inline doc is extracted from the code. 60* online documentation can be found at https://sparse-doc.readthedocs.io/en/master/ 61 62A more complete list of changes is: 63 64* add predefined macros for __INTMAX_TYPE__, __INT_MAX__, ... 65* prepare to identify & display the address spaces by name 66* fix linearization of non-constant switch-cases 67* manpage: update maintainer info 68* manpage: add AUTHORS section 69* fixes for -dD 70* add support for -dM 71* remove more complex phi-nodes 72* fix linearization/SSA when missing a return 73* fix linearization/SSA of (nested) logical expressions 74* fix linearization of unreachable switch + label 75* add support for __has_attribute() 76* consolidate instruction's properties into an opcode table 77* fix: do not optimize away accesses to volatile bitfields 78* support mode(__pointer__) and mode(__byte__) 79* do 'classical' SSA conversion (via the iterated dominance frontier). 80* fix buggy recursion in kill_dead_stores() 81* kill dead stores again after memops simplification is done. 82* simplify TRUNC((x & M') | y, N) 83* simplify AND(SHIFT(a | b, S), M) 84* simplify TRUNC(SHIFT(a | b, S), N) 85* add simplification of TRUNC(TRUNC((x)) 86* add simplification of SHL(LSR(x), S), S) 87* generate integer-wide OP_ADD & OP_SUB in linearize_inc_dec() 88* simplify mask instructions & bitfield accesses 89* fix a few bugs related to the linearization of logical expressions 90* simplify those logical expressions. 91* add optimized version of some list operations 92* some simplifications of OP_SETNE & OP_SETEQ with 0 and 1 93* several simplifications involving casts and/or bitfields 94* give a correct & sensible warning on negative or over-sized shifts. 95* add conservative simplification of such shifts. 96* do not optimize the meaningless shift: 97 98 * any shift with a negative count 99 * OP_ASRs with an over-sized shift count. 100 101* try to give a correct negative/too-big error message during simplification. 102* simplify chains of shifts. 103* simplify ZEXT + ASR into ZEXT + LSR 104* cse: try the next pair instead of keeping the first instruction 105* cse: compare casts only by kind a size, not by C type. 106* optimize away OP_UTPTR & OP_PTRTU which are nops. 107* cleanup of list walking macros: 108 109 * make untagged pointers the normal case 110 * use structurally equivalent struct for all pointer lists to avoid needless casting to and fro struct ptrlist 111 * simplify PREPARE/NEXT/RESET logic by using common PTR_NEXT() 112 113* add validation of the IR. 114* improve expansion of builtin dynamic macros (__FILE__, ...) 115* add support for __INCLUDE_LEVEL__ & __BASE_FILE__ 116* improve generation of predefined macros 117* add support for builtins doing overflow checking. 118* add support for the __has_builtin() macro. 119* improve Sphinx doc for IR instructions 120 121 * have those instructions in the index 122 * have a nicer presentation of the generated doc thanks to not having to use level-4 headings anymore 123 124* fixes & improvements to the testsuite; mainly: 125 126 * allow to run the testsuite on all the tests of a subdir 127 * teach 'format' to directly append to the testcase 128 * validate the 'check-...' tags 129 130 131Shortlog 132-------- 133 134Ben Dooks (1): 135 * tokenize: check show_string() for NULL pointer 136 137Jann Horn (1): 138 * fix accesses through incorrect union members 139 140Joey Pabalinas (2): 141 * doc: copy-edit text related to applying sizeof to a _Bool 142 * sparse: add -Wpointer-arith flag to toggle sizeof(void) warnings 143 144John Levon (2): 145 * Ignore #ident directives 146 * Conditionalize 'warning: non-ANSI function ...' 147 148Logan Gunthorpe (1): 149 * add __builtin functions for isinf_sign, isfinite and isnan 150 151Luc Van Oostenryck (857): 152 * use long for all mem stats 153 * diet: use smaller LIST_NODE_NR (29 -> 13) 154 * diet: remove unused struct scope::token 155 * diet: remove unused struct symbol::arg_count 156 * option: add helper to parse/match command line options 157 * option: rename 'struct warning' to 'struct flag' 158 * option: let handle_simple_switch() handle an array of flags 159 * option: extract OPTION_NUMERIC() from handle_switch_fmemcpy_max_count() 160 * option: add support for options with 'zero is infinity' 161 * option: add support for '-<some-option>=unlimited' 162 * option: use OPTION_NUMERIC() for handle_switch_fmemcpy_max_count() 163 * option: constify match_option() 164 * option: handle switches by table 165 * dump-ir: add defines for the compilation passes 166 * testsuite: 'echo -n' may not be interpreted as '-n' 167 * testsuite: allow to test a few cases at once 168 * testsuite: move verbose() & error() 169 * testsuite: better message for pattern nbr checking 170 * testsuite: better message for pattern absence/presence 171 * use shorter name for constexpr tests 172 * testsuite: new eq/min/max syntax for pattern checking 173 * testsuite: obsolete old pattern checking syntax 174 * testsuite: convert to the new pattern syntax 175 * use a specific struct for asm operands 176 * fix: missing evaluate with '-include' : add testcase 177 * fix: missing evaluate with '-include' 178 * fix test case kill-phi-ttsb 179 * add test case for incomplete type 180 * add test case for bad return type 181 * diet: remove unused struct symbol::value 182 * cclass: char is wide enough 183 * cclass: cleanup 184 * remove prototype extern int is_ptr_type() 185 * remove prototype for nonexistent examine_simple_symbol_type() 186 * graph: do not scan removed instructions 187 * build: fix effectiveness of generated dependencies 188 * build: remove unused support for pkgconfig 189 * cgcc: teach cgcc about freebsd & netbsd 190 * testsuite: clearer result summary 191 * testsuite: check error messages first 192 * testsuite: saner handling of 'must_fail' 193 * testsuite: allow to parse several options 194 * testsuite: add support for -q|--quiet 195 * testsuite: add support for -a|--abort 196 * testsuite: get options from env too 197 * testsuite: allow --format & --single 198 * testsuite: remove useless selftest 199 * testsuite: remove useless test-be.c 200 * testsuite: extract disable() 201 * testsuite: simplify documentation 202 * testsuite: allow arch-specific tests 203 * testsuite: save screen real estate 204 * testsuite: add a blank line before format 205 * testsuite: 'quiet' must be initialized earlier 206 * testsuite: move up arg_file() 207 * testsuite: make do_format() more self-contained 208 * testsuite: format: saner defaults handling 209 * testsuite: format: strip .c from default name 210 * testsuite: add support for 'format -f' 211 * testsuite: add support for 'format -l' 212 * remove never-used MOD_TYPEDEF 213 * MOD_ACCESSED is not a type modifier ... 214 * reorganize the definition of the modifiers 215 * remove redundancy in MOD_STORAGE 216 * define MOD_QUALIFIER for (MOD_CONST | MOD_VOLATILE) 217 * associate MOD_RESTRICT with restrict-qualified variables 218 * add support for C11's _Atomic as type qualifier 219 * build: use '-objs' instead of '_EXTRA_DEPS' 220 * build: use '-ldlibs' instead of '_EXTRA_OBJS' 221 * build: allow target-specific CFLAGS, CPPFLAGS, LDFLAGS & LDLIBS 222 * build: allow CFLAGS & friends from command line 223 * build: avoid rule-specific CFLAGS 224 * build: use $LIBS directly in the dependency list 225 * build: no need to use wildcards for generated dependencies 226 * build: reuse rule for ALL_OBJS 227 * build: CHECKER_FLAGS=-Wno-vla for all targets 228 * build: move tests near their use 229 * build: add note about overwritable vars 230 * build: remove references to nonexistent pre-process.h 231 * build: move clean & clean-check together 232 * build: make clean targets quieter 233 * build: remove rule for shared lib, it's unused 234 * build: normalize rules 235 * build: remove the dist rule since unused 236 * build: use one line per item 237 * build: allow the name 'local.mk' to be configurable via the environment 238 * build: use standard rules for install 239 * build: remove unused QUIET_INST_SH 240 * build: let quiet commands use less indentation 241 * build: simplify quiet commands 242 * build: simplify clean pattern 243 * build: add \*.o to clean-check pattern 244 * build: avoid foreach 245 * build: reorg & add comment 246 * build: use a single space before assignments 247 * build: add rule to run a single test 248 * build: let -fno-strict-aliasing be a mandatory flag 249 * volatile loads are side-effects too 250 * define MOD_ACCESS for (MOD_ASSIGNED | MOD_ADDRESSABLE) 251 * fix 'simplification' of float-to-int casts 252 * fix description setval & symaddr 253 * flush stdout when warning 254 * add test case for bogus volatile simplification 255 * fix: volatile stores must not be simplified 256 * dump-ir: add testcase for option parsing corner case 257 * dump-ir: allow to specify the passes to execute via cli's options 258 * dump-ir: activate/deactivate pass 'mem2reg' 259 * dump-ir: allow to skip the optimization pass(es) 260 * dump-ir: saner use of fdump_linearize 261 * dump-ir: rename -fdump-linearize to -fdump-ir 262 * dump-ir: make it more flexible 263 * dump-ir: activate -fdump-ir=mem2reg 264 * add test case for using multiple input files 265 * add test case for VLA sizeof 266 * add test case for memory to register problem 267 * add test case for conditionally undefined var 268 * add test case for incomplete type 269 * add test case bitfields in K&R decl 270 * add test case storage specifier in struct member 271 * add test case using sizeof on incomplete type 272 * add test case for bad layout of bool in bitfields 273 * add test case for missed overflow detection 274 * add test cases for canonicalization of add/sub chains 275 * add test case for compound literals 276 * add testcase for __builtin_unreachable() 277 * add test cases for canonicalization of mul chains 278 * add test case for pre-processor extra tokens warning 279 * add testcase for return & inline 280 * add test cases for simplification of equivalent to 'x == 0' or 'x != 0' 281 * add test case for superfluous cast with volatiles 282 * add testcase for mem2reg/SSA conversion 283 * add test cases for canonicalization of boolean expressions 284 * add test case for missing conversion to select 285 * show OP_PHI without VOID 286 * don't output value of anonymous symbol's pointer 287 * add table to "negate" some opcode 288 * use opcode table for compare_opcode() 289 * canonicalize binops before simplification 290 * canonicalize compare instructions 291 * add is_signed_type() 292 * fix usage of inlined calls 293 * inlined calls should not block BB packing 294 * give a type to all function arguments 295 * give a type to OP_PHISOURCEs 296 * give a type to OP_SELs, always 297 * give a type to OP_SWITCHs 298 * add doc about sparse's instructions/IR 299 * add support for wider type in switch-case 300 * llvm: remove unneeded arg 'module' 301 * llvm: remove unneeded 'generation' 302 * llvm: remove unneeded function::type 303 * llvm: reduce scope of 'bb_nr' 304 * llvm: use pseudo_list_size() instead of open coding it 305 * llvm: give arguments a name 306 * llvm: give a name to call's return values 307 * llvm: avoid useless temp variable 308 * llvm: extract get_sym_value() from pseudo_to_value() 309 * llvm: fix test of floating-point type 310 * llvm: fix translation of PSEUDO_VALs into a ValueRefs 311 * llvm: fix output_op_store() which modify its operand 312 * llvm: fix output_op_[ptr]cast() 313 * llvm: add test cases for symbol's address 314 * llvm: add test cases for pointers passed as argument 315 * llvm: add test cases for arrays passed as argument 316 * llvm: add test cases for degenerated pointers 317 * llvm: add support for OP_NEG 318 * llvm: add support for OP_SETVAL with floats 319 * llvm: add support for OP_SETVAL with labels 320 * llvm: ignore OP_INLINED_CALL 321 * llvm: fix pointer/float mixup in comparisons 322 * llvm: fix type in comparison with an address constant 323 * llvm: give correct type to binops 324 * llvm: adjust OP_RET's type 325 * llvm: variadic functions are not being marked as such 326 * llvm: fix type of switch constants 327 * llvm: make pseudo_name() more flexible 328 * llvm: give a name to all values 329 * llvm: add support for OP_SWITCH with a range 330 * llvm: fix OP_SWITCH has no target 331 * llvm: make value_to_pvalue() more flexible 332 * llvm: make value_to_ivalue() more flexible 333 * llvm: add test case pointer compare with cast 334 * llvm: let pseudo_to_value() directly use the type 335 * llvm: add small script to test LLVM generated bytecode 336 * llvm: add testcase for calling variadic functions 337 * llvm: fix variadic calls with constants 338 * llvm: take care of degenerated rvalues 339 * llvm: fix mutating function pointer 340 * llvm: fix mutated OP_RET 341 * llvm: fix mutated OP_SEL 342 * llvm: fix mutated OP_SWITCH 343 * llvm: fix mutated OP_PHISOURCE 344 * llvm: fix mutated OP_[PTR]CAST 345 * llvm: add support for restricted types 346 * llvm: fix get value from initialized symbol 347 * llvm: fix get value from non-anonymous symbol 348 * llvm: fix type of bitfields 349 * llvm: add support for OP_FPCAST 350 * llvm: add support for cast from floats 351 * llvm: cleanup of output_[ptr]cast() 352 * llvm: fix creation of sparsec's tmp files 353 * llvm: give names easier to debug 354 * llvm: gracefully catch impossible type/value 355 * llvm: warn instead of assert on global inits 356 * llvm: add support for float initializer 357 * llvm: only compare void pointers 358 * fix linearize_inc_dec() with floats 359 * add test case for boolean negation on float 360 * fix support of floating-point compare 361 * add support of floating-point specific arithmetic ops 362 * testsuite: fix: remove unneeded './' before commands 363 * fix: build sparse-llvm on i686s too. 364 * add more testcases for using addresses in conditionals 365 * add testcases linearization of degenerated arrays/functions 366 * fix: add missing degenerate() for logical not 367 * testsuite: make the '%.t' rule depends on PROGRAMS too 368 * testsuite: fix a few more incorrect check-commands 369 * testsuite: convert to the new pattern syntax 370 * testsuite: remove old ugly pattern syntax 371 * testsuite: move verbose/error() before get_tag_value() 372 * testsuite: add & use warning() 373 * testsuite: reset 'quiet' at the start of each testcase 374 * testsuite: fix invalid 'check-...' tags 375 * testsuite: validate the 'check-...' tags 376 * testsuite: early return in getopt loop 377 * testsuite: move do_test_suite out of the getopt loop 378 * testsuite: move no-arg out of the getopt loop 379 * testsuite: change do_usage text 380 * testsuite: allow to test only a subdir 381 * testsuite: default to shift in the getopt loop 382 * testsuite: add support for 'format -a' 383 * add testcase for 'sparse -D M...' 384 * fix: accept 'sparse -D M...' 385 * testsuite: add test case for quoting of command's arguments 386 * testsuite: process extra options without exec 387 * testsuite: respect command line's quotes & whitespaces 388 * testsuite: allow default args from environment for test commands 389 * add test case for space within command line 390 * fix: spaces in macro definition on the command line 391 * add testcases for unexamined base type 392 * fix: evaluate_dereference() unexamined base type 393 * add testcases for the linearization of calls 394 * simplify linearize_call_expression() 395 * fix linearize (\*fun)() 396 * add testcases for multiple deref of calls 397 * avoid unneeded alloc on error path 398 * dereference of a function is a no-op 399 * add testcase for constant bitfield dereference 400 * fix expansion of constant bitfield dereference 401 * add testcase for CSE of floating-point compares 402 * fix: restore CSE on floating-point compares 403 * llvm: fix: previous function ref MUST be reused 404 * llvm: use LLVMModuleRef for get_sym_value() 405 * llvm: add declares for function prototypes 406 * testcases: add missing return statements 407 * warn on empty parenthesized expressions 408 * fix crash on bad expression in linearize_switch() 409 * llvm: simplify emit of null pointers 410 * llvm: default init of arrays & structs 411 * add more testcases for function designator dereference 412 * add testcases for type comparison 413 * fix implicit size of unsized arrays 414 * let handle_switches() also handle reverse logic 415 * add support for '-f[no-][un]signed-char' 416 * fix: dereference null-type 417 * teach sparse about '-fmax-warnings' 418 * give a type to builtin functions 419 * ctags: avoid null deref 420 * cleanup: make some functions static 421 * cleanup: remove unused & obsolete symbol_is_typename() 422 * cleanup: remove unused delete_last_basic_block() 423 * cleanup: remove declaration of unused merge_phi_sources 424 * add OP_SETFVAL 425 * CSE: support CSE of floating-point literal 426 * doc: fix manpage formatting 427 * report type & size on non-power-of-2 pointer subtraction 428 * remove warning "call with no type" 429 * add testcases for duplicated warning about invalid types 430 * fix error in bad conditional 431 * early return if null ctype in evaluate_conditional() 432 * add helper: valid_type() 433 * use valid_type to avoid to warn twice on conditionals 434 * add helpers: valid_expr_type() & valid_subexpr_type() 435 * do not report bad types twice 436 * always evaluate both operands 437 * fix examination of bad typeof 438 * extract extract eval_insn() from simplify_constant_binop() 439 * add testcase of dead dominator 440 * fix dead dominator 441 * fix missing checks for deleted instructions 442 * add testcase for bad killing of dominated stores 443 * add helper for pseudo's user-list's size 444 * add helper: has_users() 445 * use has_users() in dead_insn() too 446 * let kill_instruction() report if changes were made 447 * add testcases for converted loads 448 * fix killing of converted loads 449 * fix usage of deadborn loads 450 * kill dead loads 451 * kill dead stores when simplifying symbols 452 * By default disable the warning flag '-Wunknown-attribute' 453 * no repetition in unknown attribute warning message 454 * cleanup: remove unused 'struct pseudo_ptr_list' 455 * llvm: use list_size() to count the numbers of arguments 456 * llvm: initialize at declaration time 457 * show_pseudo(): protect against NULL ->sym 458 * use show_pseudo() for OP_SYMADDR's symbol 459 * let struct access_data use a single type 460 * rename base_type() to bitfield_base_type() 461 * builtin: add ctype for const {void,char} * 462 * builtin: make builtins more builtin 463 * builtin: extract eval_args() from arguments_choose() 464 * builtin: add typechecking of isnan(), isinf(), ... 465 * builtin: add testcases for expansion of special FP constants 466 * builtin: add testcases for expansion of FP classification 467 * unsigned multiplication is also associative 468 * no need for signed & unsigned multiplication 469 * use '%lld' for printing long longs 470 * build: add -MP for generated dependencies 471 * build: use -MMD for generated dependencies 472 * ban use of 'true' or 'false' 473 * 'amd64' is also ok for sparse-llvm 474 * testsuite: fix typo with 'test-suite format -a' 475 * rename variable 'optimize' to 'optimize_level' 476 * move the optimization loop in its own file 477 * cse: untangle simplification & hashing 478 * extract cse_eliminate() from cleanup_and_cse() 479 * expose interface to CSE 480 * move liveness interface to its own header 481 * move inner optimization loop into optimize.c 482 * move the inner optimization loop into the main loop 483 * remove unneeded cast in calls to free_ptr_list() 484 * testsuite: add testcase for some random crash 485 * testsuite: add testcase about CSE problem 486 * IR: fix typo in IR doc 487 * IR: remove now unused OP_LNOP & OP_SNOP 488 * IR: remove never-generated instructions 489 * IR: let .cond unionize with .src and not .target 490 * IR: let OP_COMPUTEGOTO use .src instead of .target 491 * llvm: normalize sparse-llvm-dis' output 492 * llvm: fix typo for constant addresses 493 * testsuite: fix problem with double-escaping in patterns 494 * add a field 'tainted' to struct instruction 495 * taint: let check_access() warn just once 496 * fix address_taken() 497 * fix symbol cleanup 498 * cleanup deadborn phi-sources 499 * optim: add some more optimization tests 500 * optim: add testcase for internal infinite loop 501 * optim: add timeout for infinite optim loop tests 502 * optim: kill unreachable BBS after CFG simplification 503 * optim: no need to kill_unreachable_bbs() after main loop 504 * optim: fix optimization loop's condition 505 * optim: pack bb must set REPEAT_CFG 506 * optim: load simplification should repeat optimization 507 * optim: fix REPEAT_CFG_CLEANUP 508 * add an helper to test the value of a pseudo against zero 509 * optim: simplify null select 510 * make remove_usage() more generic 511 * add remove_use() 512 * show_label: add (and use) show_label() 513 * extract alloc_phisrc() from alloc_phi() 514 * small code reorg of add_store() 515 * alloc: add missing #include "compat.h" 516 * defer initialization of bb::context 517 * fix-return: remove special case for single return 518 * avoid deadborn loads & stores 519 * doc: options.md is for development 520 * doc: document the debug flags 521 * fix missing handling of OP_FNEG 522 * graph: do not use insn->symbol for memops 523 * use -Wpointer-arith for tests 524 * default to LP64 for all and only for 64 bit ABIs 525 * fix alignment of 64 bit integers on LLP64 526 * add testcases for verifying ABI's integer size & align 527 * use an enum for ARCH_LP32 & friends 528 * add a flag -mx32 ILP32 env on 64 bit archs 529 * add testcase for enum / int type difference 530 * add testcase for array size type difference 531 * add testcase for typedef redefinition 532 * export check_duplicates() 533 * fix: warn on typedef redefinition 534 * do not to ignore old preprocessor testcases 535 * use also __x86_64 when __x86_64__ is used 536 * build: use a variable for $(shell uname -m) 537 * build: use 'filter' to do pattern matching inside the Makefile 538 * build: disable LLVM on x86-64-x32 539 * let cgcc use sparse's predefines for i386 & x86-64 540 * build: use --dirty with 'git describe' 541 * fix build on Hurd which doesn't define PATH_MAX 542 * testsuite: add check-cp-if 543 * testsuite: add check-assert 544 * teach sparse about _Floatn and _Floatnx 545 * add test case bug expand union 546 * alloc: check if size is too big 547 * fix: don't dump pointer value in error message 548 * fix missing checks for deleted instructions 549 * fix comment about PSEUDO_SYM usage 550 * fix: remove usage when killing symaddr (part 1) 551 * fix: remove usage when killing symaddr (part 2) 552 * OP_SYMADDR is simply an unop 553 * use function-like syntax for __range__ 554 * increment the version number suffix it with -dev 555 * doc: fix markdown syntax 556 * doc: fix headings 557 * doc: add minimal support for sphinx-doc 558 * doc: add logo 559 * doc: automatically set the copyright date 560 * doc: automatically get the version 561 * doc: set primary domain to C 562 * doc: allow .md with py3-sphinx 563 * doc: move sparse.txt to markdown and rename it 564 * doc: the testsuite doc in reST 565 * doc: format dev-options.md as a man page 566 * doc: use reST for manpages 567 * api: move evaluate interface to its own header file 568 * doc: add structured doc to ptrlist.c 569 * autodoc: extract doc from the C files 570 * autodoc: convert extracted doc to reST 571 * autodoc: add a sphinx c:autodoc directive for the extracted doc 572 * autodoc: add doc from ptrlist.c 573 * autodoc: add markup to argument's references 574 * autodoc: doc the doc 575 * autodoc: by default disable syntax highlighting 576 * autodoc: add a small cheatsheet for reST markup 577 * autodoc: support muti-line param & return descriptions 578 * autodoc: document a few more APIs to test multiline 579 * autodoc: add autodoc tests in the testsuite 580 * doc: convert IR.md to reST 581 * doc: add sphinx domain for IR instruction indexation 582 * add helper for new parsing errors: unexpected() 583 * context: fix parsing of attribute 'context' 584 * context: __context__(...) expect a constant expression 585 * context: fix crashes while parsing '__context__;' or '__context__(;' 586 * context: stricter syntax for __context__ statement 587 * context: extra warning for __context__() & friends 588 * label: add testcase for label redefinition 589 * label: avoid multiple definitions 590 * vla-sizeof: add test cases 591 * vla-sizeof: add support for sizeof of VLAs 592 * fix typing of __builtin_expect() 593 * fix crash on 'goto <reserved word>' 594 * give a position to end-of-input 595 * avoid multiple error message after parsing error 596 * add test for integer-const-expr-ness 597 * dyn-macro: add testcase for __LINE__ & friends 598 * dyn-macro: use a table to expand __DATE__, __FILE__, ... 599 * dyn-macro: add support for __INCLUDE_LEVEL__ 600 * dyn-macro: add real support for __BASE_FILE__ 601 * utils: add xmemdup() & xstrdup() 602 * utils: convert alloc + copy to {mem,str}dup_alloc() 603 * builtin: add testcase for builtin macro expansion 604 * builtin: extract do_define() from do_handle_define() 605 * builtin: add builtin types {u,}{int,long,long}_ptr_ctype 606 * builtin: declare __builtin_[us]{add,sub,mul}{,l,ll}_overflow() 607 * builtin: rename arguments_choose() to args_triadic() 608 * builtin: add support for __builtin_{add,sub,mul}_overflow(), ... 609 * extract replace_with_bool() from replace_with_defined() 610 * builtin: add support for __has_builtin() 611 * builtin: add predefine() 612 * builtin: directly predefine builtin macros 613 * builtin: consolidate predefined_macros() 614 * doc: API before IR 615 * builtin: switch calling order of predefined_macros() & friends 616 * builtin: merge declare_builtin_function() with declare_builtins() 617 * teach sparse about -m16 618 * ptrlist: specialize __add_ptr_list() for tag/notag 619 * ptrlist: remove now unneeded add_ptr_list_notag() 620 * ptrlist: add helper PTR_UNTAG() 621 * ptrlist: rename PTR_ENTRY() to PTR_ENTRY_UNTAG() 622 * ptrlist: make explicit when tagged pointers are used. 623 * ptrlist: let FOR_EACH_PTR() ignore tags 624 * utils: add xasprintf() & xvasprintf() 625 * add support for -fdiagnostic-prefix[=prefix] 626 * doc: add doc for the -vcompound flag 627 * testsuite: fix missing return 628 * keep the debug flags alphabetically sorted 629 * testsuite: allow extra/default options to test commands 630 * ir-validate: add framework for IR validation 631 * ir-validate: validate pseudo's defining instruction 632 * ir-validate: add validation of (nbr of) phi operands 633 * ir-validate: add more validation points 634 * sparsec: simplify & portable use of mktemp 635 * add predefines for __INT_WIDTH__ & friends 636 * ptrlist: remove the now unneeded FOR_EACH_PTR_NOTAG() 637 * ptrlist: let {first,last}_ptr_list() return the raw pointer 638 * ptrlist: let sort_list() use the raw pointer 639 * ptrlist: let all pointer lists have the same parameterized structure 640 * ptrlist: when possible use the real type of the list 641 * ptrlist: remove now unneeded CHECK_TYPE() 642 * ptrlist: make add_ptr_list() more readable 643 * ptrlist: make free_ptr_list() more readable 644 * ptrlist: remove some unneeded arg from internal macros. 645 * ptrlist: remove extra ident level 646 * ptrlist: simplify loop nesting 647 * ptrlist: simplify DO_NEXT 648 * ptrlist: simplify PREPARE/NEXT 649 * ptrlist: shorter continuated lines 650 * ptrlist: remove ptr_list_empty() 651 * ptrlist: make {first,last}_ptr_list() out-of-line functions 652 * ptrlist: move semi-private prototypes close to their user 653 * ptrlist: use VRFY_PTR_LIST() for sanity check 654 * ptrlist: keep declaration of head-list-nr together 655 * ptrlist: make clear what is API and what is implementation. 656 * ptrlist: move DO_SPLIT() into DO_INSERT_CURRENT() 657 * ptrlist: add missing doc for some functions 658 * add testcase for bad fpcast simplification 659 * fix bad fpcast simplification 660 * avoid useless deref in simplify_cond_branch() 661 * new helper: replace_pseudo() 662 * remove unused arg in simplify_cond_branch() 663 * add_uniop() should take a type, not an expression 664 * rename add_uniop() to add_unop() 665 * add missing entry for OP_FNEG in kill_insn() & validate_insn() 666 * ir: define an \OP_.. range for unops 667 * ir: case OP_UNOP ... OP_UNOP_END 668 * cast: reorg testcases related to casts 669 * cast: add testcase for bad implicit casts to struct/union 670 * cast: add testcase for cast to bad typeof 671 * cast: add tests for warnings issued by sparse -v 672 * cast: rename evaluate_cast()'s vars with slightly more meaningful names 673 * cast: force_cast are OK on non-scalar values 674 * cast: prepare finer grained cast instructions 675 * cast: specialize FPCAST into [USF]CVTF 676 * cast: handle NO-OP casts 677 * cast: specialize floats to integer conversion 678 * cast: specialize casts from unsigned to pointers 679 * cast: make [u]intptr_ctype alias of [s]size_t_ctype 680 * cast: make pointer casts always size preserving 681 * cast: temporary simplify handling cast to/from void* 682 * cast: specialize cast from pointers 683 * cast: add support for -Wpointer-to-int-cast 684 * cast: make casts from pointer always size preserving 685 * cast: specialize integer casts 686 * cast: accept null casts 687 * cast: do not try to linearize illegal casts 688 * cse: add testcase for missed opportunity 689 * new helper: def_opcode() 690 * cast: simplify simplify_cast() 691 * cast: merge simplification of constant casts with constant unops 692 * cast: prepare for more cast simplifications 693 * cast: keep instruction sizes consistent 694 * cse: move to next comparable instruction 695 * cast: simplify TRUNC + ZEXT to AND 696 * add simple testcases for internal infinite loops 697 * simplify 'x | ~0' to '~0' 698 * simplify 'x & ~0' to 'x' 699 * simplify 'x ^ ~0' to '~x' 700 * bool: add testcase for bool simplification 701 * bool: fix add missing check in simplify_seteq_setne() 702 * bool: simplify ZEXT in bool -> int -> bool 703 * bool: fix missing boolean context for floats 704 * bool: generate plain OP_{AND,OR} instead of OP_{AND,OR}_BOOL 705 * bool: remove OP_{AND,OR}_BOOL instructions 706 * cast: reorganize testcases for cast optimization 707 * cast: optimize away casts to/from pointers 708 * cse: let equivalent casts hash & compare identically 709 * fix killing OP_SWITCH 710 * fix: remove dead OP_{SETVAL,SETFVAL,SLICE} 711 * kds: add testcases for kill_dead_stores() 712 * kds: add explanation to kill_dead_stores() 713 * kds: rename kill_dead_stores() to kill_dead_stores_bb() 714 * kds: add interface for kill_dead_stores() 715 * kds: kill dead stores after memops simplification 716 * kds: shortcut for kill_dead_stores() 717 * kds: fix recursion in kill_dead_stores_bb() 718 * kds: clarify kill_dead_stores_bb() 719 * testsuite: reorganize tests for compound literals 720 * testsuite: add a few more tests catching quadratic behaviour 721 * testsuite: improve mem2reg testcases 722 * testsuite: remove useless test for loop-linearization 723 * graph: build the CFG reverse postorder traversal 724 * graph: add debugging for (reverse) postorder traversal 725 * dom: calculate the dominance tree 726 * dom: add some debugging for the dominance tree 727 * dom: add support for dominance queries 728 * dom: build the domtree before optimization 729 * dom: use domtree for bb_dominates() 730 * sset: add implementation of sparse sets 731 * idf: compute the iterated dominance frontier 732 * idf: add test/debug/example 733 * add new helper: is_integral_type() 734 * add PSEUDO_UNDEF & undef_pseudo() 735 * add insert_phi_node() 736 * ptrmap: core implementation 737 * ptrmap: add type-safe interface 738 * ssa: phase 1: phi-nodes placement 739 * ssa: phase 2: rename load & stores 740 * ssa: phase 3: rename phi-nodes 741 * ssa: activate the new SSA conversion 742 * ssa: remove unused simplify_symbol_usage() 743 * ssa: phi worklist 744 * remove unused finish_address_gen() 745 * remove unused struct access_data::pos 746 * no need to assign ad->type for EXPR_POS 747 * remove obsolete comment: /\* Dummy pseudo allocator \*/ 748 * big-shift: add test for shifts with bad count 749 * big-shift: mark out-of-range OP_{ASR,LSR,SHL} as tainted 750 * big-shift: do not evaluate negative or over-sized shifts 751 * big-shift: don't take the modulo at expand time 752 * big-shift: move the check into check_shift_count() 753 * big-shift: use the base type for shift-too-big warning 754 * big-shift: also check shift count of shift-assignment 755 * big-shift: do not simplify over-sized OP_ASR to zero 756 * big-shift: reorder the tests in simplify_asr() 757 * big-shift: reuse simplify_asr() for LSR & SHL 758 * big-shift: simplify over-sized OP_LSRs 759 * big-shift: simplify over-sized OP_SHLs 760 * big-shift: use the type width for too big shift 761 * big-shift: fix warning message for negative shift count 762 * big-shift: fix evaluation of shift-assign 763 * big-shift: do not truncate the count when checking it 764 * big-shift: add -Wshift-count-{negative,overflow} 765 * extract nbr_users() from unssa.c 766 * add testcases for casts & bitfield insertion/extraction 767 * bitfield: extract linearize_bitfield_extract() 768 * bitfield: extract linearize_bitfield_insert() 769 * cast: simplify [SZ]EXT + TRUNC to original size 770 * cast: simplify [SZ]EXT + TRUNC to a smaller/greater size 771 * cast: fix shift signedness in cast simplification 772 * cast: do not compare sizes, test the opcode 773 * cast: use a switch to handle TRUNC(AND(x,M),N) in simplify_cast() 774 * cast: preserve the sizes of TRUNC(AND(x,M),N) 775 * cast: simplify [ZS]EXT(AND(x,M),N) 776 * cast: simplify AND(ZEXT(x,M),N) 777 * cast: simplify SEXT(SEXT(x,N),N') 778 * cast: simplify ZEXT(ZEXT(x,N),N') 779 * cast: simplify SEXT(ZEXT(x,N),N') 780 * bits: add helpers for zero & sign-extension 781 * big-shift: add testcases for simplification of over-sized shifts 782 * big-shift: add testcases for simplification of negative shifts 783 * big-shift: move shift count check in a separate function 784 * big-shift: fix warning message for negative or over-sized shifts 785 * big-shift: do not optimize negative shifts 786 * big-shift: do not optimize over-sized ASRs 787 * use "%Le" to display floats 788 * add copy_ptr_list() 789 * testcases: add testcase for missing detection of out-of-bound stores 790 * testcases: missing evaluation of side effects in typeof(VLA) 791 * kill dead OP_FADD & friends 792 * add ptr_list_empty() 793 * add ptr_list_multiple() 794 * add lookup_ptr_list_entry() 795 * shift: simplify LSR(LSR(x,N),N') & friends 796 * shift: simplify ASR(LSR(x,N),N') 797 * shift: avoid simplification of ASR(LSR(x,0),N) 798 * shift: simplify ASR(ZEXT(X, N), C) 799 * testcase for SET{EQ,NE}([SZ]EXT(x, N),{0,1})'s simplification 800 * cleanup of simplify_seteq_setne(): remove tmp vars 801 * simplify SET{EQ,NE}(ZEXT(x, N),{0,1}) 802 * simplify SET{EQ,NE}(SEXT(x, N),{0,1}) 803 * simplify 'x != 0' or 'x == 1' to 'x' 804 * add testcase for linearize_logical() 805 * fix size corruption when simplifying 'x != 0' to 'x' 806 * protect add_convert_to_bool() against bad types / invalid expressions 807 * conditional branches can't accept arbitrary expressions 808 * fix linearize_conditional() for logical ops 809 * expand linearize_conditional() into linearize_logical() 810 * simplify linearize_logical() 811 * simplify SETNE(AND(X,1),0) to AND(X,1) 812 * simplify SETNE(TRUNC(x,N),{0,1}) 813 * simplify ZEXT(SETCC(x,y), N) 814 * simplify SEXT(SETCC(x,y), N) 815 * simplify TRUNC(SETCC(x,y), N) 816 * simplify AND(SETCC(x,y), M) 817 * boolean conversion of boolean value is a no-op 818 * cast: fix warning position in cast_pseudo() 819 * limit the mask used for bitfield insertion 820 * expand linearize_position() into linearize_initializer() 821 * put back the bitfield base type into struct access_data 822 * fix instruction size & type in linearize_inc_dec() 823 * fix bad indentation in linearize_inc_dec() 824 * avoid infinite simplification loops of the second kind 825 * optim: add a few more testcases for shift & mask 826 * use multi_users() instead on nbr_users() 827 * reorg code for shift-shift simplification 828 * simplify ((x & M') | y ) & M into (y & M) when (M' & M) == 0 829 * simplify ((x & M) | y) >> S to (y >> S) when (M >> S) == 0 830 * simplify (x << S) >> S into x & (-1 >> S) 831 * simplify (x & M) >> S to (x >> S) & (M >> S) 832 * rename testcase for ((x << S) >> S) simplification 833 * add testcase for ((x >> S) << S) simplification 834 * add testcase for TRUNC(TRUNC(x)) simplification 835 * simpler guard in LSR-SHL simplification 836 * reorganize shift-shift simplification 837 * simplify ((x >> S) << S) 838 * reorganize simplification of ZEXT(TRUNC(x)) 839 * simplify TRUNC(TRUNC(x)) 840 * doc: simplify the creation of the viewlist 841 * doc: automatically insert the blank line for lists 842 * doc: convert existing simplify.c doc into ReST autodoc 843 * doc: reword doc for replace_pseudo() 844 * doc: add doc for simplification notation 845 * add testcase for (((x & M') | (y & M'')) & M) 846 * add testcases for bitfield & AND/OR simplification 847 * unify simplify_lsr_or() & simplify_and_or_mask() 848 * add simplify_mask_or() 849 * use better names for simplify_mask_or_and() vars 850 * document simplify_mask_or() & simplify_mask_or_and() 851 * switch return order in simplify_mask_or_and() 852 * allow simplification of OP(((x & y) | (a & M')), K) 853 * move opcode test inside simplify_mask_or_and() 854 * simplify OP(((x & M') | y), K) when (M' & M) == M 855 * simplify OP(((x & M') | y), K) when (M' & M) != M' 856 * simplify OP((x | C), K) when (C & M) == 0 857 * simplify OP((x | C), K) when (C & M) == M 858 * simplify OP((x | C), K) when (C & M) != C 859 * simplify SHL((x & M') | y, S) 860 * add testcases for {LSR,SHL}(AND(x, M), S) with shared AND(x, M) 861 * use an intermediate mask in simplify_shift() 862 * simplify ((x & M) >> S) when (M >> S) == 0 863 * simplify ((x & M) >> S) when (M >> S) == (-1 >> S) 864 * simplify ((x & M) << S) when (M << S) == 0 865 * simplify ((x & M) << S) when (M << S) == (-1 << S) 866 * simplify TRUNC((x & M') | y, N) 867 * doc: extend simplification notation 868 * prepare simplification of MASK(SHIFT(a | b, S), M) 869 * simplify AND(SHIFT(a | b, S), M) 870 * simplify TRUNC(SHIFT(a | b, S), N) 871 * mode keywords don't need MOD_{CHAR,LONG,...} 872 * add support for mode __pointer__ 873 * add support for mode __byte__ 874 * add a testcase for enum using a mode 875 * remove superfluous newline in 'unknown mode attribute' error message 876 * testsuite: remove useless test for loop-linearization 877 * symaddr: s/insn->symbol/insn->src/ 878 * add testcase for accesses to volatile bitfields 879 * split memops from unops 880 * add a flag for volatile memops 881 * fix: do not optimize away accesses to volatile bitfields 882 * opcode: centralize opcode definition 883 * opcode: add arity info 884 * opcode: add OPF_TARGET 885 * add a function to remove deadborn instructions 886 * fix missing declarations 887 * has-attr: add testcase for __has_attribute() 888 * has-attr: move 'mode' next to '__mode__' 889 * has-attr: add __designated_init__ & transparent_union 890 * has-attr: add support for __has_attribute() 891 * ir-validate: add validation branch to dead BB 892 * ir-validate: ignore dead phis 893 * ir-validate: validate return value 894 * add testcase for unreachable label in switch 895 * fix linearization of unreachable switch (with reachable label). 896 * move DEF_OPCODE() to header file 897 * trivial-phi: add testcase for unneeded trivial phi-nodes 898 * trivial-phi: make clean_up_phi() more sequential 899 * trivial-phi: extract trivial_phi() from clean_up_phi() 900 * trivial-phi: early return 901 * trivial-phi: use a temp var for the real source 902 * trivial-phi: directly return the unique value 903 * trivial-phi: remove more complex trivial phi-nodes 904 * stricter warning for explicit cast to ulong 905 * add linearization as a pass 906 * add testcases for missing return in last block 907 * use a temp var for function's upper-level statement 908 * topasm: top-level asm is special 909 * specialize linearize_compound_statement() 910 * there is always an active BB after linearize_fn_statement() 911 * the return BB is never terminated 912 * extract add_return() from linearize_return() 913 * use UNDEF for missing returns 914 * use a temp var for the return type/symbol 915 * return nothing only in void functions 916 * add testcases for wrong ordering in phi-nodes 917 * fix ordering of phi-node operand 918 * add tests for nested logical expr 919 * fix linearization of nested logical expr 920 * add testcase for non-constant switch-case 921 * fix linearization of non-constant switch-cases 922 * test: make test Waddress-space-strict succeed on 32-bit 923 * test: use integers of different sizes, even on 32-bit 924 * test: make 32-bit version of failed test 925 * ssa: relax what can be promoted 926 * doc: is_int_type() returns false for SYM_RESTRICTs 927 * enum: add testcase for UB in oversized shift 928 * enum: fix UB when rshifting by full width 929 * enum: add testcase for type of enum members 930 * enum: add testcase for base & enumerator type 931 * enum: fix cast_enum_list() 932 * enum: use the smallest type that fit 933 * enum: use the values to determine the base type 934 * enum: only warn (once) when mixing bitwiseness 935 * enum: warn when mixing different restricted types 936 * enum: warn on bad enums 937 * enum: rewrite bound checking 938 * enum: keep enumerators as int if they fit 939 * enum: default to unsigned 940 * enum: more specific error message for empty enum 941 * __attribute__((fallthrough)) can't simply be ignored 942 * ptrlist: add ptr_list_nth_entry() 943 * add testcase for missing function designator expansion 944 * fix expansion of function designator 945 * teach sparse about '-o <file>' 946 * teach sparse about '-x <language>' 947 * cgcc: add support to ignore argument(s) of options 948 * cgcc: teach about '-o <file>' 949 * cgcc: teach about '-x c' 950 * dump-macro: break the loop at TOKEN_UNTAINT 951 * dump-macro: simplify processing of whitespace 952 * fix implicit K&R argument types 953 * Use -Wimplicit-int when warning about missing K&R argument types 954 * Accept comma-separated list for function declarations. 955 * cgcc: use 'i386' for the arch instead of 'i86' 956 * add testcase for missing deliminator ' or " 957 * man: add section about reporting bugs 958 * man: add AUTHORS section 959 * man: update maintainer info 960 * don't allow newlines inside string literals 961 * multi-buffer for idents 962 * as-name: add and use show_as() 963 * as-name: use idents for address spaces 964 * as-name: allow ident as address_space 965 * as-name: check for multiple address spaces at parsing time 966 * as-named: warn on bad address space 967 * add detection of native platform 968 * Consolidate 'machine detection' into "machine.h" 969 * test endianness with __BYTE_ORDER__ 970 * testsuite: test predef macros on LP32/LP64/LLP64 971 * fix '__SIZE_TYPE__' for LLP64 972 * allow optional "_T" suffix to __SIZEOF_XXX__ 973 * use bits_mask() for predefined_max() 974 * add builtin_type_suffix() 975 * teach sparse about asm inline 976 * remove duplicates from gcc-attr-list.h 977 * show-parse: strip do_show_type()'s trailing space 978 * make predefined_type_size() more generic 979 * give a type to wchar 980 * use the type for predefined_max() 981 * add predefined macros for wint_t 982 * add predefined macros for [u]intptr 983 * add predefined macros for [u]intmax 984 * add predefined macros for [u]int{8,16}_t 985 * add predefined macros for [u]int64_t 986 * add predefined macros for [u]int32_t 987 * add predefined macros for char{16,32}_t 988 * fix the size of long double 989 * add predefine for __CHAR_UNSIGNED__ 990 * add predefine_min() and use it for __{WCHAR,WINT}_MIN__ 991 * add a flag to warn on casts to/from bitwise pointers 992 * show-parse: don't display null ident in show_typename() 993 * show-parse: do not display base type's redundant specifiers 994 * show-parse: remove string_ctype from typenames 995 * VERSION=0.6.0-rc1 996 * build: only need includedir from llvm-config 997 * build: check if sparse-llvm needs libc++ 998 * remove unneeded declarations in "compat.h" 999 * remove unused arg in add_branch() 1000 * allocate BBs after the guards 1001 * remove redundant check of _Bool bitsize 1002 * remove unused regno() 1003 * remove -finline-functions from CFLAGS 1004 * remove self-assignment of base_type 1005 * doc: fix list formatting 1006 * as-name: document that identifiers are OK for address spaces 1007 * add TODO list. 1008 * Sparse v0.6.0 1009 1010Ramsay Jones (9): 1011 * Makefile: use locally built sparse in the selfcheck target 1012 * sparsec: use a compatible exception model on cygwin 1013 * sparsei: add the --[no-]jit options 1014 * constant: add -Wconstant-suffix warning 1015 * pre-process: suppress trailing space when dumping macros 1016 * pre-process: print macros containing # and ## correctly 1017 * pre-process: don't put spaces in macro parameter list 1018 * pre-process: print variable argument macros correctly 1019 * pre-process: add the -dM option to dump macro definitions 1020 1021Randy Dunlap (6): 1022 * sparse: minor manpage corrections 1023 * Documentation: make data-structures.txt easier to read 1024 * Documentation: editing fixes in test-suite 1025 * lib.c: early return from handle_onoff_switch() 1026 * sparse: ignore indirect_branch attribute 1027 * sparse: option to print compound global data symbol info 1028 1029Thiebaud Weksteen (1): 1030 * Add testcases for bitwise cast on pointer 1031 1032Tycho Andersen (1): 1033 * expression.h: update comment to include other cast types 1034 1035Uwe Kleine-König (6): 1036 * build: make PREFIX overwritable from the environment 1037 * build: put comment about local.mk to the place where it is included 1038 * build: drop BASIC_CFLAGS and ALL_CFLAGS 1039 * build: drop -g from LDFLAGS 1040 * build: pass CPPFLAGS to compiler 1041 * build: only generate version.h when needed 1042 1043Vincenzo Frascino (1): 1044 * print address space number for cast-from-AS warnings 1045