summaryrefslogtreecommitdiffstats
path: root/llvm/docs
Commit message (Collapse)AuthorAgeFilesLines
...
* [XRay][Docs] Update the XRay documentationDean Michael Berris2017-02-281-26/+93
| | | | | | | | | | | | | | | Summary: Update the XRay docs to mention new subcomands to the llvm-xray tool, and details on FDR mode logging. Also list down available libraries for use part of the LLVM distribution. Reviewers: rSerge, pelikan, echristo, timshen, sdardis, rengolin Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D30395 llvm-svn: 296528
* Add function importing info from samplepgo profile to the module summary.Dehao Chen2017-02-281-5/+15
| | | | | | | | | | | | | | Summary: For SamplePGO, the profile may contain cross-module inline stacks. As we need to make sure the profile annotation happens when all the hot inline stacks are expanded, we need to pass this info to the module importer so that it can import proper functions if necessary. This patch implemented this feature by emitting cross-module targets as part of function entry metadata. In the module-summary phase, the metadata is used to build call edges that points to functions need to be imported. Reviewers: mehdi_amini, tejohnson Reviewed By: tejohnson Subscribers: davidxl, llvm-commits Differential Revision: https://reviews.llvm.org/D30053 llvm-svn: 296498
* [docs] Fix a think-o in the Programmer's Manual.Lang Hames2017-02-281-1/+1
| | | | llvm-svn: 296421
* [Support][Error] Add a 'cantFail' utility function for known-safe calls toLang Hames2017-02-271-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fallible functions. Some fallible functions (those returning Error or Expected<T>) may only fail for a subset of their inputs. For example, a "safe" square root function will succeed for all finite positive inputs: Expected<double> safeSqrt(double d) { if (d < 0 && !isnan(d) && !isinf(d)) return make_error<...>("Cannot sqrt -ve values, nans or infs"); return sqrt(d); } At a safe callsite for such a function, checking the error return value is redundant: if (auto ValOrErr = safeSqrt(42.0)) { // use *ValOrErr. } else llvm_unreachable("safeSqrt should always succeed for +ve values"); The cantFail function wraps this check and extracts the contained value, simplifying control flow: double Result = cantFail(safeSqrt(42.0)); This function should be used with care: it is a programmatic error to wrap a call with cantFail if it can in fact fail. For debug builds this will result in llvm_unreachable being called. For release builds the behavior is undefined. Use of this function is likely to be rare in library code, but more common for tool and unit-test code where inputs and mock functions may be known to be safe. llvm-svn: 296384
* [Doc] Modernize programmers manualPiotr Padlewski2017-02-251-28/+21
| | | | | | | | | | | | | | Summary: Fixed bunch of for loops to range based for loop and bunch of rendundat types with auto. Reviewers: echristo, silvas, chandlerc Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D30338 llvm-svn: 296251
* [docs] Add information about how to checkout polly to getting started pageTobias Grosser2017-02-231-0/+6
| | | | llvm-svn: 295974
* Explicitly state the behavior of inbounds with a null pointer.Eli Friedman2017-02-231-2/+4
| | | | | | | | | See https://llvm.org/bugs/show_bug.cgi?id=31439; this reflects LLVM's behavior in practice, and should be compatible with C/C++ rules. Differential Revision: https://reviews.llvm.org/D28026 llvm-svn: 295916
* AMDGPU : AMDGPU : Update AMDGPU Trap Handler ABI.Wei Ding2017-02-211-41/+49
| | | | | | Differential Revision: http://reviews.llvm.org/D29913 llvm-svn: 295745
* Update Bugzilla URLs in docsIsmail Donmez2017-02-175-6/+6
| | | | llvm-svn: 295432
* [LangRef] Explicitly allow readnone and reaodnly functions to unwindSanjoy Das2017-02-131-5/+8
| | | | | | | | | | | | | | | | | | Summary: This change edits the language reference to explicitly allow the existence of readnone and readonly functions that can throw. Full discussion at http://lists.llvm.org/pipermail/llvm-dev/2017-January/108637.html Reviewers: dberlin, chandlerc, hfinkel, majnemer Reviewed By: majnemer Subscribers: majnemer, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D28740 llvm-svn: 295000
* [LangRef] Update the TBAA sectionSanjoy Das2017-02-131-27/+146
| | | | | | | | | | | | | | | | | | | | Summary: Update the TBAA section to mention the struct path TBAA that LLVM implements today. This is not a proposal or change in semantics -- it is intended only to **document** what LLVM already does today. This is related to https://reviews.llvm.org/D26438 where I've tried to implement some of the constraints as verifier checks. Reviewers: anna, reames, rsmith, chandlerc, hfinkel, rjmccall, mehdi_amini, dexonsmith, manmanren Reviewed By: manmanren Subscribers: dberlin, dberris, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D26831 llvm-svn: 294999
* Update Kaleidoscope tutorial and improve Windows supportMehdi Amini2017-02-118-169/+237
| | | | | | | | | | | | | | | Many quoted code blocks were not in sync with the actual toy.cpp files. Improve tutorial text slightly in several places. Added some step descriptions crucial to avoid crashes (like InitializeNativeTarget* calls). Solve/workaround problems with Windows (JIT'ed method not found, using custom and standard library functions from host process). Patch by: Moritz Kroll <moritz.kroll@gmx.de> Differential Revision: https://reviews.llvm.org/D29864 llvm-svn: 294870
* Correcting several sphinx errors; should fix the LLVM documentation build.Aaron Ballman2017-02-111-6/+8
| | | | llvm-svn: 294865
* Encode duplication factor from loop vectorization and loop unrolling to ↵Dehao Chen2017-02-101-1/+3
| | | | | | | | | | | | | | | | | | | | | discriminator. Summary: This patch starts the implementation as discuss in the following RFC: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106532.html When optimization duplicates code that will scale down the execution count of a basic block, we will record the duplication factor as part of discriminator so that the offline process tool can find the duplication factor and collect the accurate execution frequency of the corresponding source code. Two important optimization that fall into this category is loop vectorization and loop unroll. This patch records the duplication factor for these 2 optimizations. The recording will be guarded by a flag encode-duplication-in-discriminators, which is off by default. Reviewers: probinson, aprantl, davidxl, hfinkel, echristo Reviewed By: hfinkel Subscribers: mehdi_amini, anemet, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D26420 llvm-svn: 294782
* Fix doc for `-opt-bisect-limit`: the LTO option prefix for lld is -mllvmMehdi Amini2017-02-101-3/+3
| | | | | | Thanks Davide to catch it in my previous patch. llvm-svn: 294759
* Fix doc for `-opt-bisect-limit`: the LTO option is linker specificMehdi Amini2017-02-101-1/+4
| | | | llvm-svn: 294725
* AMDGPU : Add trap handler support.Wei Ding2017-02-101-0/+39
| | | | | | Differential Revision: http://reviews.llvm.org/D26010 llvm-svn: 294692
* docs/conf.py: Suppress sphinx highlighting failure warningsMatthias Braun2017-02-101-0/+4
| | | | | | | | | | | | | The pygments syntax highlighting package used by sphinx fails to parse newer LLVM constructs or valid (at least to me) gas constructs like `.secrel32 _function_name + 0`. Disable this particular warning so the build doesn't abort as fixing pygments doesn't seem a workable option here. Differential Revision: https://reviews.llvm.org/D29794 llvm-svn: 294672
* Don't try to link to the 4.0 release notesHans Wennborg2017-02-091-3/+3
| | | | llvm-svn: 294647
* lit.rst: Fix sphinx complaint about multiple option definitionsMatthias Braun2017-02-091-1/+1
| | | | llvm-svn: 294646
* [docs] Fix typoJonathan Roelofs2017-02-091-2/+2
| | | | llvm-svn: 294645
* [docs] Documentation update for ScudoKostya Kortchinsky2017-02-091-41/+44
| | | | | | | | | | | | | | | | Summary: Documentation update to reflect the changes that occured in the allocator: - additional architectures support; - modification of the header; - options default values for 32 & 64-bit. Reviewers: kcc, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29592 llvm-svn: 294595
* Make it possible to set SHF_LINK_ORDER explicitly.Rafael Espindola2017-02-091-0/+18
| | | | | | | This will make it possible to add support for gcing user metadata (asan for example). llvm-svn: 294589
* [docs] cleanup documentation on lit substitutionsDavid Bozier2017-02-092-9/+24
| | | | | | | | | | | 1. Added missing substitutions to the documentation in docs/TestingGuide.rst 2. Modified docs/CommandGuide/lit.rst to only document the "base" set of substitutions and to refer the reader to docs/TestingGuide.rst for more detailed info on substitutions. Patch by bd1976llvm Differential Revision: https://reviews.llvm.org/D29281 llvm-svn: 294586
* Fix the docs buildSanjoy Das2017-02-071-5/+6
| | | | | | (and add a bit of formatting.) llvm-svn: 294347
* This patch adds a ssa_copy intrinsic, as part of splitting up D29316.Daniel Berlin2017-02-071-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The intrinsic, marked as returning it's first argument, has no code generation effect (though currently not every optimization pass knows that intrinsics with the returned attribute can be looked through). It is about to be used to by the PredicateInfo pass to attach predicate information to existing operands, and be able to tell what the predicate information affects. We deliberately do not attach any info through a second operand so that the intrinsics do not need to dominate the comparisons/etc (since in the case of assume, we may want to push them up the post-dominator tree). Reviewers: davide, sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29517 llvm-svn: 294341
* [ImplicitNullCheck] Extend Implicit Null Check scope by using storesSanjoy Das2017-02-071-1/+6
| | | | | | | | | | | | | | | | | | | | | Summary: This change allows usage of store instruction for implicit null check. Memory Aliasing Analisys is not used and change conservatively supposes that any store and load may access the same memory. As a result re-ordering of store-store, store-load and load-store is prohibited. Patch by Serguei Katkov! Reviewers: reames, sanjoy Reviewed By: sanjoy Subscribers: atrick, llvm-commits Differential Revision: https://reviews.llvm.org/D29400 llvm-svn: 294338
* [LangRef] Document some LLVM inline asm special escapesReid Kleckner2017-02-061-0/+16
| | | | | | | As discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2017-February/109862.html llvm-svn: 294204
* [docs] Document the staging buildbotDylan McKay2017-02-051-2/+17
| | | | | | | | | | | | | | | | Summary: This also adds docs to suggest that maintainers of buildbots for experimental backends should use this buildmaster. Reviewers: dsanders, grosser, asb, mehdi_amini Reviewed By: grosser Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29560 llvm-svn: 294144
* [llvm-cov] Don't show function summaries when filtering by filename (fixes ↵Vedant Kumar2017-02-051-0/+4
| | | | | | PR31395) llvm-svn: 294137
* MC: Introduce the ABS8 symbol modifier.Peter Collingbourne2017-01-311-0/+22
| | | | | | | | | | | @ABS8 can be applied to symbols which appear as immediate operands to instructions that have a 8-bit immediate form for that operand. It causes the assembler to use the 8-bit form and an 8-bit relocation (e.g. R_386_8 or R_X86_64_8) for the symbol. Differential Revision: https://reviews.llvm.org/D28688 llvm-svn: 293667
* [LanRef] Fix typo in getelementptr example.Alexey Bader2017-01-301-1/+1
| | | | | | | | | | | | | | Summary: Change B type from double to pointer to double. Reviewers: delena, sanjoy Reviewed By: sanjoy Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D29009 llvm-svn: 293467
* Use print() instead of dump() in codeMatthias Braun2017-01-281-2/+4
| | | | | | | The dump() functions are meant to be used in a debugger, code should typically use something like print(errs()); llvm-svn: 293365
* Update NVVMReflect usage doc to new idiom for adding target-specific early ↵Justin Lebar2017-01-271-5/+2
| | | | | | passes. llvm-svn: 293327
* [LangRef] Make @llvm.sqrt(x) return undef, rather than have UB, for negative x.Justin Lebar2017-01-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Some frontends emit a speculate-and-select idiom for sqrt, wherein they compute sqrt(x), check if x is negative, and select NaN if it is: %cmp = fcmp olt double %a, -0.000000e+00 %sqrt = call double @llvm.sqrt.f64(double %a) %ret = select i1 %cmp, double 0x7FF8000000000000, double %sqrt This is technically UB as the LangRef is written today if %a is ever less than -0. But emitting code that's compliant with the current definition of sqrt would require a branch, which would then prevent us from matching this idiom in SelectionDAG (which we do today -- ISD::FSQRT has defined behavior on negative inputs), because SelectionDAG looks at one BB at a time. Nothing in LLVM takes advantage of this undefined behavior, as far as we can tell, and the fact that llvm.sqrt has UB dates from its initial addition to the LangRef. Reviewers: arsenm, mehdi_amini, hfinkel Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D28797 llvm-svn: 293242
* Add intrinsics for constrained floating point operationsAndrew Kaylor2017-01-261-0/+271
| | | | | | | | | | | | | | This commit introduces a set of experimental intrinsics intended to prevent optimizations that make assumptions about the rounding mode and floating point exception behavior. These intrinsics will later be extended to specify flush-to-zero behavior. More work is also required to model instruction dependencies in machine code and to generate these instructions from clang (when required by pragmas and/or command line options that are not currently supported). Differential Revision: https://reviews.llvm.org/D27028 llvm-svn: 293226
* [Doc][LangRef] Fix typo-ish error in description of Masked GatherZvi Rackover2017-01-261-1/+1
| | | | | | | | | | | | | | Summary: Fix the example of equivalent expansion for when mask is all ones. Reviewers: delena Reviewed By: delena Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29179 llvm-svn: 293206
* LangRef: Document the allowed metadata dropping transforms.Peter Collingbourne2017-01-251-3/+16
| | | | | | | | | Document the current practice regarding dropping metadata on modules, functions and global variables. Differential Revision: https://reviews.llvm.org/D29110 llvm-svn: 293101
* Reinstate "r292904 - [lit] Allow boolean expressions in REQUIRES and XFAILGreg Parker2017-01-251-28/+36
| | | | | | | | and UNSUPPORTED" This reverts the revert in r292942. llvm-svn: 293007
* Revert "r292904 - [lit] Allow boolean expressions in REQUIRES and XFAILAlex Lorenz2017-01-241-36/+28
| | | | | | | | | | | and UNSUPPORTED" After r292904 llvm-lit fails to emit the test results in the XML format for Apple's internal buildbots. rdar://30164800 llvm-svn: 292942
* [lit] Allow boolean expressions in REQUIRES and XFAIL and UNSUPPORTEDGreg Parker2017-01-241-28/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A `lit` condition line is now a comma-separated list of boolean expressions. Comma-separated expressions act as if each expression were on its own condition line: For REQUIRES, if every expression is true then the test will run. For UNSUPPORTED, if every expression is false then the test will run. For XFAIL, if every expression is false then the test is expected to succeed. As a special case "XFAIL: *" expects the test to fail. Examples: # Test is expected fail on 64-bit Apple simulators and pass everywhere else XFAIL: x86_64 && apple && !macosx # Test is unsupported on Windows and on non-Ubuntu Linux # and supported everywhere else UNSUPPORTED: linux && !ubuntu, system-windows Syntax: * '&&', '||', '!', '(', ')'. 'true' is true. 'false' is false. * Each test feature is a true identifier. * Substrings of the target triple are true identifiers for UNSUPPORTED and XFAIL, but not for REQUIRES. (This matches the current behavior.) * All other identifiers are false. * Identifiers are [-+=._a-zA-Z0-9]+ Differential Revision: https://reviews.llvm.org/D18185 llvm-svn: 292904
* Revert "[lit] Allow boolean expressions in REQUIRES and XFAIL and UNSUPPORTED"Greg Parker2017-01-241-36/+28
| | | | | | This change needs to be better-coordinated with libc++. llvm-svn: 292900
* [lit] Allow boolean expressions in REQUIRES and XFAIL and UNSUPPORTEDGreg Parker2017-01-241-28/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A `lit` condition line is now a comma-separated list of boolean expressions. Comma-separated expressions act as if each expression were on its own condition line: For REQUIRES, if every expression is true then the test will run. For UNSUPPORTED, if every expression is false then the test will run. For XFAIL, if every expression is false then the test is expected to succeed. As a special case "XFAIL: *" expects the test to fail. Examples: # Test is expected fail on 64-bit Apple simulators and pass everywhere else XFAIL: x86_64 && apple && !macosx # Test is unsupported on Windows and on non-Ubuntu Linux # and supported everywhere else UNSUPPORTED: linux && !ubuntu, system-windows Syntax: * '&&', '||', '!', '(', ')'. 'true' is true. 'false' is false. * Each test feature is a true identifier. * Substrings of the target triple are true identifiers for UNSUPPORTED and XFAIL, but not for REQUIRES. (This matches the current behavior.) * All other identifiers are false. * Identifiers are [-+=._a-zA-Z0-9]+ Differential Revision: https://reviews.llvm.org/D18185 llvm-svn: 292896
* [AArch64][GlobalISel] Legalize narrow scalar ops again.Ahmed Bougacha2017-01-231-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since r279760, we've been marking as legal operations on narrow integer types that have wider legal equivalents (for instance, G_ADD s8). Compared to legalizing these operations, this reduced the amount of extends/truncates required, but was always a weird legalization decision made at selection time. So far, we haven't been able to formalize it in a way that permits the selector generated from SelectionDAG patterns to be sufficient. Using a wide instruction (say, s64), when a narrower instruction exists (s32) would introduce register class incompatibilities (when one narrow generic instruction is selected to the wider variant, but another is selected to the narrower variant). It's also impractical to limit which narrow operations are matched for which instruction, as restricting "narrow selection" to ranges of types clashes with potentially incompatible instruction predicates. Concerns were also raised regarding MIPS64's sign-extended register assumptions, as well as wrapping behavior. See discussions in https://reviews.llvm.org/D26878. Instead, legalize the operations. Should we ever revert to selecting these narrow operations, we should try to represent this more accurately: for instance, by separating a "concrete" type on operations, and an "underlying" type on vregs, we could move the "this narrow-looking op is really legal" decision to the legalizer, and let the selector use the "underlying" vreg type only, which would be guaranteed to map to a register class. In any case, we eventually should mitigate: - the performance impact by selecting no-op extract/truncates to COPYs (which we currently do), and the COPYs to register reuses (which we don't do yet). - the compile-time impact by optimizing away extract/truncate sequences in the legalizer. llvm-svn: 292827
* [docs] Point to upstream Sphinx install instructions.Sean Silva2017-01-221-0/+2
| | | | llvm-svn: 292752
* docs: Document that !absolute_symbol { all-ones, all-ones } means the full set.Peter Collingbourne2017-01-201-2/+5
| | | | llvm-svn: 292657
* [docs] Tell Doxygen to expand LLVM_ALIGNAS to nothingMalcolm Parsons2017-01-191-3/+3
| | | | | | | | | | | | | | | | | Summary: Docs for clang::Decl and clang::TemplateSpecializationType have not been generated since LLVM_ALIGNAS was added to them. Tell Doxygen to expand LLVM_ALIGNAS to nothing as described at https://www.stack.nl/~dimitri/doxygen/manual/preprocessing.html Reviewers: aaron.ballman, klimek, alexfh Subscribers: ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D28850 llvm-svn: 292483
* [lit] Support sharding testsuites, for parallel execution.Graydon Hoare2017-01-181-0/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: This change equips lit.py with two new options, --num-shards=M and --run-shard=N (set by default from env vars LIT_NUM_SHARDS and LIT_RUN_SHARD). The options must be used together, and N must be in 1..M. Together these options effect only test selection: they partition the testsuite into M equal-sized "shards", then select only the Nth shard. They can be used in a cluster of test machines to achieve a very crude (static) form of parallelism, with minimal configuration work. Reviewers: modocache, ddunbar Reviewed By: ddunbar Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28789 llvm-svn: 292417
* [libFuzzer] better link for trophiesKostya Serebryany2017-01-181-1/+1
| | | | llvm-svn: 292318
* Fix GettingStarted doc so that the example build command for cmake ↵Mehdi Amini2017-01-171-1/+1
| | | | | | | | | LLVM_ENABLE_PROJECTS works on linux I tested the previous one on macOS, however building libc++ on Linux requires libcxxabi as well. llvm-svn: 292290
OpenPOWER on IntegriCloud