aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs
AgeCommit message (Collapse)AuthorFilesLines
2015-01-07[LangRef] PR22118: Hyphen is allowed in IR identifiers.Sean Silva1-1/+1
E.g. %-foo and %fo-o. Thanks to eagle-eyed reporter Tomas Brukner. llvm-svn: 225400
2015-01-06Change the .ll syntax for comdats and add a syntactic sugar.Rafael Espindola1-6/+16
In order to make comdats always explicit in the IR, we decided to make the syntax a bit more compact for the case of a GlobalObject in a comdat with the same name. Just dropping the $name causes problems for @foo = globabl i32 0, comdat $bar = comdat ... and declare void @foo() comdat $bar = comdat ... So the syntax is changed to @g1 = globabl i32 0, comdat($c1) @g2 = globabl i32 0, comdat and declare void @foo() comdat($c1) declare void @foo() comdat llvm-svn: 225302
2015-01-05[LangRef] Correct a typoHal Finkel1-2/+2
llvm-svn: 225148
2015-01-02Reformat statepoint documentation and fix a couple of typosPhilip Reames1-87/+287
Patch by Ramkumar Ramachandra <artagnon@gmail.com>. llvm-svn: 225084
2014-12-29Fixed 2 minor typos in the documentation.Elena Demikhovsky1-2/+2
llvm-svn: 224917
2014-12-25Documentation for Masked Load and Store intrinsics.Elena Demikhovsky1-0/+87
llvm-svn: 224832
2014-12-15IR: Make metadata typeless in assemblyDuncan P. N. Exon Smith1-62/+68
Now that `Metadata` is typeless, reflect that in the assembly. These are the matching assembly changes for the metadata/value split in r223802. - Only use the `metadata` type when referencing metadata from a call intrinsic -- i.e., only when it's used as a `Value`. - Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode` when referencing it from call intrinsics. So, assembly like this: define @foo(i32 %v) { call void @llvm.foo(metadata !{i32 %v}, metadata !0) call void @llvm.foo(metadata !{i32 7}, metadata !0) call void @llvm.foo(metadata !1, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{metadata !3}, metadata !0) ret void, !bar !2 } !0 = metadata !{metadata !2} !1 = metadata !{i32* @global} !2 = metadata !{metadata !3} !3 = metadata !{} turns into this: define @foo(i32 %v) { call void @llvm.foo(metadata i32 %v, metadata !0) call void @llvm.foo(metadata i32 7, metadata !0) call void @llvm.foo(metadata i32* @global, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{!3}, metadata !0) ret void, !bar !2 } !0 = !{!2} !1 = !{i32* @global} !2 = !{!3} !3 = !{} I wrote an upgrade script that handled almost all of the tests in llvm and many of the tests in cfe (even handling many `CHECK` lines). I've attached it (or will attach it in a moment if you're speedy) to PR21532 to help everyone update their out-of-tree testcases. This is part of PR21532. llvm-svn: 224257
2014-12-12Require python 2.7.Rafael Espindola3-4/+4
We were already requiring 2.5, which meant that people on old linux distros had to upgrade anyway. Requiring python 2.6 will make supporting 3.X easier as we can use the 3.X exception syntax. According to the discussion on llvmdev, there is not much value is requiring just 2.6, we may as well just require 2.7. llvm-svn: 224129
2014-12-10Added documentation for MergeFunctions pass:Stepan Dyatkovskiy3-9/+822
Pass looks for equivalent functions that are mergable and folds them. llvm-svn: 223931
2014-12-09Add argument variable support to the debug info tutorialEric Christopher1-9/+43
and rearrange the prologue source location hack to immediately after it. llvm-svn: 223725
2014-12-08Clean up the rst for the debug info tutorialEric Christopher1-52/+52
llvm-svn: 223682
2014-12-08InstrProf: An intrinsic and lowering for instrumentation based profilingJustin Bogner1-0/+44
Introduce the ``llvm.instrprof_increment`` intrinsic and the ``-instrprof`` pass. These provide the infrastructure for writing counters for profiling, as in clang's ``-fprofile-instr-generate``. The implementation of the instrprof pass is ported directly out of the CodeGenPGO classes in clang, and with the followup in clang that rips that code out to use these new intrinsics this ends up being NFC. Doing the instrumentation this way opens some doors in terms of improving the counter performance. For example, this will make it simple to experiment with alternate lowering strategies, and allows us to try handling profiling specially in some optimizations if we want to. Finally, this drastically simplifies the frontend and puts all of the lowering logic in one place. llvm-svn: 223672
2014-12-08Add Chapter 8 to the Kaleidoscope tutorial. This chapter addsEric Christopher2-262/+687
a description of how to add debug information using DWARF and DIBuilder to the language. Thanks to David Blaikie for his assistance with this tutorial. llvm-svn: 223671
2014-12-04Add a section to Statepoint docs mentioning shared bugzilla search and ↵Philip Reames1-0/+4
standard mailing lists llvm-svn: 223374
2014-12-04Minor typo and link fixes for Statepoint documentationPhilip Reames1-5/+3
llvm-svn: 223327
2014-12-03Fix grammar-o.Nico Weber1-1/+1
llvm-svn: 223265
2014-12-03Fix sphinx error from Statepoints.rstMatt Arsenault1-0/+5
It was complaining it wasn't included in any toctree llvm-svn: 223254
2014-12-03Fix a typo in the documentation of LTOBenjamin Poulain1-1/+1
Fix defininitions->definitions. Reviewed by David Blaikie. llvm-svn: 223216
2014-12-03Prologue supportPeter Collingbourne3-28/+112
Patch by Ben Gamari! This redefines the `prefix` attribute introduced previously and introduces a `prologue` attribute. There are a two primary usecases that these attributes aim to serve, 1. Function prologue sigils 2. Function hot-patching: Enable the user to insert `nop` operations at the beginning of the function which can later be safely replaced with a call to some instrumentation facility 3. Runtime metadata: Allow a compiler to insert data for use by the runtime during execution. GHC is one example of a compiler that needs this functionality for its tables-next-to-code functionality. Previously `prefix` served cases (1) and (2) quite well by allowing the user to introduce arbitrary data at the entrypoint but before the function body. Case (3), however, was poorly handled by this approach as it required that prefix data was valid executable code. Here we redefine the notion of prefix data to instead be data which occurs immediately before the function entrypoint (i.e. the symbol address). Since prefix data now occurs before the function entrypoint, there is no need for the data to be valid code. The previous notion of prefix data now goes under the name "prologue data" to emphasize its duality with the function epilogue. The intention here is to handle cases (1) and (2) with prologue data and case (3) with prefix data. References ---------- This idea arose out of discussions[1] with Reid Kleckner in response to a proposal to introduce the notion of symbol offsets to enable handling of case (3). [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-May/073235.html Test Plan: testsuite Differential Revision: http://reviews.llvm.org/D6454 llvm-svn: 223189
2014-12-02[Statepoints 4/4] Statepoint infrastructure for garbage collection: ↵Philip Reames1-0/+209
Documentation This is the fourth and final patch in the statepoint series. It contains the documentation for the statepoint intrinsics and their usage. There's definitely still room to improve the documentation here, but I wanted to get this landed so it was available for others. There will likely be a series of small cleanup changes over the next few weeks as we work to clarify and revise the documentation. If you have comments or questions, please feel free to discuss them either in this commit thread, the original review thread, or on llvmdev. Comments are more than welcome. Reviewed by: atrick, ributzka Differential Revision: http://reviews.llvm.org/D5683 llvm-svn: 223143
2014-12-01[OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module.Peter Zotov1-0/+1
This way most code won't link this (substantially large) library, if compiled statically with LLVM. llvm-svn: 223072
2014-12-01[OCaml] [cmake] Add CMake buildsystem for OCaml.Peter Zotov1-0/+42
Closes PR15325. llvm-svn: 223071
2014-11-26Remove neverHasSideEffects support from TableGen CodeGenInstruction. ↵Craig Topper1-1/+0
Everyone should use hasSideEffects now. llvm-svn: 222809
2014-11-24Clarify wording in the LangRef around !invariant.loadPhilip Reames1-4/+5
Clarify the wording around !invariant.load to properly reflect the semantics of such loads with respect to control dependence and location lifetime. To the best of my knowledge, the revised wording respects the actual implementation and understanding of issues involved highlighted in the recent 'Optimization hints for "constant" loads' thread on LLVMDev. In particular, I'm aiming for the following results: - To clarify that an invariant.load can fault and must respect control dependence. In particular, it is not sound to unconditionally pull an invariant load out of a loop if that loop would potentially never execute. - To clarify that the invariant nature of a given pointer does not preclude the modification of that location through a pointer which is unrelated to the load operand. In particular, initializing a location and then passing a pointer through an opaque intrinsic which produces a new unrelated pointer, should behave as expected provided that the intrinsic is memory dependent on the initializing store. - To clarify that storing a value to an invariant location is defined. It can not, for example, be considered unreachable. The value stored can be assumed to be equal to the value of any previous (or following!) invariant load, but the store itself is defined. I recommend that anyone interested in using !invariant.load, or optimizing for them, read over the discussion in the review thread. A number of motivating examples are discussed. Differential Revision: http://reviews.llvm.org/D6346 llvm-svn: 222700
2014-11-24Correct path to regression tests in ExtendingLLVMSergey Dmitrouk1-4/+4
llvm-svn: 222678
2014-11-21Clarify the description of the noalias attributeHal Finkel1-13/+16
The previous description of the noalias attribute did not accurately specify the implemented semantics, and the terminology used differed unnecessarily from that used by the C specification to define the semantics of restrict. For the argument attribute, the semantics can be precisely specified in terms of objects accessed through pointers based on the arguments, and this is now what is done. Saying that the semantics are 'slightly weaker' than that provided by C99 restrict is not really useful without further elaboration, so that has been removed from the sentence. noalias on a return value is really used to mean that the function is malloc-like (and, in fact, we use this attribute to represent __attribute__((malloc)) in Clang), and this is a stronger guarantee than that provided by restrict (because it is a property of the pointed-to memory region, not just a guarantee on object access). Clarifying this is relevant to fixing (and was motivated by the discussion on) PR21556. llvm-svn: 222497
2014-11-19Use ninja pools to limit the number of concurrent compile/link jobs.Evgeniy Stepanov1-0/+6
This change makes use of the new "job pool" capability in cmake 3.0 with ninja generator to allow limiting the number of concurrent jobs of a certain type. llvm-svn: 222341
2014-11-18docs: Modernize some examples in WritingAnLLVMPassJustin Bogner1-3/+3
llvm-svn: 222223
2014-11-18docs: Fix a couple of typo-ish errors in WritingAnLLVMPassJustin Bogner1-4/+3
- Make CallGraphSCCPass's paragraph about doFinalization refer to runOnSCC instead of runOnFunction, since that's what it's about. - Fix a reference in the FunctionPass paragraph. llvm-svn: 222222
2014-11-14R600/SI: Start implementing an assemblerTom Stellard2-0/+47
This was done using the Sparc and PowerPC AsmParsers as guides. So far it is very simple and only supports sopp instructions. llvm-svn: 221994
2014-11-10configure.ac lives in autoconf/, not autotools/Rafael Espindola1-1/+1
Patch by Palmer Dabbelt! llvm-svn: 221638
2014-11-06[Docs][JIT] Update the clang++ invocation lines in the kaleidoscope docs.Lang Hames5-5/+5
The old examples had missing/incorrect flags that were causing failures on newer versions of clang and the tutorial code. llvm-svn: 221419
2014-11-05[docs] Document usage of Inputs/ for extra test files.Sean Silva1-0/+52
llvm-svn: 221406
2014-11-04Docs: give binutils/gold instructions for CMake too.Tim Northover1-3/+5
Patch by Steve King. llvm-svn: 221227
2014-11-02Docs: update va_arg example with valid x86_64 va_list type.Tim Northover1-3/+10
The given example was overflowing its alloca and segfaulting if actually run on x86, so it's a good idea to provide something that works there too. Patch by Ramkumar Ramachandra. llvm-svn: 221077
2014-10-29VMCore was renamed to IR long time agoSeo Sanghyeon1-1/+1
llvm-svn: 220838
2014-10-28[OCaml] PR14083, PR9606: Only pick *.odoc files from current build target.Peter Zotov1-3/+4
When several build targets, e.g. Debug+Asserts and Release+Asserts are present, ocamldoc complains of duplicate interfaces. llvm-svn: 220831
2014-10-23Update llvm.donothing documentation.Juergen Ributzka1-2/+3
llvm.donothing is no longer the only intrinsic that can be invoked. llvm-svn: 220530
2014-10-22Fix number of operands in documentation for minnum / maxnumMatt Arsenault1-10/+10
llvm-svn: 220402
2014-10-22Try to fix documentation bot warningMatt Arsenault1-2/+2
llvm-svn: 220352
2014-10-21Add minnum / maxnum intrinsicsMatt Arsenault1-2/+85
These are named following the IEEE-754 names for these functions, rather than the libm fmin / fmax to avoid possible ambiguities. Some languages may implement something resembling fmin / fmax which return NaN if either operand is to propagate errors. These implement the IEEE-754 semantics of returning the other operand if either is a NaN representing missing data. llvm-svn: 220341
2014-10-20Introduce a 'nonnull' metadata on Load instructions.Philip Reames1-1/+9
The newly introduced 'nonnull' metadata is analogous to existing 'nonnull' attributes, but applies to load instructions rather than call arguments or returns. Long term, it would be nice to combine these into a single construct. The value of the load is allowed to vary between successive loads, but null is not a valid value to be loaded by any load marked nonnull. Reviewed by: Hal Finkel Differential Revision: http://reviews.llvm.org/D5220 llvm-svn: 220240
2014-10-17[llvm-symbolizer] Introduce the -dsym-hint option.Alexander Potapenko1-0/+7
llvm-symbolizer will consult one of the .dSYM paths passed via -dsym-hint if it fails to find the .dSYM bundle at the default location. llvm-svn: 220004
2014-10-16Delete -std-compile-opts.Rafael Espindola2-20/+5
These days -std-compile-opts was just a silly alias for -O3. llvm-svn: 219951
2014-10-16Fix lang-ref doc bug: s/icmp lt/icmp slt/Jonathan Roelofs1-1/+1
llvm-svn: 219947
2014-10-14Introduce Go coding standards for LLVM.Peter Collingbourne1-0/+19
Rather than define our own standards, we adopt a set of best practices that are already in use by the Go community. Differential Revision: http://reviews.llvm.org/D5761 llvm-svn: 219646
2014-10-13Update the example of using a command-line option custom parser toPaul Robinson1-5/+5
match the current implementation. Patch by Douglas Yung! llvm-svn: 219631
2014-10-08Update dwarf::ApplePropertyAttributes enum to meaningful values.Frederic Riss1-15/+27
Summary: We currently emit an DW_AT_APPLE_property_attribute with a value that is a bitfield describing the various attributes applied to an ObjectiveC property. While trying to add testing to one of my dwarfdump patches that would pretty print that, I realized this information looks totally broken and has maybe never been correct. As with every DWARF info, we have some enum in Dwarf.h that describes this attribute (enum ApplePropertyAttributes). It seems however that the attribute value is set from another definition of these flags in Sema/DeclSpec.h (enum ObjCPropertyAttributeKind). And these 2 enums aren't in sync. This patch updates the Dwarf.h values to the ones we are (and have been for a very long time) emitting. We change some publicly (and even documented in SourceLevelDebugging.rst) values, but I doubt this could be an issue as the information has been wrong for so long... Reviewers: echristo, dblaikie, aprantl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5653 llvm-svn: 219311
2014-10-06Update documentation with link to Sea Islands documentationMatt Arsenault1-0/+1
llvm-svn: 219134
2014-10-04DI: Fixup global syntax in exampleDuncan P. N. Exon Smith1-1/+1
llvm-svn: 219056