summaryrefslogtreecommitdiffstats
path: root/llvm/docs
Commit message (Collapse)AuthorAgeFilesLines
...
* Revamp test-suite documentationMatthias Braun2018-08-316-233/+428
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove duplication: Both TestingGuide and TestSuiteMakefileGuide would give a similar overview over the test-suite. - Present cmake/lit as the default/normal way of running the test-suite: - Move information about the cmake/lit testsuite into the new TestSuiteGuide.rst file. Mark the remaining information in TestSuiteMakefilesGuide.rst as deprecated. - General simplification and shorting of language. - Remove paragraphs about tests known to fail as everything should pass nowadays. - Remove paragraph about zlib requirement; it's not required anymore since we copied a zlib source snapshot into the test-suite. - Remove paragraph about comparison with "native compiler". Correctness is always checked against reference outputs nowadays. - Change cmake/lit quickstart section to recommend `pip` for installing lit and use `CMAKE_C_COMPILER` and a cache file in the example as that is what most people will end up doing anyway. Also a section about compare.py to quickstart. - Document `Bitcode` and `MicroBenchmarks` directories. - Add section with commonly used cmake configuration options. - Add section about showing and comparing result files via compare.py. - Add section about using external benchmark suites. - Add section about using custom benchmark suites. - Add section about profile guided optimization. - Add section about cross-compilation and running on external devices. Differential Revision: https://reviews.llvm.org/D51465 llvm-svn: 341260
* [llvm-mca] Report the number of dispatched micro opcodes in the ↵Andrea Di Biagio2018-08-301-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DispatchStatistics view. This patch introduces the following changes to the DispatchStatistics view: * DispatchStatistics now reports the number of dispatched opcodes instead of the number of dispatched instructions. * The "Dynamic Dispatch Stall Cycles" table now also reports the percentage of stall cycles against the total simulated cycles. This change allows users to easily compare dispatch group sizes with the processor DispatchWidth. Before this change, it was difficult to correlate the two numbers, since DispatchStatistics view reported numbers of instructions (instead of opcodes). DispatchWidth defines the maximum size of a dispatch group in terms of number of micro opcodes. The other change introduced by this patch is related to how DispatchStage generates "instruction dispatch" events. In particular: * There can be multiple dispatch events associated with a same instruction * Each dispatch event now encapsulates the number of dispatched micro opcodes. The number of micro opcodes declared by an instruction may exceed the processor DispatchWidth. Therefore, we cannot assume that instructions are always fully dispatched in a single cycle. DispatchStage knows already how to handle instructions declaring a number of opcodes bigger that DispatchWidth. However, DispatchStage always emitted a single instruction dispatch event (during the first simulated dispatch cycle) for instructions dispatched. With this patch, DispatchStage now correctly notifies multiple dispatch events for instructions that cannot be dispatched in a single cycle. A few views had to be modified. Views can no longer assume that there can only be one dispatch event per instruction. Tests (and docs) have been updated. Differential Revision: https://reviews.llvm.org/D51430 llvm-svn: 341055
* [llvm-mca] Add fields "Total uOps" and "uOps Per Cycle" to the report ↵Andrea Di Biagio2018-08-291-20/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | generated by the SummaryView. This patch adds two new fields to the perf report generated by the SummaryView. Fields are now logically organized into two small groups; only the second group contains throughput indicators. Example: ``` Iterations: 100 Instructions: 300 Total Cycles: 414 Total uOps: 700 Dispatch Width: 4 uOps Per Cycle: 1.69 IPC: 0.72 Block RThroughput: 4.0 ``` This patch also updates the docs for llvm-mca. Due to the nature of this change, several tests in the tools/llvm-mca directory were affected, and had to be updated using script `update_mca_test_checks.py`. llvm-svn: 340946
* [benchmark] NFC: Turn benchmark ON on all non-Windows buildbotsKirill Bobyrev2018-08-291-1/+2
| | | | | | | | | The problems with benchmark build should be fixed now, but Windows buildbots still run into errors seemingly because of the bug in clang-cl. Because of that, benchmark shouldn't be built on Windows at this point. llvm-svn: 340905
* [XRay][docs] Chrome Trace Viewer InstructionsDean Michael Berris2018-08-281-2/+16
| | | | | | | This patch adds an example on how to generate a Chrome Trace Viewer loadable trace from an XRay trace. llvm-svn: 340847
* [XRay][docs] Update instructionsDean Michael Berris2018-08-281-1/+1
| | | | | | | Add `xray_mode=xray-basic` to the list of options in the "further exploration" section of the doc. llvm-svn: 340843
* [benchmark] Stop building benchmarks by defaultKirill Bobyrev2018-08-281-1/+1
| | | | | | | | | | | | | Although the benchmark regex-related build issue seems to be fixed, it appears that benchmark library triggers some stage 2 clang-cl bugs: http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/13495/steps/build%20stage%202/logs/stdio The only sensible option now is to prevent benchmark library from building in the default configuration. llvm-svn: 340836
* Pull google/benchmark library to the LLVM treeKirill Bobyrev2018-08-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch pulls google/benchmark v1.4.1 into the LLVM tree so that any project could use it for benchmark generation. A dummy benchmark is added to `llvm/benchmarks/DummyYAML.cpp` to validate the correctness of the build process. The current version does not utilize LLVM LNT and LLVM CMake infrastructure, but that might be sufficient for most users. Two introduced CMake variables: * `LLVM_INCLUDE_BENCHMARKS` (`ON` by default) generates benchmark targets * `LLVM_BUILD_BENCHMARKS` (`OFF` by default) adds generated benchmark targets to the list of default LLVM targets (i.e. if `ON` benchmarks will be built upon standard build invocation, e.g. `ninja` or `make` with no specific targets) List of modifications: * `BENCHMARK_ENABLE_TESTING` is disabled * `BENCHMARK_ENABLE_EXCEPTIONS` is disabled * `BENCHMARK_ENABLE_INSTALL` is disabled * `BENCHMARK_ENABLE_GTEST_TESTS` is disabled * `BENCHMARK_DOWNLOAD_DEPENDENCIES` is disabled Original discussion can be found here: http://lists.llvm.org/pipermail/llvm-dev/2018-August/125023.html Reviewed by: dberris, lebedev.ri Subscribers: ilya-biryukov, ioeric, EricWF, lebedev.ri, srhines, dschuff, mgorny, krytarowski, fedor.sergeev, mgrang, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D50894 llvm-svn: 340809
* LangRef: Clarify expected sNaN behavior for minnum/maxnumMatt Arsenault2018-08-271-10/+27
| | | | | | | This matches the de-facto behavior based on constant folding and the default lowering to fmin/fmax. llvm-svn: 340762
* [llvm-mca] Improved report generated by the SchedulerStatistics view.Andrea Di Biagio2018-08-271-7/+13
| | | | | | | | | | | | | Before this patch, the SchedulerStatistics only printed the maximum number of buffer entries consumed in each scheduler's queue at a given point of the simulation. This patch restructures the reported table, and adds an extra field named "Average number of used buffer entries" to it. This patch also uses different colors to help identifying bottlenecks caused by high scheduler's buffer pressure. llvm-svn: 340746
* [IR] Replace `isa<TerminatorInst>` with `isTerminator()`.Chandler Carruth2018-08-261-2/+2
| | | | | | | | | | | | This is a bit awkward in a handful of places where we didn't even have an instruction and now we have to see if we can build one. But on the whole, this seems like a win and at worst a reasonable cost for removing `TerminatorInst`. All of this is part of the removal of `TerminatorInst` from the `Instruction` type hierarchy. llvm-svn: 340701
* [llvm] Document "%T" as deprecated in CommandGuide/lit.rstKuba Mracek2018-08-251-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D48842 llvm-svn: 340677
* Allow creating llvm::Function in non-zero address spacesAlexander Richardson2018-08-231-8/+17
| | | | | | | | | | | | | | | | | | | | Most users won't have to worry about this as all of the 'getOrInsertFunction' functions on Module will default to the program address space. An overload has been added to Function::Create to abstract away the details for most callers. This is based on https://reviews.llvm.org/D37054 but without the changes to make passing a Module to Function::Create() mandatory. I have also added some more tests and fixed the LLParser to accept call instructions for types in the program address space. Reviewed By: bjope Differential Revision: https://reviews.llvm.org/D47541 llvm-svn: 340519
* [AArch64] Add Tiny Code Model for AArch64David Green2018-08-221-0/+1
| | | | | | | | | | | | | | This adds the plumbing for the Tiny code model for the AArch64 backend. This, instead of loading addresses through the normal ADRP;ADD pair used in the Small model, uses a single ADR. The 21 bit range of an ADR means that the code and its statically defined symbols need to be within 1MB of each other. This makes it mostly interesting for embedded applications where we want to fit as much as we can in as small a space as possible. Differential Revision: https://reviews.llvm.org/D49673 llvm-svn: 340397
* [docs][gold] Fix a typoFangrui Song2018-08-211-1/+1
| | | | llvm-svn: 340335
* [docs] Fix a small typo in a debug info exampleAlex Langford2018-08-211-1/+1
| | | | llvm-svn: 340246
* Updating MergeFunctions.rstAditya Kumar2018-08-181-191/+174
| | | | | | | | | Improving readability, removing redundant contents. Reviewers: hiraditya Differential Revision: https://reviews.llvm.org/D50686 llvm-svn: 340131
* [x86/MIR] Implement support for pre- and post-instruction symbols, asChandler Carruth2018-08-161-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | well as MIR parsing support for `MCSymbol` `MachineOperand`s. The only real way to test pre- and post-instruction symbol support is to use them in operands, so I ended up implementing that within the patch as well. I can split out the operand support if folks really want but it doesn't really seem worth it. The functional implementation of pre- and post-instruction symbols is now *completely trivial*. Two tiny bits of code in the (misnamed) AsmPrinter. It should be completely target independent as well. We emit these exactly the same way as we emit basic block labels. Most of the code here is to give full dumping, MIR printing, and MIR parsing support so that we can write useful tests. The MIR parsing of MC symbol operands still isn't 100%, as it forces the symbols to be non-temporary and non-local symbols with names. However, those names often can encode most (if not all) of the special semantics desired, and unnamed symbols seem especially annoying to serialize and de-serialize. While this isn't perfect or full support, it seems plenty to write tests that exercise usage of these kinds of operands. The MIR support for pre-and post-instruction symbols was quite straightforward. I chose to print them out in an as-if-operand syntax similar to debug locations as this seemed the cleanest way and let me use nice introducer tokens rather than inventing more magic punctuation like we use for memoperands. However, supporting MIR-based parsing of these symbols caused me to change the design of the symbol support to allow setting arbitrary symbols. Without this, I don't see any reasonable way to test things with MIR. Differential Revision: https://reviews.llvm.org/D50833 llvm-svn: 339962
* [docs] Try to clarify the FuzzingLLVM docsJustin Bogner2018-08-161-2/+8
| | | | | | | | | Try to improve these docs based on some recent questions that were sent to llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2018-August/125329.html llvm-svn: 339949
* Update the coding standards and developer policy documentation surrounding ↵Aaron Ballman2018-08-103-3/+16
| | | | | | | | whitespace. Clarify that you should not introduce trailing whitespace when making a commit and that you should not remove trailing whitespace that's unrelated to code you are changing or are about to change. Then clarified the developer policy around what is considered an obvious whitespace commit. llvm-svn: 339455
* Add a CommandGuide for llvm-objdumpMichael Trent2018-08-083-0/+119
| | | | | | | | | | | | | | | | Summary: Add a CommandGuide for llvm-objdump summarizing its usage along with some general context. Reviewers: beanz Reviewed By: beanz Subscribers: Eugene.Zelenko, llvm-commits Differential Revision: https://reviews.llvm.org/D50034 llvm-svn: 339250
* [docs] Continue working around broken Sphinx parsing of LLVM code blocksChandler Carruth2018-08-061-1/+1
| | | | | | by switching to `text` in another place. llvm-svn: 339001
* [docs] Remove the `dso_local` tag from these functions.Chandler Carruth2018-08-061-2/+2
| | | | | | | | | The sphinx build bot is erroring on these examples for some unknown reason, and really the dso_local doesn't seem to be relevant to the example in any way so its cleaner to omit it. And now they will look a bit more like other (successful) IR examples. llvm-svn: 338998
* [docs] Stop trying to parse the ThinLTO summary IR fragments with theChandler Carruth2018-08-061-22/+22
| | | | | | | `llvm` syntax in Sphinx. This appears to just fail and create errors on the docs buildbot. llvm-svn: 338997
* [docs] Switch debug info metadata blocks to use `text` instead of `llvm`Chandler Carruth2018-08-061-9/+9
| | | | | | | | | | | | | | | highlighting syntax. Most of them already were like this, and the Sphinx runs on the docs build bot seems to be substantially more picky and/or not have support for a bunch of the syntax here. Hopefully this will let it progress past this. My previous attempt to fix the syntax made the `opt` tool happy, but no idea what the Sphinx stuff is really looking for, and the fact that other blocks already just use `text` led me to this solution. llvm-svn: 338983
* [docs] Correct the basic syntax structure of the DISubrange example.Chandler Carruth2018-08-061-4/+4
| | | | | | | | | | | | Notably, just close two of the debug info metadata nodes early rather than leaving them open with `...` which won't ever lex correctly. And add the missing `:` on the count labels. Slowly progressing through all of the warnings on the documentation build bot. Sorry to do this one commit at a time, but despite my best efforts I can't trigger these errors locally. llvm-svn: 338982
* [docs] Remove an example that isn't well formed LLVM IR and trips up theChandler Carruth2018-08-061-9/+1
| | | | | | | | | | | Sphinx syntax highlighter. This example also doesn't really make sense. There is no control flow or clarification of what the `Safe:` block exists to do... If we want examples here, we should make them much more clear in addition to making them well formed IR sequences. llvm-svn: 338981
* [docs] Fix an LLVM-syntax code block to actually be valid LLVM synatx.Chandler Carruth2018-08-061-2/+2
| | | | | | Hopefully fixes an issue on the docs build bot. llvm-svn: 338980
* [docs] Turn of `nasm` highlighting for a code block.Chandler Carruth2018-08-061-1/+1
| | | | | | | | This appears to produce a warning on the docs build bot. It doesn't reproduce for me, likely because I have a newer (or more full featured) pygments install. llvm-svn: 338978
* [docs] Reinstate r337730 - Add support for Markdown documentation inChandler Carruth2018-08-063-1/+165
| | | | | | | | | | | | | Sphinx. We think the bot is updated now, so trying this again. I'm landing it (with permission) as Michael is at a con at the moment. Actual patch largely by Michael Spencer. Differential Revision: https://reviews.llvm.org/D44910 llvm-svn: 338977
* [llvm-mca][docs] Move the code marker text into its own subsection. NFC.Matt Davis2018-08-031-36/+39
| | | | | | | Also fixed a few undecorated 'llvm-mca' references to be highlighted with the 'program' emphasis. llvm-svn: 338900
* [llvm-mca] Speed up the computation of the wait/ready/issued sets in the ↵Andrea Di Biagio2018-08-031-16/+16
| | | | | | | | | | | | | | Scheduler. This patch is a follow-up to r338702. We don't need to use a map to model the wait/ready/issued sets. It is much more efficient to use a vector instead. This patch gives us an average 7.5% speedup (on top of the ~12% speedup obtained after r338702). llvm-svn: 338883
* [llvm-mca][docs] Improve the CommandLine documentation.Andrea Di Biagio2018-08-031-39/+38
| | | | | | | | | This patch replaces all the remaining occurrences of string "MCA" with ":program:`llvm-mca`". Somehow I missed those strings when I committed r338394. This patch also improves section "Instruction Dispatch". llvm-svn: 338881
* Clear release notes and update versionHans Wennborg2018-08-011-90/+4
| | | | llvm-svn: 338556
* Bump the trunk version to 8.0.0svnHans Wennborg2018-08-011-2/+2
| | | | llvm-svn: 338537
* [llvm-mca][docs] Replace "temporary" with "physical registers". NFC.Matt Davis2018-07-311-4/+4
| | | | llvm-svn: 338415
* [llvm-mca][docs] Improve the "How LLVM-MCA works" section.Andrea Di Biagio2018-07-311-4/+24
| | | | llvm-svn: 338410
* [llvm-mca][docs] Always use `llvm-mca` in place of `MCA`.Andrea Di Biagio2018-07-311-50/+47
| | | | llvm-svn: 338394
* [llvm-mca][docs] Add instruction flow documentation. NFC.Matt Davis2018-07-301-0/+177
| | | | | | | | | | | | | | | | | | | | Summary: This patch mostly copies the existing Instruction Flow, and stage descriptions from the mca README. I made a few text tweaks, but no semantic changes, and made reference to the "default pipeline." I also removed the internals references (e.g., reference to class names and header files). I did leave the LSUnit name around, but only as an abbreviated word for the load-store unit. Reviewers: andreadb, courbet, RKSimon, gbedwell, filcab Reviewed By: andreadb Subscribers: tschuett, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D49692 llvm-svn: 338319
* [doc] Fix Getting Started typo.Joel Galenson2018-07-301-1/+1
| | | | | | | | This makes it easier for someone to copy-paste this line, change the path, and run the command. Differential Revision: https://reviews.llvm.org/D49201 llvm-svn: 338254
* [docs] Clarify role of DIExpressions within debug intrinsicsVedant Kumar2018-07-282-8/+34
| | | | | | | | | This should make the semantics of DIExpressions within llvm.dbg.{addr, declare, value} easier to understand. Differential Revision: https://reviews.llvm.org/D49572 llvm-svn: 338182
* [AMDGPU][MC][DOC] Updated AMD GPU assembler descriptionDmitry Preobrazhensky2018-07-274-22/+151
| | | | llvm-svn: 338125
* [Docs] Remove hard tab character from code block in optbisect documentationCraig Topper2018-07-271-1/+1
| | | | llvm-svn: 338105
* ADT: Document advantages of SmallVector<T,0> over std::vectorDuncan P. N. Exon Smith2018-07-262-7/+28
| | | | | | | | | | | | In light of the recent changes to SmallVector in r335421, r337514, and r337820, document its advantages over std::vector (see r175906 and r266909). Also add a release note. https://reviews.llvm.org/D49748 llvm-svn: 338071
* [Docs] Update of Xray pageDavid Carlier2018-07-261-2/+3
| | | | | | | | | | | | Update of supported oses. Reviewers: dberris Reviewed By: dberris Differential Revision: https://reviews.llvm.org/D49789 llvm-svn: 338003
* [LangRef] Clarify undefined behavior for function attributes.Eli Friedman2018-07-251-6/+23
| | | | | | | | | | Violating the invariants specified by attributes is undefined behavior. Maybe we could use poison instead for some of the parameter attributes, but I don't think it's worthwhile. Differential Revision: https://reviews.llvm.org/D49041 llvm-svn: 337947
* Add PerfJITEventListener for perf profiling support.Andres Freund2018-07-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new JIT event listener supports generating profiling data for the linux 'perf' profiling tool, allowing it to generate function and instruction level profiles. Currently this functionality is not enabled by default, but must be enabled with LLVM_USE_PERF=yes. Given that the listener has no dependencies, it might be sensible to enable by default once the initial issues have been shaken out. I followed existing precedent in registering the listener by default in lli. Should there be a decision to enable this by default on linux, that should probably be changed. Please note that until https://reviews.llvm.org/D47343 is resolved, using this functionality with mcjit rather than orcjit will not reliably work. Disregarding the previous comment, here's an example: $ cat /tmp/expensive_loop.c bool stupid_isprime(uint64_t num) { if (num == 2) return true; if (num < 1 || num % 2 == 0) return false; for(uint64_t i = 3; i < num / 2; i+= 2) { if (num % i == 0) return false; } return true; } int main(int argc, char **argv) { int numprimes = 0; for (uint64_t num = argc; num < 100000; num++) { if (stupid_isprime(num)) numprimes++; } return numprimes; } $ clang -ggdb -S -c -emit-llvm /tmp/expensive_loop.c -o /tmp/expensive_loop.ll $ perf record -o perf.data -g -k 1 ./bin/lli -jit-kind=mcjit /tmp/expensive_loop.ll 1 $ perf inject --jit -i perf.data -o perf.jit.data $ perf report -i perf.jit.data - 92.59% lli jitted-5881-2.so [.] stupid_isprime stupid_isprime main llvm::MCJIT::runFunction llvm::ExecutionEngine::runFunctionAsMain main __libc_start_main 0x4bf6258d4c544155 + 0.85% lli ld-2.27.so [.] do_lookup_x And line-level annotations also work: │ for(uint64_t i = 3; i < num / 2; i+= 2) { │1 30: movq $0x3,-0x18(%rbp) 0.03 │1 38: mov -0x18(%rbp),%rax 0.03 │ mov -0x10(%rbp),%rcx │ shr $0x1,%rcx 3.63 │ ┌──cmp %rcx,%rax │ ├──jae 6f │ │ if (num % i == 0) 0.03 │ │ mov -0x10(%rbp),%rax │ │ xor %edx,%edx 89.00 │ │ divq -0x18(%rbp) │ │ cmp $0x0,%rdx 0.22 │ │↓ jne 5f │ │ return false; │ │ movb $0x0,-0x1(%rbp) │ │↓ jmp 73 │ │ } 3.22 │1 5f:│↓ jmp 61 │ │ for(uint64_t i = 3; i < num / 2; i+= 2) { Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D44892 llvm-svn: 337789
* [llvm-mca][docs] Define IPC where it is first mentioned. NFC.Matt Davis2018-07-231-7/+7
| | | | | | Expand the abbreviation where it is first used, and use IPC elsewhere. llvm-svn: 337739
* Revert "[docs] Add support for Markdown documentation in Sphinx"Michael J. Spencer2018-07-233-165/+1
| | | | | | Looks like this bot hasn't been updated yet. llvm-svn: 337731
* [docs] Add support for Markdown documentation in SphinxMichael J. Spencer2018-07-233-1/+165
| | | | | | Differential Revision: https://reviews.llvm.org/D44910 llvm-svn: 337730
OpenPOWER on IntegriCloud