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

5469 Commits

Author SHA1 Message Date
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