aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation
AgeCommit message (Collapse)AuthorFilesLines
2025-09-28doc: update the instructions for mailing list subscriptionChangyuan Lyu1-2/+2
Majordomo commands are deprecated as per https://subspace.kernel.org/vger.kernel.org.html#what-happened-to-majordomo. Signed-off-by: Changyuan Lyu <changyuan.lv@gmail.com> Signed-off-by: Chris Li <sparse@chrisli.org>
2025-09-27doc: update maintainerChris Li1-2/+7
Chris Li is back as sparse maintainer. Signed-off-by: Chris Li <sparse@chrisli.org>
2024-01-07add .readthedocs.yamlLuc Van Oostenryck1-0/+1
Read the Docs now requires a config file in the project top directory. So, here it is. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2024-01-07doc: set 'en' as language in Sphinx's config fileLuc Van Oostenryck1-1/+1
Newer versions of Sphinx don't support 'None' for 'language'. So, set 'en' as language'. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2024-01-07doc: update conf.py for more recent version of sphinxLuc Van Oostenryck1-7/+1
Sphinx versions older than 1.7 don't need and don't support 'html_context'. So, set 1.8 as the minimal version and remove 'html_context' from the config. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2022-05-21fix one year off in v0.6.4's release notesLuc Van Oostenryck1-1/+1
Bernhard Voelker noticed that the date in the release notes is one year off. Fix this. Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2021-09-06Sparse v0.6.4v0.6.4Luc Van Oostenryck1-2/+2
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2021-09-01Add release notes for incoming v0.6.4Luc Van Oostenryck2-0/+106
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2021-04-17TODO: add some notes about pseudos being typelessLuc Van Oostenryck1-0/+11
Pseudos are untyped. It's usually OK because their type can nevertheless be retrieved in a simple way. But it also complicates things and worse in some cases the type is completely lost. Tell a bit more about it in the TODO file. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2021-03-08Merge branch 'uniq-phinode'Luc Van Oostenryck1-1/+1
* phi-sources can only have a single user (or none)
2021-03-08phi-sources can only have a single user (or none)Luc Van Oostenryck1-1/+1
Currently, OP_PHISOURCES have a list as member, 'phi_users', that should link to all phi-nodes using them but: *) phi-sources are never shared between phi-nodes *) this list is useless because it's only created during liveness and not used after. So, replace the list by a simple pointer to hold the unique phi-node using it and keep this link updated during all its lifetime. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-02-28slice: remove unneeded len from OP_SLICELuc Van Oostenryck1-1/+1
OP_SLICE::len is necessarily equal to the result size. So remove this redundancy. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-12-29packed: add support for __packed structLuc Van Oostenryck1-3/+0
Now that the 'packed' attribute is parsed and propagated into the type system, adapt the layout of structures. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-11-22Merge branch 'optim-cgoto' into nextLuc Van Oostenryck1-2/+9
* simplification of computed gotos with 1 or 2 targets
2020-11-21add a new instruction for label-as-valueLuc Van Oostenryck1-2/+9
Convert OP_SETVAL of a label into a new instruction: OP_LABEL. There is 2 reasons to do this: *) there is slightly less checking to be done in later phases (since OP_SETVAL can be for labels but also strings) *) OP_SETVAL is CSEd but this is largely useless because this instruction is hashed on the expression's address and these are (most) often not shared. With a separate instruction for label expressions, their CSE is now OK because the hashing is done on the BB. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-11-14doc: add header for flow simplification related documentationLuc Van Oostenryck1-0/+1
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-11-16doc: add header for optimization related documentationLuc Van Oostenryck1-0/+1
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-11-16doc: add some doc to flowgraph.hLuc Van Oostenryck1-0/+1
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-11-16doc: fix extracted autodoc when short description ends with a ?Luc Van Oostenryck1-2/+3
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-11-16doc: Sphinx's option ':noindex:' have been renamed into ':noindexentry:'Luc Van Oostenryck1-1/+1
and instead of keeping the old name for compatibility, no it's rejected. But well, purity of language is surely much more important than compatibility. *long deep sigh* So, use the new name (but it will for sure create problems when using an older version of Sphinx). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-11-01eval_insn: give an explicit type to compare's operandsLuc Van Oostenryck1-0/+1
The return type of IR instructions is stored in the field ::type of struct instruction and this struct has no space to hold the type of the operand(s). This is not a problem for most instructions because there is an easy way to get the operands' type. For example, for binops both types must be the same so they are used interchangeably. However, for compare instructions both types can be different and there is no easy way to get the type of the operands. Currently, this is ignored and creates some errors. It also blocks simplifications that need this type information. But compares instructions need only 2 operands, there is thus one 'slot' left. So, use this slot for the operands' type. This solves the current errors, allows new simplifications and has very little impact on existing code. Of course, this type information needs now to be tracked and adjusted whenever the operands change or an instruction is changed into a compare. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-11-01testsuite: add a new tag: check-output-returnsLuc Van Oostenryck1-0/+5
The current tags check-output-contains/excludes/pattern are quite powerful and the new check-output-match is easy to use but it can be even simpler. Indeed, a lot of IR simplifications/ canonicalizations can be tested by checking that the expression to be tested is equivalent to another one. This is less precise than some more specific tests but: * it's a big advantage because it's less sensitive to 'noise' like the exact number used by the pseudos or to the results of some new simplifications or canonicalizations * very often, this equivalence is what really matters and not the exact transformation. So, add a new utra-simple-to-use tag: just ask that all functions of the tests return the same specified value (usually 1): check-output-returns: <value> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-11-01testsuite: add a new tag: check-output-matchLuc Van Oostenryck1-0/+8
The current tags check-output-contains/excludes/pattern are quite powerful, universal, but they often need 'complex' regular expressions with escaping which make them not so nice to read. For testing IR results, a very common pattern is: this instruction must have this (kind of) operand. So, make a new tag for this. It does nothing than can't be done with done with the previous ones, on the contrary, but is much simpler to use: check-output-match(instruction): operand Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-10-18Sparse v0.6.3v0.6.3Luc Van Oostenryck1-2/+3
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-10-14update TODO listLuc Van Oostenryck1-8/+21
A few things are now done, remove them from the list, and add a few things that should be done. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-10-12Sparse v0.6.3-rc1v0.6.3-rc1Luc Van Oostenryck1-0/+1
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-10-12doc: add release notes for incoming v0.6.3Luc Van Oostenryck1-4/+54
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-09-07add support for a new instruction: OP_FMADDLuc Van Oostenryck1-0/+7
This will be the instruction for fused multiply-add but the motivation for it is some experimentation with the linearization of builtins. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-17union-cast: teach sparse about union castsLuc Van Oostenryck1-0/+5
A cast to union type is a GCC extension similar to a compound literal just for union, using the syntax of a cast. However, sparse doesn't know about them and treats them like other casts to non-scalars. So, teach sparse about them, convert them to the corresponding compound literal and add a warning flag to enable/disable the associated warning: -W[no-]union-cast. Note: a difference between union casts and compound literals is that the union casts yield rvalues while compound literals are lvalues but this distinction is not yet done in this series. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-10doc: add links to some external docLuc Van Oostenryck1-0/+5
One is a LWN article which covers sparse very well, the other is a pdf giving a short overview of sparse. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-10doc: use shorter titlesLuc Van Oostenryck4-9/+9
Mainly it's removing 'sparse' from the title. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-10doc: reorganize the table of contentLuc Van Oostenryck1-8/+8
Reorganize the table of of content with user documentation first then all documentation useful for development on sparse itself. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-10doc: move down info about tarballs, after git repositoriesLuc Van Oostenryck1-3/+2
Better to have the information about the GIT repositories first because I'm not sure if anyone still use the tarballs. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-10doc: decrease vertical spacingLuc Van Oostenryck1-0/+13
The vertical spacing in the generated HTML is a bit excessive to my taste. So decrease it somehow, especially the top of lists. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-10doc: make the sidebar more compactLuc Van Oostenryck1-0/+4
There is generous spacing in the sidebar, too generous. So, reduce it to something more compact, which will also allow more entries without scrolling. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-10doc: use a smaller logo in the sidebarLuc Van Oostenryck2-1/+10
The logo takes quite a bit height in the sidebar and so pushes the table of content too much at the bottom. Fix this by reducing the logo to 50%. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-09Merge branch 'doc-annot'Luc Van Oostenryck6-66/+113
* improve presentation of the doc, mainly the sidebar
2020-07-25doc: do not display bugzilla's URL, it's too longLuc Van Oostenryck1-2/+2
The full URL for bugzilla is quite long and was rendered as split into 2 lines which is quite ugly. So, do not show the URL but simply the hyperlink's name: "Linux kernel’s bugzilla for sparse". Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-07-25doc: use https URLsLuc Van Oostenryck1-2/+2
Use 'https' instead of 'http' for pages needing some level of trust. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-07-22doc: shorter title for "submitting-patches.md"Luc Van Oostenryck1-2/+2
The documentation for submitting patches has ": the sparse version" is in its title. This is quite useless and makes it longer than needed. So, remove this part from the title. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-03doc: remove link "edit on github"Luc Van Oostenryck1-0/+11
since the development isn't done on github, the link "edit on github" is useless and confusing. So remove this link (but leave the one "View page source" as it's sometimes quite handy). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-03doc: add index to the sidebarLuc Van Oostenryck1-0/+8
It's very useful to be able to access the index from the sidebar but no change in the configuration seems to allow this. Trying to abuse the toctree give the same result. So, add it directly via the template system. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-03doc: simplify the toctreeLuc Van Oostenryck1-21/+7
Combine the 'user' documentation with the one for developers and add captions for each sections in order to have this structuration visible in the sidebar. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-03doc: replace nocast-vs-bitwise document with its lore linkLuc Van Oostenryck2-44/+0
The nocast-vs-bitwise document was copied here to be sure to remain accessible but isn't really useful here now because: 1) the original document have also been archived to lore.kernel.org 2) nocast & bitwise have now been documented 3) 2) contains a link to 1) So, remove this redundant document. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-08-03doc: document the sparse's extensionsLuc Van Oostenryck2-0/+86
First try at documenting sparse's extensions to C's type system. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-21doc: update release notesLuc Van Oostenryck1-3/+9
Update the release notes with the changes since v0.6.2-rc1. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-21doc: add some info to the main pageLuc Van Oostenryck1-10/+30
Add some info about: * how to get sparse * how to install it, * the mailing list and how to report bugs. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-20doc: switch to the sphinx_rtd themeLuc Van Oostenryck1-1/+8
The generated documentation used Sphinx's classic/default theme but the one from readthedocs ('rtd', the same as used for the kernel) looks nicer, especially in the sidebar, and is not as large. So, for now, switch to the 'rtd' theme. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-16doc: reformulate an item in the TODOLuc Van Oostenryck1-2/+2
One of the item wasn't even grammatical. Reformulate it. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-16doc: fix markup in types.rst (s/```/``/)Luc Van Oostenryck1-9/+9
Literal text was marked with ``` but that's a bit excessive. Fix that by replacing these with ``. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-16doc: fix some typosLuc Van Oostenryck1-2/+2
Fix some silly typos. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-16doc: update TODOLuc Van Oostenryck1-1/+0
Support for __builtin_unreachable() was added in commit d2be323e25c3 ("teach sparse to linearize __builtin_unreachable()") So, remove this item from the TODO list. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-16doc: copy the old relnotes hereLuc Van Oostenryck15-0/+2731
The releases notes of the versions previously released are stored on the wiki. Copy them here too (with minimal changes in the markup), so that everything is centralized here. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-16doc: add intro stolen from the wikiLuc Van Oostenryck1-0/+37
The wiki has a small introduction but there is none here. So, copy this introduction from the wiki into the entrypoint of the documentation (and convert the wikimedia markup into restructuredtext). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-15doc: minimal version for Sphinx is 1.7Luc Van Oostenryck1-1/+1
Because of the changes needed after the removal of the obsolete sphinx.ext.autodoc.AutodocReporter, the minimal version of Sphinx is 1.7 (the first one containing switch_source_input()). So, update this information in the conf file. Fixes: b741a793e63c0fd4a333cd575ac2339f5a9b2698 Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-16doc: fix code-block formatting in v0.6.2 relnotesLuc Van Oostenryck1-1/+1
The small code example at the top was in normal text-style (which is fine) but was lacking the newline between the two statements (which is much less fine). Fix this by using a '::' instead of a ':' to trigger the literal-code-block-and-more style. Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-14doc: reindent the sublists in the relnotesLuc Van Oostenryck1-69/+67
The html-generated version of the release notes looked terrible because the used indentation was too small. Fix this by indenting the sublists by 4 instead of 2 Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-14doc: correct some spellingRamsay Jones1-4/+4
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-13doc: show the ToC in the sidebarLuc Van Oostenryck1-6/+1
With the configured theme, 'classic', the table of contents didn't show up in the sidebar. It seems it was because 'html_sidebars' was partially set in conf.py, overhidding the theme defaults. Fix this by removing 'html_sidebars' from the config. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-13doc: add release notes for incoming v0.6.2Luc Van Oostenryck3-0/+115
Currently, the release notes are kept on the wiki which contains nothing else but a small intro. The docs are certainly as good as this wiki to keep these release notes. So, let try this for now. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-12doc: move meta-doc to its own sectionLuc Van Oostenryck1-1/+7
The documentation about the documentation is in the middle of the documentation about sparse itself. Move it to its own section. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-06-12doc: add some doc for the type systemLuc Van Oostenryck2-0/+166
Sparse's type system, or more exactly the way types are encoded in Sparse's data structures, is not hard but is also not exactly immediate to grok. Here is a modest attempt to document this. The corresponding generated documentation can be find at: https://sparse.docs/kernel.org Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-05-15doc: remove done item from the TODOLuc Van Oostenryck1-6/+0
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-05-15doc: fix the warnings when building the docLuc Van Oostenryck2-17/+23
It seems that Markdown is now parsed slightly differently and now generate some warnings. So tweak the .md files to shut up the warnings. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-05-15doc: do not use obsolete sphinx.ext.autodoc.AutodocReporterLuc Van Oostenryck1-5/+5
sphinx.ext.autodoc.AutodocReporter is obsolete since Sphinx 1.7 and removed in some later versions. So, replace it by the code suggested in the release notes when it was obsoleted. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2020-03-20add instruction OP_UNREACHLuc Van Oostenryck1-0/+3
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2019-10-13doc: fix typo in binops' descriptionLuc Van Oostenryck1-2/+2
Both operands of integer & floating-point binops are described as being '.src1' but, of course, the second one should be '.scr2'. Fix the typo. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-12-26add TODO list.Luc Van Oostenryck3-52/+99
The Documentation directory contains a 'project ideas' document. But some of the entries there are outdated, some are questionable and some more are simply not clear about the problem or the goal. Some important entries are also missing. So, remove what's needed to be removed, reformulate unclear entries and add a bunch of new things that should be done. Also, rename the file to 'TODO.md' as this express more clearly the intent of the document. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-09-06Merge branches 'missing-return' and 'fix-logical-phi' into tipLuc Van Oostenryck1-0/+1
* fix linearization/SSA when missing a return * fix linearization/SSA of (nested) logical expressions
2018-09-05add linearization as a passLuc Van Oostenryck1-0/+1
If linearize_symbol() is called, it's meaningless to disable linearization. As such, linearization was not really considered as a pass. More exactly, there is no '-flinearize...' flag since -flinearize-enable & -flinearize-disable are both meaningless. However, -flinearize=last can be very useful for testing. So, recognize 'linearize' as a pass and leave -flinearize-{en,dis}able without effect. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-08-25symaddr: s/insn->symbol/insn->src/Luc Van Oostenryck1-6/+6
OP_SYMADDR take a single operand 'symbol' but this instruction is very much like other unops and using the same operand's name allow to avoid some special cases. So, s/symbol/src/ for OP_SYMADDRs. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-08-25Merge branch 'ssa' into tipLuc Van Oostenryck1-0/+8
* do 'classical' SSA conversion (via the iterated dominance frontier). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-08-21doc: add doc for simplification notationLuc Van Oostenryck1-0/+5
The documention of each simplications is quite dense and use some implicit conventions for its notation. Document this notation. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-08-21doc: automatically insert the blank line for listsLuc Van Oostenryck1-0/+3
ReST requires a blank line to start a list. This is a bit annoying for the internal documentation because this makes, IMO, things less readable in the code. Tweak the documentation extraction tool to automatically insert these blank lines (between a line ending with ':' and the next one if not empty). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-08-21doc: simplify the creation of the viewlistLuc Van Oostenryck1-6/+5
Each bloc-comment is entered in the view list as a single multiline plus a final blank line. This is more complicated than needed and it's useless to first concatenate these lines to split them directly after. Also it makes harder to correctly track the line numbers. Fix this by adding the lines one by one, each with their own lineno. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-07-01dom: add some debugging for the dominance treeLuc Van Oostenryck1-0/+4
So, it's possible to use the flag '-vdomtree' to dump the domonance tree. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-07-01graph: add debugging for (reverse) postorder traversalLuc Van Oostenryck1-0/+4
Just use the flag '-vpostorder' to dump the links once calculated. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-28bool: remove OP_{AND,OR}_BOOL instructionsLuc Van Oostenryck1-8/+0
Now that these instructions are not generated anymore, we can remove all related code, defines and doc. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-23cast: specialize integer castsLuc Van Oostenryck1-4/+7
Casts to integer used to be done with only 2 instructions: OP_CAST & OP_SCAST. Those are not very convenient as they don't reflect the real operations that need to be done. This patch specialize these instructions in: - OP_TRUNC, for casts to a smaller type - OP_ZEXT, for casts that need a zero extension - OP_SEXT, for casts that need a sign extension - Integer-to-integer casts of the same size are considered as a NOPs and are, in fact, never emitted. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-23cast: make casts from pointer always size preservingLuc Van Oostenryck1-1/+1
Currently casts from pointers can be done to any integer type. However, casts to (or from) pointers are only meaningful if it preserves the value and thus done between same-sized objects. To avoid to have to worry about sign/zero extension while doing casts to pointers it's good to not have to deal with such casts. Do this by doing first a cast to an unsigned integer of the same size as a pointer and then, if needed, doing to cast to the final type. As such we have only to support pointer casts to unsigned integers of the same size and on the other hand we have the generic integer-to-interger casts we to support anyway. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-23cast: specialize cast from pointersLuc Van Oostenryck1-2/+8
Currently all casts to pointers are processed alike. This is simple but rather unconvenient in later phases as this correspond to different operations that obeys to different rules and which later need extra checks. Change this by using a specific instructions (OP_UTPTR) for [unsigned] integer to pointers. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-23cast: make pointer casts always size preservingLuc Van Oostenryck1-1/+1
Currently casts to pointers can be done from any integer types. However, casts to (or from) pointers are only meaningful if value preserving and thus between objects of the same size. To avoid to have to worry about sign/zero extension while doing casts to pointers it's good to only have to deal with the value preserving ones. Do this by doing first, if needed, a cast an integer of the same size as a pointer before doing the cast to a pointer. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-23cast: specialize casts from unsigned to pointersLuc Van Oostenryck1-0/+3
Currently all casts to pointers are processed alike. This is simple but rather unconvenient as it correspond to different operations that obeys to different rules and which later need extra checks. Change this by using a specific instructions (OP_UTPTR) for unsigned integer to pointers. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-23cast: specialize floats to integer conversionLuc Van Oostenryck1-0/+6
Currently, casts from floats to integers are processed like integers (or any other type) to integers. This is simple but rather unconvenient as it correspond to different operations that obeys to different rules and which later need extra checks. Change this by directly using specific instructions: - FCVTU for floats to unsigned integers - FCVTS for floats to signed integers Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-23cast: specialize FPCAST into [USF]CVTFLuc Van Oostenryck1-3/+9
Currently, all casts to a floating point type use OP_FPCAST. This is maybe simple but rather uncovenient as it correspond to several quite different operations that later need extra checks. Change this by directly using different instructions for the different cases: - FCVTF for float-float conversions - UCVTF for unsigned integer to floats - SCVTF for signed integer to floats and reject attempts to cast a pointer to a float. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-16doc: add doc for the -vcompound flagLuc Van Oostenryck1-0/+4
The -vcompound wasn't documented. Fix this by adding a very short description for it. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org>
2018-06-12Merge branches 'has-builtin' and 'builtin-predef' into tipLuc Van Oostenryck1-0/+1
This will merge the following topic branches: * builtin-dyn: Expansion of macros like __FILE__, __DATE__, ... must, contrary to usual macros, be done dynamically. This series improves support for them: - consider them as defined (like GCC do) - use table + method for their expansion (avoid useless compares) - add support for __INCLUDE_LEVEL__ & __BASE_FILE__ * builtin-predef: Add a function: predefine() which allow to directly add the definition of a simple macro (without args and with a single number or ident as definition). Also do the conversion of the concerned predefined macros and some cleanups. * builtin-overflow: Add support for builtins doing overflow checking. * has-builtin: Add support for the __has_builtin() macro. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-11doc: API before IRLuc Van Oostenryck1-1/+1
The sparse API is more important than the details about the IR. So move the API doc before the IR doc. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-08utils: add xmemdup() & xstrdup()Luc Van Oostenryck1-0/+1
Add small helpers for copying a memory buffer or a string into a newly allocated buffer. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: add sphinx domain for IR instruction indexationLuc Van Oostenryck4-74/+160
The doc for IR instructions used definition lists to structure the instructions names and their description. This is simple to write and present well but it doesn't put the instructions' name in the index. Fix this by adding a new domain, with a single directive 'op' which takes the instruction name, inserts an index entry and uses it for the definition. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: convert IR.md to reSTLuc Van Oostenryck2-356/+405
The doc for IR instructions was written in MarkDown format which is quite easy and quite close to normal text. However Markdown has a few limitations: 1) structuration via level-x headings is not nice when rendered 2) it would be nice to have the instructions in the index So convert this in reStructuredText format as it will directly solve problme 1) and prepare to solve problem 2) Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: document a few more APIs to test multilineLuc Van Oostenryck1-0/+10
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: support muti-line param & return descriptionsLuc Van Oostenryck1-3/+17
Short descriptions are good but sometimes you can't describe thinsg well enough with a single line. So, add support for multi-line descriptions. The additional lines need to be indented with a tab to be recognized as such. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: add a small cheatsheet for reST markupLuc Van Oostenryck1-0/+119
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: by default disable syntax highlightingLuc Van Oostenryck1-0/+2
Syntax highlighting is great for code but by default sphinx consider literal sections as code and will thus hightlight every python keyword ('is', 'and', 'or', ...). It's quite annoying. So disable default syntax highlighting, real piece of code can still be nicely hightlight by using a 'code-block': .. code-block:: c Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: doc the docLuc Van Oostenryck2-0/+33
Add some documentation about the autodoc support and the syntax to use for API documentation embedded into the code. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: add markup to argument's referencesLuc Van Oostenryck1-0/+7
The syntax for a parameter is '@<name>'. Let also use this when referencing a parameter name in another section (other parameters or long description) and mark these references in bold (the same as the parameters themseelves are presented). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: add doc from ptrlist.cLuc Van Oostenryck2-0/+12
Use the doc added to ptrlist.c as an example/base for API documentation. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: add a sphinx c:autodoc directive for the extracted docLuc Van Oostenryck2-3/+56
Add a sphinx extension for the c:autodoc directive which will extract the doc and inject it into the document tree. This part is based on Jani Nikula's project: hawkmoth [1] which has exactly the same goal as this series but which use clang to parse the C code and extract the bloc-coments. [1] https://github.com/jnikula/hawkmoth Based-on-work-by: Jani Nikula <jani@nikula.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: convert extracted doc to reSTLuc Van Oostenryck1-13/+59
The extracted doc can't be used as is by sphinx as it needs to have some additional annotations. Convert the extracted doc into a true reST format wich can directy be used by sphinx. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21autodoc: extract doc from the C filesLuc Van Oostenryck1-0/+197
Add a tool which parse comment from source files and extract kerneldoc-like documentation from them. Note: this is rather quite crude, support only generic 'blocs' and doc for functions; it has no support for anything else. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: use reST for manpagesLuc Van Oostenryck3-43/+46
MarkDown is really nice and easy to get something quickly but for manpages, the rendering is not really nice and lack index entries. reST has a special syntax for option lists but: 1) not all option syntax are recognized (for example when we use [xyz] to to show that xyz is optionnal). 2) when converted to HTML, a table is used for the list but: * options that are too long break the presentation * unrecognized options break the table 3) the options are also not put in the index Solve this by using reST with '.. option::' directives. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: format dev-options.md as a man pageLuc Van Oostenryck4-8/+22
The file dev-options.md contains the description for extra options not useful for sparse itself and its users but well to sparse's developers and for tools like test-linearize. Since it's a complement to the main man-page, format it at such. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: the testsuite doc in reSTLuc Van Oostenryck3-151/+170
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: move sparse.txt to markdown and rename itLuc Van Oostenryck3-45/+48
The file 'sparse.txt' contains some explanation about the differences between the attributes 'nocast' and 'bitwise'. It's valuable information. So convert it to markdown syntax and rename it to a more self-explanatory name. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: allow .md with py3-sphinxLuc Van Oostenryck1-3/+10
The current support for markdown source files is fine for py2-sphinx but not for py3. Fix it by checking python's version and add the reference to the mardown parser module accordingly. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: set primary domain to CLuc Van Oostenryck1-0/+3
This doesn't change much but allows to be a bit more lazy and write .. <directive>:: .. code-block:: instead od .. c:<directive>:: .. code-block:: c I understood that this should also show in the index "... (function)" instead of "... (C function)" but this doesn't seems to be the case. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: automatically get the versionLuc Van Oostenryck1-3/+3
Documentation generated by sphinx reference the version of the project being documented. This version need to be specified via sphinx's config file. However, if this version number is simply added there, it's guaranteed that soon or later it will be out-of-synch with git's version tag (or the version number present in the Makefile). Fix this by trying to read the version from git or, if this fails, from the Makefile. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: automatically set the copyright dateLuc Van Oostenryck1-1/+2
Sphinx allow to set the copyright date; I would hate to have to update this every year, so let generate it automatically. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: add logoLuc Van Oostenryck2-1/+95
A logo is always nice fot a project, so add one. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: add minimal support for sphinx-docLuc Van Oostenryck4-0/+210
With this we can generate HTML for the docs in this directory. For the moment, more as an experiment as anything else, this doc is available at http://sparse-doc.rtfd.io Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: fix headingsLuc Van Oostenryck1-3/+2
To have proper entris in the index pages, we need to use headings consistently. Fix the few headings that used some headings non-consistent with the others. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-21doc: fix markdown syntaxLuc Van Oostenryck1-11/+11
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-04testsuite: add check-assertLuc Van Oostenryck1-0/+4
Ideally, the testcases should be universal but it happen than some of them need to test some specificities or are meaningless or plainly wrong in some situations. In such cases, these tests must but ignored. Currently, the only the only mechanisms a test are: 1) ignoring the tests depending on a tool which cannot be compiled (like, for example, those using sparse-llvm when LLVM is not installed. 2) some rather corse criteria using the name of the arch used to run the tests. Allow more flexibility by allowing to exclude some tests based on the success or failure of an arbitrary condition via _Static_assert(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-05-04testsuite: add check-cp-ifLuc Van Oostenryck1-0/+4
Ideally, the testcases should be universal but it happen than some of them need to test some specificities or are meaningless or plainly wrong in some situations. In such cases, these tests must but ignored. Currently, the only the only mechanisms a test are: 1) ignoring the tests depending on a tool which cannot be compiled (like, for example, those using sparse-llvm when LLVM is not installed. 2) some rather corse criteria using the name of the arch used to run the tests. Allow more flexibility by allowing to exclude some tests based on the evaluation of some pre-processor expression at test-time. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-03-19doc: document the debug flagsLuc Van Oostenryck1-0/+6
The flags -ventry & -vdead were not documented. Fix this now by adding a small explanation. Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-03-19doc: options.md is for developmentLuc Van Oostenryck1-4/+3
The purpose of the file 'options.md' was rather vague. Make it now explicit that it's to document options useful for development. Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-03-01IR: let OP_COMPUTEGOTO use .src instead of .targetLuc Van Oostenryck1-1/+1
In struct instruction, .target is normally used to hold the result. Its value is thus produced/defined by instructions. However, OP_COMPUTEDGOTO use .target as an input. This creates slight complications for code, like liveness analysis, which care about which fields are used and which are defined by the instructions. Change this by letting OP_COMPUTEDGOTO use .src for its operand instead of .target. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-03-01IR: let .cond unionize with .src and not .targetLuc Van Oostenryck1-1/+1
In struct instruction, .target is normally used to hold the result. Its value is thus produced/defined by instructions. On the contrary, .cond is used as an input value and is thus used by instructions. However, these two fields belong to the same union. This creates slight complications for code, like liveness analysis which care about which fields are used and which are defined by the instructions. Change this by unionizing .cond with .src, .src1 & friends instead of with .target. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-03-01IR: remove never-generated instructionsLuc Van Oostenryck1-10/+0
Some of the IR instructions have been defined but are never generated. Remove them as they have no purposes. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-03-01IR: remove now unused OP_LNOP & OP_SNOPLuc Van Oostenryck1-6/+0
No instructions have an opcode set to OP_[LS]NOP anymore so we can now remove all remaining traces of these opcode. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-03-01IR: fix typo in IR docLuc Van Oostenryck1-1/+1
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-02-20no need for signed & unsigned multiplicationLuc Van Oostenryck1-5/+2
Currently, we have OP_MULS & OP_MULU but unless it's full, widening multiplication both must give exactly the same result (the world run on 2's complement CPUs now, right?). Also, the IR doesn't have widening multiplication but only instruction where both operands and the result have the same size. So, since theer is no reasons to keep 2 instructions, merge OP_MULS & OP_MULU into a single one: OP_MUL. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-02-08Merge branches 'cse-setfval' and 'extract-eval' into tipLuc Van Oostenryck2-57/+58
2018-01-24Documentation: editing fixes in test-suiteRandy Dunlap1-4/+4
Fix typos, grammar, punctuation, and spelling in Documentation/test-suite. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Cc: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-01-21Documentation: make data-structures.txt easier to readRandy Dunlap1-53/+54
Make this file easier to read by removing the name at the beginning of each line. Put its source and attribution at the beginning of the file. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-01-08add OP_SETFVALLuc Van Oostenryck1-4/+8
OP_SETVAL is used to create floating-point and string as well as labels-as-values. This multi-purpose aspect sometimes make things a bit more complicated. Change this by using a new instruction for the direct creation of floating-point literals without needing to have an intermediate EXPR_FVALUE. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-18add support of floating-point specific arithmetic opsLuc Van Oostenryck1-11/+35
Floating-point arithmetic is quite different from the arithmetic on integers or the one of real numbers. In particular, most transformations, simplifications that can be done on integers are invalid when done on floats. For example: - associativity doesn't hold - distributivity doesn't hold - comparison is tricky & complex This is because (among others things): - limited precision, rounding everywhere - presence of signed zeroes - presence of infinities - presence of NaNs (signaling or quiet) - presence of numbers without inverse - several kind of exceptions. Since they don't follow the same rules as their integer counterpart, better to give them a specific opcode instead of having to test the type of the operands at each manipulation. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-18fix support of floating-point compareLuc Van Oostenryck1-1/+55
Comparision of floating-point values can't be done like for integral values because of the possibility to have NaNs which can't be ordered with normal values or even between themselves. The real difference appears once there is any "reasoning" done with the result of the comparison. For example, once NaNs are taken in account: "!(a < b)" and "(a >= b)" are not the same. In fact the usual comparison operators must be reinterpreted as implicitely first testing if any of the operand is a Nan and return 'false' if it is the case. Thus "a < b" becomes "!isnan(a) && !isnan(b) && (a < b)". If we need to negate the comparison we get "!(a < b)" which naturally becomes "isnan(a) || isnan(b) || (a >= b)". We thus need two sets of operators for comparison of floats: one for the "ordered" values (only true if neither operand is a Nan) and one for the "values" (also true if either operand is a NaN). A negation of the comparison switch from one of the set to the other. So, introduce another set of instructions for the comparison of floats. Note: the C standard requires that: *) "x == x" is false if x is a NaN, *) "x != x" is true if x is a NaN, and this is coherent with "x != x" <-> "!(x == x)". Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-17add doc about sparse's instructions/IRLuc Van Oostenryck1-0/+293
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-13Merge branch 'dump-ir' into tipLuc Van Oostenryck1-0/+29
2017-11-13dump-ir: make it more flexibleLuc Van Oostenryck1-0/+11
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-12dump-ir: allow to specify the passes to execute via cli's optionsLuc Van Oostenryck1-0/+18
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-08testsuite: allow arch-specific testsLuc Van Oostenryck1-0/+5
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-11-08testsuite: simplify documentationLuc Van Oostenryck1-13/+13
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-09-16testsuite: obsolete old pattern checking syntaxLuc Van Oostenryck1-4/+0
The old syntax is kept for now to avoid too much conflits in pending branches. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-09-16testsuite: new eq/min/max syntax for pattern checkingLuc Van Oostenryck1-0/+6
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-08-11Merge remote-tracking branch 'luc/remove-singlestore-shortcut'Christopher Li1-0/+4
Signed-off-by: Christopher Li <sparse@chrisli.org>
2017-08-10documentation: update email reference linkRandy Dunlap1-1/+1
gmane.org was shut down for awhile, then bought by someone else, and is now being rebuilt. Links to it are not reliable for now, so add a link to marc.info for the same email message. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Christopher Li <sparse@chrisli.org>
2017-08-10Documents: project ideasChristopher Li1-0/+52
Adding project ideas to improve sparse. Signed-off-by: Christopher Li <sparse@chrisli.org>
2017-08-10Adding document for sparse patch submit processChristopher Li1-0/+21
Reference to the linux kernel patches submitting process and difference to sparse. Signed-off-by: Christopher Li <sparse@chrisli.org>
2017-08-09testsuite: add support for commands with timeoutLuc Van Oostenryck1-0/+4
Tests taking a huge or infinite amout of time is a problem for the testsuite. Furthermore, it's most often the sign of a problem somewhere. Fix this by adding some support to use an optional timeout for each testcase command. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-02-13testsuite: check the nbr of times a pattern should be presentLuc Van Oostenryck1-0/+4
Complement the 'check-output-contains/excludes' tags to also be able to specify the number of times a given pattern should occurs in the output. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
2017-02-13testsuite: check patterns presence or absence in outputLuc Van Oostenryck1-0/+10
Currently the test suite always check the exit value and the output of the command used for the test. This is fine and allow use to catch the most common situations: - failure or crash (via the exit value) - (un)expected output (like when testing the result of the preprocessor) - (un)expected errors & warnings (like when testing sparse's warnings) But sometimes, we're not interested in the output as such because it can't be compared textually to some reference. This occurs systematically when testing the output of test-linearize or test-unssa which emits labels names which are in fact pointer values and which exact output is very sensitive to any change in processing order, optimizations, ... But useful tests can be easily made by just checking for the presence or absence of some identifiers, or more generally some patterns. This patch allow to do that by adding support for two new tags (check-output-contains & check-output-excludes), telling to test suite to verifiy that the given patterns are effectively present ot absent from the output of the tested file. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
2017-02-13testsuite: add tag to ignore the output/errorLuc Van Oostenryck1-0/+6
Currently the test suite always check the exit value and the output of the command used for the test. This is fine and allow use to catch the most common situations: - failure or crash (via the exit value) - (un)expected output (like when testing the result of the preprocessor) - (un)expected errors & warnings (like when testing sparse's warnings) But sometimes, we're not interested in the output or the output (as is) is simply not meaningful for the test or can't be compared textually to some reference. This patch add two new tags (check-output-ignore & check-error-ignore), telling to test suite to ignore the content of stdout or stderr when testing this file. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
2012-05-19I have updated the sparse.1 man page including the __bitwiseShakthi Kannan1-0/+45
relevant content, and created Documentation/sparse.txt with the complete comparison between __nocast vs __bitwise. Signed-off-by: Shakthi Kannan <shakthimaan@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
2008-12-18A slightly edited irc discussion with Josh Triplett.Alexey Zaytsev1-0/+54
Describes most data srtructures used in sparse.
2007-07-22Fix typos in test-suite documentationJosh Triplett1-1/+1
Signed-off-by: Josh Triplett <josh@freedesktop.org>
2007-07-08test-suite documentationDamien Lespiau1-0/+112
A quick description of test-suite usage. Signed-off-by: Damien Lespiau <damien.lespiau@gmail.com>