1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

5561 Commits

Author SHA1 Message Date
Simon Atanasyan
9e62a55755 [docs] Add link to the MIPS 64-bit ELF object file specification
llvm-svn: 227050
2015-01-25 16:20:30 +00:00
Charlie Turner
dd36479c15 Fixup debug information references.
llvm-svn: 227020
2015-01-24 21:51:21 +00:00
Charlie Turner
2496f97c24 Update references to lines of code count.
The number of lines of code in Kaleidoscope has risen from the
previously reported 700 to 986 according to the cloc tool. This tools
was run on the toy.cpp file from Chapter 8.

llvm-svn: 227019
2015-01-24 21:51:17 +00:00
Ramkumar Ramachandra
550e92d3f7 Intrinsics: introduce llvm_any_ty aka ValueType Any
Specifically, gc.result benefits from this greatly. Instead of:

gc.result.int.*
gc.result.float.*
gc.result.ptr.*
...

We now have a gc.result.* that can specialize to literally any type.

Differential Revision: http://reviews.llvm.org/D7020

llvm-svn: 226857
2015-01-22 20:14:38 +00:00
Paul Robinson
4e123e1b82 Explicitly describe '///' versus '//' comment delimiters.
llvm-svn: 226750
2015-01-22 00:19:56 +00:00
Chandler Carruth
c47432114d [PM] Split the LoopInfo object apart from the legacy pass, creating
a LoopInfoWrapperPass to wire the object up to the legacy pass manager.

This switches all the clients of LoopInfo over and paves the way to port
LoopInfo to the new pass manager. No functionality change is intended
with this iteration.

llvm-svn: 226373
2015-01-17 14:16:18 +00:00
Hans Wennborg
95fbe0c01e ProgrammersManual.rst: fix a typo
llvm-svn: 226367
2015-01-17 03:19:21 +00:00
Hal Finkel
04316a019c [PowerPC] Adjust PatchPoints for ppc64le
Bill Schmidt pointed out that some adjustments would be needed to properly
support powerpc64le (using the ELF V2 ABI). For one thing, R11 is not available
as a scratch register, so we need to use R12. R12 is also available under ELF
V1, so to maintain consistency, I flipped the order to make R12 the first
scratch register in the array under both ABIs.

llvm-svn: 226247
2015-01-16 04:40:58 +00:00
Hans Wennborg
9eab633d6d ReleaseNotes.rst: bump version to 3.7
The 3.6 notes are now in the 3.6 branch.

llvm-svn: 226007
2015-01-14 18:07:30 +00:00
Hans Wennborg
1e3cdfce8e Trunk is now 3.7.0svn
llvm-svn: 226004
2015-01-14 17:38:03 +00:00
Sanjay Patel
42ec4aebe9 fix typos
llvm-svn: 225991
2015-01-14 16:03:58 +00:00
Mehdi Amini
54e3de76f7 SelectionDAG: add a -filter-view-dags option to llc
This option takes the name of the basic block you want to visualize
with -view-*-dags

Differential Revision: http://reviews.llvm.org/D6948

llvm-svn: 225953
2015-01-14 06:03:18 +00:00
Hal Finkel
a11b7ea471 Revert "r225811 - Revert "r225808 - [PowerPC] Add StackMap/PatchPoint support""
This re-applies r225808, fixed to avoid problems with SDAG dependencies along
with the preceding fix to ScheduleDAGSDNodes::RegDefIter::InitNodeNumDefs.
These problems caused the original regression tests to assert/segfault on many
(but not all) systems.

Original commit message:

This commit does two things:

 1. Refactors PPCFastISel to use more of the common infrastructure for call
    lowering (this lets us take advantage of this common code for lowering some
    common intrinsics, stackmap/patchpoint among them).

 2. Adds support for stackmap/patchpoint lowering. For the most part, this is
    very similar to the support in the AArch64 target, with the obvious differences
    (different registers, NOP instructions, etc.). The test cases are adapted
    from the AArch64 test cases.

One difference of note is that the patchpoint call sequence takes 24 bytes, so
you can't use less than that (on AArch64 you can go down to 16). Also, as noted
in the docs, we take the patchpoint address to be the actual code address
(assuming the call is local in the TOC-sharing sense), which should yield
higher performance than generating the full cross-DSO indirect-call sequence
and is likely just as useful for JITed code (if not, we'll change it).

StackMaps and Patchpoints are still marked as experimental, and so this support
is doubly experimental. So go ahead and experiment!

llvm-svn: 225909
2015-01-14 01:07:51 +00:00
Duncan P. N. Exon Smith
85eaac222d AsmParser/Bitcode: Add support for MDLocation
This adds assembly and bitcode support for `MDLocation`.  The assembly
side is rather big, since this is the first `MDNode` subclass (that
isn't `MDTuple`).  Part of PR21433.

(If you're wondering where the mountains of testcase updates are, we
don't need them until I update `DILocation` and `DebugLoc` to actually
use this class.)

llvm-svn: 225830
2015-01-13 21:10:44 +00:00
Peter Collingbourne
4b966fed4c Add link to Go bindings documentation.
llvm-svn: 225815
2015-01-13 18:49:42 +00:00
Hal Finkel
c6fdfe466f Revert "r225808 - [PowerPC] Add StackMap/PatchPoint support"
Reverting this while I investiage buildbot failures (segfaulting in
GetCostForDef at ScheduleDAGRRList.cpp:314).

llvm-svn: 225811
2015-01-13 18:25:05 +00:00
Hal Finkel
ed17decbc6 [PowerPC] Add StackMap/PatchPoint support
This commit does two things:

 1. Refactors PPCFastISel to use more of the common infrastructure for call
    lowering (this lets us take advantage of this common code for lowering some
    common intrinsics, stackmap/patchpoint among them).

 2. Adds support for stackmap/patchpoint lowering. For the most part, this is
    very similar to the support in the AArch64 target, with the obvious differences
    (different registers, NOP instructions, etc.). The test cases are adapted
    from the AArch64 test cases.

One difference of note is that the patchpoint call sequence takes 24 bytes, so
you can't use less than that (on AArch64 you can go down to 16). Also, as noted
in the docs, we take the patchpoint address to be the actual code address
(assuming the call is local in the TOC-sharing sense), which should yield
higher performance than generating the full cross-DSO indirect-call sequence
and is likely just as useful for JITed code (if not, we'll change it).

StackMaps and Patchpoints are still marked as experimental, and so this support
is doubly experimental. So go ahead and experiment!

llvm-svn: 225808
2015-01-13 17:48:12 +00:00
Daniel Sanders
d8785475d6 Added a Mips lld milestone to the release notes for the 3.6 release.
llvm-svn: 225797
2015-01-13 15:17:00 +00:00
Peter Zotov
daac044e00 Update release notes wrt OCaml bindings.
llvm-svn: 225779
2015-01-13 09:48:02 +00:00
Reid Kleckner
033ced7470 Rename llvm.recoverframeallocation to llvm.framerecover
This name is less descriptive, but it sort of puts things in the
'llvm.frame...' namespace, relating it to frameallocate and
frameaddress. It also avoids using "allocate" and "allocation" together.

llvm-svn: 225752
2015-01-13 01:51:34 +00:00
Paul Robinson
457a3390d3 Phabricator calls it "subscriber" not "cc"
llvm-svn: 225747
2015-01-13 00:50:31 +00:00
Reid Kleckner
002e480f22 Add the llvm.frameallocate and llvm.recoverframeallocation intrinsics
These intrinsics allow multiple functions to share a single stack
allocation from one function's call frame. The function with the
allocation may only perform one allocation, and it must be in the entry
block.

Functions accessing the allocation call llvm.recoverframeallocation with
the function whose frame they are accessing and a frame pointer from an
active call frame of that function.

These intrinsics are very difficult to inline correctly, so the
intention is that they be introduced rarely, or at least very late
during EH preparation.

Reviewers: echristo, andrew.w.kaylor

Differential Revision: http://reviews.llvm.org/D6493

llvm-svn: 225746
2015-01-13 00:48:10 +00:00
Bill Schmidt
47f17cdeb1 First crack at PowerPC 3.6 release notes
llvm-svn: 225695
2015-01-12 20:46:43 +00:00
Daniel Sanders
716d3b6d00 Fix silly mistake in release notes for Mips.
llvm-svn: 225608
2015-01-11 10:48:20 +00:00
Daniel Sanders
73fe04fbdf Added release notes for the Mips target.
llvm-svn: 225607
2015-01-11 10:34:52 +00:00
Hans Wennborg
4c1e23124f ReleaseNotes.rst: these are for 3.6
llvm-svn: 225482
2015-01-09 00:21:26 +00:00
Duncan P. N. Exon Smith
da1e88cbe8 LangRef: Add usage points for distinct MDNodes
Omission pointed out by Sean Silva!

llvm-svn: 225479
2015-01-08 23:50:26 +00:00
Duncan P. N. Exon Smith
bc9ee9160a IR: Add 'distinct' MDNodes to bitcode and assembly
Propagate whether `MDNode`s are 'distinct' through the other types of IR
(assembly and bitcode).  This adds the `distinct` keyword to assembly.

Currently, no one actually calls `MDNode::getDistinct()`, so these nodes
only get created for:

  - self-references, which are never uniqued, and
  - nodes whose operands are replaced that hit a uniquing collision.

The concept of distinct nodes is still not quite first-class, since
distinct-ness doesn't yet survive across `MapMetadata()`.

Part of PR22111.

llvm-svn: 225474
2015-01-08 22:38:29 +00:00
Eric Christopher
09a68860d8 The Kaleidoscope tutorial should be using "mcjit" for the library,
"jit" doesn't exist anymore.

llvm-svn: 225462
2015-01-08 19:07:01 +00:00
Sean Silva
b85a13e7a0 [LangRef] PR22118: Hyphen is allowed in IR identifiers.
E.g. %-foo and %fo-o.

Thanks to eagle-eyed reporter Tomas Brukner.

llvm-svn: 225400
2015-01-07 21:35:14 +00:00
Rafael Espindola
20dc6c7571 Change the .ll syntax for comdats and add a syntactic sugar.
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-06 22:55:16 +00:00
Hal Finkel
c9c79966c3 [LangRef] Correct a typo
llvm-svn: 225148
2015-01-05 04:05:21 +00:00
Philip Reames
bebd90afce Reformat statepoint documentation and fix a couple of typos
Patch by Ramkumar Ramachandra <artagnon@gmail.com>.

llvm-svn: 225084
2015-01-02 19:46:49 +00:00
Elena Demikhovsky
60c95a11c8 Fixed 2 minor typos in the documentation.
llvm-svn: 224917
2014-12-29 09:47:51 +00:00
Elena Demikhovsky
01c94906b1 Documentation for Masked Load and Store intrinsics.
llvm-svn: 224832
2014-12-25 09:29:13 +00:00
Duncan P. N. Exon Smith
9c5542c040 IR: Make metadata typeless in assembly
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-15 19:07:53 +00:00
Rafael Espindola
ee596e4631 Require python 2.7.
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-12 15:29:31 +00:00
Stepan Dyatkovskiy
afc2834821 Added documentation for MergeFunctions pass:
Pass looks for equivalent functions that are mergable and folds them.

llvm-svn: 223931
2014-12-10 17:42:01 +00:00
Eric Christopher
fd56b800f7 Add argument variable support to the debug info tutorial
and rearrange the prologue source location hack to immediately
after it.

llvm-svn: 223725
2014-12-09 00:28:24 +00:00
Eric Christopher
2d57946d3f Clean up the rst for the debug info tutorial
llvm-svn: 223682
2014-12-08 18:48:08 +00:00
Justin Bogner
430d01bf77 InstrProf: An intrinsic and lowering for instrumentation based profiling
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-08 18:02:35 +00:00
Eric Christopher
662fb328d7 Add Chapter 8 to the Kaleidoscope tutorial. This chapter adds
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-08 18:00:47 +00:00
Philip Reames
bf871401c6 Add a section to Statepoint docs mentioning shared bugzilla search and standard mailing lists
llvm-svn: 223374
2014-12-04 18:33:28 +00:00
Philip Reames
3ec8a1db50 Minor typo and link fixes for Statepoint documentation
llvm-svn: 223327
2014-12-04 00:45:23 +00:00
Nico Weber
57d7b4cc5a Fix grammar-o.
llvm-svn: 223265
2014-12-03 20:58:23 +00:00
Matt Arsenault
5fc0f8ef48 Fix sphinx error from Statepoints.rst
It was complaining it wasn't included in any toctree

llvm-svn: 223254
2014-12-03 18:35:11 +00:00
Benjamin Poulain
d00638fd57 Fix a typo in the documentation of LTO
Fix defininitions->definitions.

Reviewed by David Blaikie.

llvm-svn: 223216
2014-12-03 07:32:36 +00:00
Peter Collingbourne
837799f13b Prologue support
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-03 02:08:38 +00:00
Philip Reames
f2916b94a2 [Statepoints 4/4] Statepoint infrastructure for garbage collection: 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-02 19:37:00 +00:00
Peter Zotov
a7ec66eea2 [OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module.
This way most code won't link this (substantially large) library,
if compiled statically with LLVM.

llvm-svn: 223072
2014-12-01 19:50:39 +00:00
Peter Zotov
a05f11b29b [OCaml] [cmake] Add CMake buildsystem for OCaml.
Closes PR15325.

llvm-svn: 223071
2014-12-01 19:50:23 +00:00
Craig Topper
886524ee76 Remove neverHasSideEffects support from TableGen CodeGenInstruction. Everyone should use hasSideEffects now.
llvm-svn: 222809
2014-11-26 04:11:14 +00:00
Philip Reames
754fe149f7 Clarify wording in the LangRef around !invariant.load
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-24 22:32:43 +00:00
Sergey Dmitrouk
3881f8ff0b Correct path to regression tests in ExtendingLLVM
llvm-svn: 222678
2014-11-24 19:40:07 +00:00
Hal Finkel
0585cabc00 Clarify the description of the noalias attribute
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-21 02:22:46 +00:00
Evgeniy Stepanov
ddd2cc6a9c Use ninja pools to limit the number of concurrent compile/link jobs.
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-19 10:30:02 +00:00
Justin Bogner
803e42d7fd docs: Modernize some examples in WritingAnLLVMPass
llvm-svn: 222223
2014-11-18 05:22:39 +00:00
Justin Bogner
08c0d90d50 docs: Fix a couple of typo-ish errors in WritingAnLLVMPass
- 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-18 05:00:52 +00:00
Tom Stellard
a4aabd3acb R600/SI: Start implementing an assembler
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-14 14:08:00 +00:00
Rafael Espindola
1211724863 configure.ac lives in autoconf/, not autotools/
Patch by Palmer Dabbelt!

llvm-svn: 221638
2014-11-10 22:36:04 +00:00
Lang Hames
6534f9fb1c [Docs][JIT] Update the clang++ invocation lines in the kaleidoscope docs.
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-06 00:31:04 +00:00
Sean Silva
57c7484568 [docs] Document usage of Inputs/ for extra test files.
llvm-svn: 221406
2014-11-05 22:17:18 +00:00
Tim Northover
930987d42f Docs: give binutils/gold instructions for CMake too.
Patch by Steve King.

llvm-svn: 221227
2014-11-04 02:16:03 +00:00
Tim Northover
f8a6bde1fb Docs: update va_arg example with valid x86_64 va_list type.
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-11-02 01:21:51 +00:00
Seo Sanghyeon
e3b22c6c38 VMCore was renamed to IR long time ago
llvm-svn: 220838
2014-10-29 05:20:39 +00:00
Peter Zotov
bf7eed6b08 [OCaml] PR14083, PR9606: Only pick *.odoc files from current build target.
When several build targets, e.g. Debug+Asserts and Release+Asserts
are present, ocamldoc complains of duplicate interfaces.

llvm-svn: 220831
2014-10-28 22:45:25 +00:00
Juergen Ributzka
9ebe806a35 Update llvm.donothing documentation.
llvm.donothing is no longer the only intrinsic that can be invoked.

llvm-svn: 220530
2014-10-23 22:36:13 +00:00
Matt Arsenault
192429493a Fix number of operands in documentation for minnum / maxnum
llvm-svn: 220402
2014-10-22 18:25:02 +00:00
Matt Arsenault
66f5850df1 Try to fix documentation bot warning
llvm-svn: 220352
2014-10-22 00:15:53 +00:00
Matt Arsenault
74dd906076 Add minnum / maxnum intrinsics
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-21 23:00:20 +00:00
Philip Reames
cb6ff55dfa Introduce a 'nonnull' metadata on Load instructions.
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-20 22:40:55 +00:00
Alexander Potapenko
f1146b8238 [llvm-symbolizer] Introduce the -dsym-hint option.
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-17 00:50:19 +00:00
Rafael Espindola
253081a9b6 Delete -std-compile-opts.
These days -std-compile-opts was just a silly alias for -O3.

llvm-svn: 219951
2014-10-16 20:00:02 +00:00
Jonathan Roelofs
8d22c58801 Fix lang-ref doc bug: s/icmp lt/icmp slt/
llvm-svn: 219947
2014-10-16 19:28:10 +00:00
Peter Collingbourne
446da99897 Introduce Go coding standards for LLVM.
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-14 00:40:53 +00:00
Paul Robinson
e1f50ad271 Update the example of using a command-line option custom parser to
match the current implementation.

Patch by Douglas Yung!

llvm-svn: 219631
2014-10-13 21:11:22 +00:00
Frederic Riss
b9c655ff6b Update dwarf::ApplePropertyAttributes enum to meaningful values.
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-08 14:59:44 +00:00
Matt Arsenault
02f37b0e55 Update documentation with link to Sea Islands documentation
llvm-svn: 219134
2014-10-06 18:31:09 +00:00
Duncan P. N. Exon Smith
ccfae8edc5 DI: Fixup global syntax in example
llvm-svn: 219056
2014-10-04 15:44:01 +00:00
Duncan P. N. Exon Smith
23a107ef30 DI: Line up comments in examples
llvm-svn: 219055
2014-10-04 15:35:25 +00:00
Duncan P. N. Exon Smith
a8dcc79ed3 DI: Fixup example IR from r219051
llvm-svn: 219054
2014-10-04 15:31:08 +00:00
Duncan P. N. Exon Smith
e52ab99166 DI: Prune another example
llvm-svn: 219053
2014-10-04 15:30:52 +00:00
Duncan P. N. Exon Smith
9e10a6fe57 DI: Update and prune metadata examples
Update a couple of the examples of debug info metadata, and prune the
rest.  Point to the true reference implementation in the source.

llvm-svn: 219051
2014-10-04 14:56:56 +00:00
Jonathan Roelofs
e04abe6476 Fix typo in TableGen documentation
llvm-svn: 219018
2014-10-03 20:46:05 +00:00
Adrian Prantl
06bb7fa683 Add a reference to Phabricator.rst to docs/index.rst.
llvm-svn: 219015
2014-10-03 20:17:32 +00:00
Duncan P. N. Exon Smith
c1be4794ba Revert "Revert "DI: Fold constant arguments into a single MDString""
This reverts commit r218918, effectively reapplying r218914 after fixing
an Ocaml bindings test and an Asan crash.  The root cause of the latter
was a tightened-up check in `DILexicalBlock::Verify()`, so I'll file a
PR to investigate who requires the loose check (and why).

Original commit message follows.

--

This patch addresses the first stage of PR17891 by folding constant
arguments together into a single MDString.  Integers are stringified and
a `\0` character is used as a separator.

Part of PR17891.

Note: I've attached my testcases upgrade scripts to the PR.  If I've
just broken your out-of-tree testcases, they might help.

llvm-svn: 219010
2014-10-03 20:01:09 +00:00
Dan Liew
1d93684587 [sphinx cleanup] Fix unexpected indentation warning introduced by r218937
llvm-svn: 218982
2014-10-03 12:28:48 +00:00
Robin Morisset
b6ec3ac01d Update Atomics.rst
Summary:
I changed various bits of the compilation of atomics recently, and forgot
updating the documentation. This patch just brings it up to date.

Test Plan: no change to the code

Reviewers: jfb

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5590

llvm-svn: 218937
2014-10-03 01:04:20 +00:00
Duncan P. N. Exon Smith
fb6bcc4eb2 Revert "DI: Fold constant arguments into a single MDString"
This reverts commit r218914 while I investigate some bots.

llvm-svn: 218918
2014-10-02 22:15:31 +00:00
Duncan P. N. Exon Smith
58b6077a79 DI: Fold constant arguments into a single MDString
This patch addresses the first stage of PR17891 by folding constant
arguments together into a single MDString.  Integers are stringified and
a `\0` character is used as a separator.

Part of PR17891.

Note: I've attached my testcases upgrade scripts to the PR.  If I've
just broken your out-of-tree testcases, they might help.

llvm-svn: 218914
2014-10-02 21:56:57 +00:00
Adrian Prantl
2b1df58ebe Move the complex address expression out of DIVariable and into an extra
argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.

Previously, DIVariable was a variable-length field that has an optional
reference to a Metadata array consisting of a variable number of
complex address expressions. In the case of OpPiece expressions this is
wasting a lot of storage in IR, because when an aggregate type is, e.g.,
SROA'd into all of its n individual members, the IR will contain n copies
of the DIVariable, all alike, only differing in the complex address
reference at the end.

By making the complex address into an extra argument of the
dbg.value/dbg.declare intrinsics, all of the pieces can reference the
same variable and the complex address expressions can be uniqued across
the CU, too.
Down the road, this will allow us to move other flags, such as
"indirection" out of the DIVariable, too.

The new intrinsics look like this:
declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr)
declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr)

This patch adds a new LLVM-local tag to DIExpressions, so we can detect
and pretty-print DIExpression metadata nodes.

What this patch doesn't do:

This patch does not touch the "Indirect" field in DIVariable; but moving
that into the expression would be a natural next step.

http://reviews.llvm.org/D4919
rdar://problem/17994491

Thanks to dblaikie and dexonsmith for reviewing this patch!

Note: I accidentally committed a bogus older version of this patch previously.
llvm-svn: 218787
2014-10-01 18:55:02 +00:00
Adrian Prantl
0959156fa3 Revert r218778 while investigating buldbot breakage.
"Move the complex address expression out of DIVariable and into an extra"

llvm-svn: 218782
2014-10-01 18:10:54 +00:00
Adrian Prantl
229943585f Move the complex address expression out of DIVariable and into an extra
argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.

Previously, DIVariable was a variable-length field that has an optional
reference to a Metadata array consisting of a variable number of
complex address expressions. In the case of OpPiece expressions this is
wasting a lot of storage in IR, because when an aggregate type is, e.g.,
SROA'd into all of its n individual members, the IR will contain n copies
of the DIVariable, all alike, only differing in the complex address
reference at the end.

By making the complex address into an extra argument of the
dbg.value/dbg.declare intrinsics, all of the pieces can reference the
same variable and the complex address expressions can be uniqued across
the CU, too.
Down the road, this will allow us to move other flags, such as
"indirection" out of the DIVariable, too.

The new intrinsics look like this:
declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr)
declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr)

This patch adds a new LLVM-local tag to DIExpressions, so we can detect
and pretty-print DIExpression metadata nodes.

What this patch doesn't do:

This patch does not touch the "Indirect" field in DIVariable; but moving
that into the expression would be a natural next step.

http://reviews.llvm.org/D4919
rdar://problem/17994491

Thanks to dblaikie and dexonsmith for reviewing this patch!

llvm-svn: 218778
2014-10-01 17:55:39 +00:00
Jyoti Allur
b6f615c3fd fix a typo in doumentation index.
llvm-svn: 218504
2014-09-26 06:59:15 +00:00
Sylvestre Ledru
7bf0243f90 Update my previous commit to fit 80 cols...
llvm-svn: 218448
2014-09-25 10:58:16 +00:00
Sylvestre Ledru
6742db270f Details that -debug-only is not available when LLVM is built with --enable-optimized
llvm-svn: 218447
2014-09-25 10:57:00 +00:00
Jingyue Wu
419639cce3 [docs] Fixed a typo in Atomics.rst
llvm-svn: 218319
2014-09-23 17:35:28 +00:00
Peter Collingbourne
d4a588f39e Fix sphinx warning.
llvm-svn: 218081
2014-09-18 21:54:02 +00:00
Peter Collingbourne
3d7ffbad08 LTO: introduce object file-based on-disk module format.
This format is simply a regular object file with the bitcode stored in a
section named ".llvmbc", plus any number of other (non-allocated) sections.

One immediate use case for this is to accommodate compilation processes
which expect the object file to contain metadata in non-allocated sections,
such as the ".go_export" section used by some Go compilers [1], although I
imagine that in the future we could consider compiling parts of the module
(such as large non-inlinable functions) directly into the object file to
improve LTO efficiency.

[1] http://golang.org/doc/install/gccgo#Imports

Differential Revision: http://reviews.llvm.org/D4371

llvm-svn: 218078
2014-09-18 21:28:49 +00:00
Daniel Sanders
3ba5dbed96 [docs] Mention character array constants in docs/LangRef.rst
Summary:
They were used in the 'Module Structure' example but weren't otherwise
documented.

Credit to Reed Kotler for noticing.

Reviewers: hans

Reviewed By: hans

Subscribers: hans, llvm-commits

Differential Revision: http://reviews.llvm.org/D5191

llvm-svn: 217583
2014-09-11 12:02:59 +00:00