Commit Graph

5668 Commits

Author SHA1 Message Date
Philip Reames
6bb0038b54 Minor typo and link fixes for Statepoint documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223327 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-04 00:45:23 +00:00
Nico Weber
e3f12719fd Fix grammar-o.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223265 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03 20:58:23 +00:00
Matt Arsenault
99eff50c00 Fix sphinx error from Statepoints.rst
It was complaining it wasn't included in any toctree

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223254 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03 18:35:11 +00:00
Benjamin Poulain
a941057b6c Fix a typo in the documentation of LTO
Fix defininitions->definitions.

Reviewed by David Blaikie.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223216 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03 07:32:36 +00:00
Peter Collingbourne
bb660fc192 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223189 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03 02:08:38 +00:00
Philip Reames
70fb375383 [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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223143 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-02 19:37:00 +00:00
Peter Zotov
787a41926a [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223072 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 19:50:39 +00:00
Peter Zotov
a0a26f222b [OCaml] [cmake] Add CMake buildsystem for OCaml.
Closes PR15325.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223071 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 19:50:23 +00:00
Craig Topper
568f7e8228 Remove neverHasSideEffects support from TableGen CodeGenInstruction. Everyone should use hasSideEffects now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222809 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-26 04:11:14 +00:00
Philip Reames
d1940dcca7 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222700 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-24 22:32:43 +00:00
Sergey Dmitrouk
cd64acece2 Correct path to regression tests in ExtendingLLVM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222678 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-24 19:40:07 +00:00
Hal Finkel
57ec3b5488 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222497 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-21 02:22:46 +00:00
Evgeniy Stepanov
0e2f3ce8a0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222341 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-19 10:30:02 +00:00
Justin Bogner
0d7de42c25 docs: Modernize some examples in WritingAnLLVMPass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222223 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-18 05:22:39 +00:00
Justin Bogner
9804c41b55 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222222 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-18 05:00:52 +00:00
Tom Stellard
19cb35b4bc 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221994 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-14 14:08:00 +00:00
Rafael Espindola
dc0f7dfd86 configure.ac lives in autoconf/, not autotools/
Patch by Palmer Dabbelt!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221638 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-10 22:36:04 +00:00
Lang Hames
6c100e7428 [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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221419 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-06 00:31:04 +00:00
Sean Silva
39113744ca [docs] Document usage of Inputs/ for extra test files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221406 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-05 22:17:18 +00:00
Tim Northover
0a1d0f444b Docs: give binutils/gold instructions for CMake too.
Patch by Steve King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221227 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 02:16:03 +00:00
Tim Northover
79e72dd73c 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221077 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-02 01:21:51 +00:00
Seo Sanghyeon
e5639d3548 VMCore was renamed to IR long time ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220838 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-29 05:20:39 +00:00
Peter Zotov
8bc1b3c341 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220831 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-28 22:45:25 +00:00
Juergen Ributzka
c08387e220 Update llvm.donothing documentation.
llvm.donothing is no longer the only intrinsic that can be invoked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220530 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 22:36:13 +00:00
Matt Arsenault
e54627bf95 Fix number of operands in documentation for minnum / maxnum
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220402 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 18:25:02 +00:00
Matt Arsenault
469094d88f Try to fix documentation bot warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220352 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 00:15:53 +00:00
Matt Arsenault
252134602f 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220341 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 23:00:20 +00:00
Philip Reames
90f3f15da5 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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220240 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-20 22:40:55 +00:00
Alexander Potapenko
0fea775e5c [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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220004 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-17 00:50:19 +00:00
Rafael Espindola
2f8f1d34e3 Delete -std-compile-opts.
These days -std-compile-opts was just a silly alias for -O3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219951 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-16 20:00:02 +00:00
Jonathan Roelofs
0ab5b9f647 Fix lang-ref doc bug: s/icmp lt/icmp slt/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219947 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-16 19:28:10 +00:00
Peter Collingbourne
7c9c49b330 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219646 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-14 00:40:53 +00:00
Paul Robinson
9de9951e15 Update the example of using a command-line option custom parser to
match the current implementation.

Patch by Douglas Yung!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219631 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-13 21:11:22 +00:00
Frederic Riss
6c54948916 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219311 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-08 14:59:44 +00:00
Matt Arsenault
27069a921a Update documentation with link to Sea Islands documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219134 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-06 18:31:09 +00:00
Duncan P. N. Exon Smith
f13b76b94f DI: Fixup global syntax in example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219056 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-04 15:44:01 +00:00
Duncan P. N. Exon Smith
1225b7a30a DI: Line up comments in examples
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219055 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-04 15:35:25 +00:00
Duncan P. N. Exon Smith
a472e864de DI: Fixup example IR from r219051
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219054 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-04 15:31:08 +00:00
Duncan P. N. Exon Smith
c48707aec8 DI: Prune another example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219053 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-04 15:30:52 +00:00
Duncan P. N. Exon Smith
ffd2f5051e 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219051 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-04 14:56:56 +00:00
Jonathan Roelofs
69ee7cb4c3 Fix typo in TableGen documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219018 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-03 20:46:05 +00:00
Adrian Prantl
17dfc381ef Add a reference to Phabricator.rst to docs/index.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219015 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-03 20:17:32 +00:00
Duncan P. N. Exon Smith
83902832de 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219010 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-03 20:01:09 +00:00
Dan Liew
ea01fda5b3 [sphinx cleanup] Fix unexpected indentation warning introduced by r218937
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218982 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-03 12:28:48 +00:00
Robin Morisset
6f6512cba2 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218937 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-03 01:04:20 +00:00
Duncan P. N. Exon Smith
32e192aeb3 Revert "DI: Fold constant arguments into a single MDString"
This reverts commit r218914 while I investigate some bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218918 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-02 22:15:31 +00:00
Duncan P. N. Exon Smith
0917b70630 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218914 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-02 21:56:57 +00:00
Adrian Prantl
02474a32eb 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218787 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-01 18:55:02 +00:00
Adrian Prantl
10c4265675 Revert r218778 while investigating buldbot breakage.
"Move the complex address expression out of DIVariable and into an extra"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218782 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-01 18:10:54 +00:00
Adrian Prantl
076fd5dfc1 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218778 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-01 17:55:39 +00:00
Jyoti Allur
72db9e5b09 fix a typo in doumentation index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218504 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-26 06:59:15 +00:00
Sylvestre Ledru
b10671bb85 Update my previous commit to fit 80 cols...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218448 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-25 10:58:16 +00:00
Sylvestre Ledru
cabd41e17c Details that -debug-only is not available when LLVM is built with --enable-optimized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218447 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-25 10:57:00 +00:00
Jingyue Wu
04b11eb4ec [docs] Fixed a typo in Atomics.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218319 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-23 17:35:28 +00:00
Peter Collingbourne
b7fe5814ea Fix sphinx warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218081 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-18 21:54:02 +00:00
Peter Collingbourne
394be6c159 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218078 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-18 21:28:49 +00:00
Daniel Sanders
d7d96ee191 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217583 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-11 12:02:59 +00:00
Dan Liew
ec407162c1 [sphinx cleanup]
Fix sphinx warning introduced by r217537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217541 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-10 20:43:03 +00:00
Nico Weber
fb862fe974 Fix docs reference to inexistent class.
Patch sent via telegraph by TNorthover. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217537 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-10 19:50:55 +00:00
Hans Wennborg
2bb4229297 LangRef: @baz should be @bar in the COMDAT example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217520 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-10 17:05:08 +00:00
Dan Liew
c5bdff0176 Fix type error in insertvalue example in LangRef. %agg1 is of type {i32,
float} and thus cannot be used where a type {i32, {float}} is expected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217405 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-08 21:19:46 +00:00
Sean Silva
1bd9f9b618 [docs] Document what "NFC" means in a commit message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217292 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-06 00:19:16 +00:00
Andrew Trick
0452bfda4f Minor typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217226 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-05 04:56:43 +00:00
Nico Weber
a696808928 Fix link to 3.5 release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217164 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-04 15:26:10 +00:00
Joerg Sonnenberger
b9f34663cb Document !and. Fix !shl and friends -- they provide binary operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217034 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 13:17:03 +00:00
Eric Christopher
d5dd8ce2a5 Reinstate "Nuke the old JIT."
Approved by Jim Grosbach, Lang Hames, Rafael Espindola.

This reinstates commits r215111, 215115, 215116, 215117, 215136.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216982 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:28:02 +00:00
Rafael Espindola
6cae39f284 Add a note about AuroraUX to the release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216938 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 19:49:39 +00:00
Matt Arsenault
f9139d78f5 Add note to documentation about machine node chains.
I've been assuming chain operands were always the first operand,
since the documentation says this. I was confused about why they
were missing after instruction selection. Apparently the convention
changes to using the last operand for MachineSDNodes and I've never
noticed before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216934 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 19:18:52 +00:00
Robin Morisset
217b38e19a Fix typos in comments, NFC
Summary: Just fixing comments, no functional change.

Test Plan: N/A

Reviewers: jfb

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216784 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-29 21:53:01 +00:00
Alexey Samsonov
79e9b30b11 Introduce -DLLVM_USE_SANITIZER=Undefined CMake option to build UBSan-ified version of LLVM/Clang.
I've fixed most of the simple bugs and currently "check-llvm" test suite
has 26 failures, and "check-clang" suite has 5 failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216701 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-29 00:50:36 +00:00
Reid Kleckner
44b3a0b411 Declare that musttail calls in variadic functions forward the ellipsis
Summary:
There is no functionality change here except in the way we assemble and
dump musttail calls in variadic functions. There's really no need to
separate out the bits for musttail and "is forwarding varargs" on call
instructions. A musttail call by definition has to forward the ellipsis
or it would fail verification.

Reviewers: chandlerc, nlewycky

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216423 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-26 00:33:28 +00:00
Hans Wennborg
21f375620d ProgrammersManual: the flag is called -debug-only
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216316 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-23 04:34:58 +00:00
Rafael Espindola
e5e847a500 Clear the llvm release notes to make room for 3.6.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216292 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-22 21:57:38 +00:00
David Blaikie
c7260209a8 Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator changes to ensure discriminator changes don't introduce new DWARF DW_TAG_lexical_blocks.
Somewhat unnoticed in the original implementation of discriminators, but
it could cause instructions to end up in new, small,
DW_TAG_lexical_blocks due to the use of DILexicalBlock to track
discriminator changes.

Instead, use DILexicalBlockFile which we already use to track file
changes without introducing new scopes, so it works well to track
discriminator changes in the same way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216239 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21 22:45:21 +00:00
Eric Fiselier
29863d8e18 [LIT] Remove documentation for method since it does not exist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216204 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21 18:52:58 +00:00
Dan Liew
0ea6d4421c Add note to LangRef about how function arguments can be unnamed and
how this affects the numbering of unnamed temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216070 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-20 15:06:30 +00:00
Duncan P. N. Exon Smith
5a466d37d8 LangRef: Move example of function-scope uselistorder to a function
Should make the example added in r216025 a little more clear.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216027 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 21:48:04 +00:00
Duncan P. N. Exon Smith
7838818ad7 IR: Implement uselistorder assembly directives
Implement `uselistorder` and `uselistorder_bb` assembly directives,
which allow the use-list order to be recovered when round-tripping to
assembly.

This is the bulk of PR20515.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216025 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 21:30:15 +00:00
Alex Lorenz
e3cea5fd9a Docs: add documentation for the coverage mapping format.
Differential Revision: http://reviews.llvm.org/D4729


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215990 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 17:05:58 +00:00
Duncan P. N. Exon Smith
2788345a9b CodingStandards: Document std::equal misbehaviour
I should have included this as part of r215986, which worked around this
corner by changing ArrayRef::equals() not to use std::equal.  Alas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215988 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 16:49:40 +00:00
Eric Fiselier
407460e67d [LIT]Correct name of global lit configuration object to be lit_config (not lit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215695 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 05:54:19 +00:00
Rafael Espindola
1c9caced63 Delete support for AuroraUX.
auroraux.org is not resolving.

I will add this to the release notes as soon as I figure out where to put the
3.6 release notes :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215645 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-14 15:15:09 +00:00
Dan Liew
550abf8c29 Add SPHINX_WARNINGS_AS_ERRORS CMake option to allow warnings to not be
treated as errors (which is still the default). This is useful when
working on documentation that has existing errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215634 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-14 11:57:13 +00:00
Nick Lewycky
12a0c0b4b3 Fix examples of "named metadata" (some of which isn't named).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215522 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-13 04:54:05 +00:00
Sylvestre Ledru
a7f0941b83 Fix typos:
* libaries => libraries
* avaiable => available



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215366 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-11 18:04:46 +00:00
Eric Christopher
aa5b9c0f6f Temporarily Revert "Nuke the old JIT." as it's not quite ready to
be deleted. This will be reapplied as soon as possible and before
the 3.6 branch date at any rate.

Approved by Jim Grosbach, Lang Hames, Rafael Espindola.

This reverts commits r215111, 215115, 215116, 215117, 215136.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215154 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-07 22:02:54 +00:00
Rafael Espindola
875710a2fd Nuke the old JIT.
I am sure we will be finding bits and pieces of dead code for years to
come, but this is a good start.

Thanks to Lang Hames for making MCJIT a good replacement!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215111 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-07 14:21:18 +00:00
Pete Cooper
e216468fef Update Tablegen documents given that binary literals are now sized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215088 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-07 05:47:13 +00:00
JF Bastien
5e48675853 Fix typos in comments and doc
Committing http://reviews.llvm.org/D4798 for Robin Morisset (morisset@google.com)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214934 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-05 23:27:34 +00:00
Eric Christopher
9f85dccfc6 Remove the TargetMachine forwards for TargetSubtargetInfo based
information and update all callers. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214781 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 21:25:23 +00:00
David Blaikie
1bb69f17d8 Correct the emission kind constants committed in r214771
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214772 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 20:36:00 +00:00
David Blaikie
b00cca00f4 Document the "emission kind" field of the DICompileUnit in LLVM's Source Level Debugging metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214771 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 20:32:48 +00:00
Benjamin Kramer
a6a0f12942 Update links to the gcc and java documentation that 404'd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214700 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 09:26:40 +00:00
Eric Fiselier
2785e77db1 [lit] Add --show-xfail flag to LIT.
Summary:
This patch add a --show-xfail flag. If this flag is specified then each xfail test will be printed to output.
When it is not given xfail tests are ignored. Ignoring xfail tests is the current behavior.

This flag is meant to mirror the --show-unsupported flag that was recently added.

Reviewers: ddunbar, EricWF

Reviewed By: EricWF

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214609 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-02 01:29:52 +00:00
Adrian Prantl
2a39c993eb Debug info: Infrastructure to support debug locations for fragmented
variables (for example, by-value struct arguments passed in registers, or
large integer values split across several smaller registers).
On the IR level, this adds a new type of complex address operation OpPiece
to DIVariable that describes size and offset of a variable fragment.
On the DWARF emitter level, all pieces describing the same variable are
collected, sorted and emitted as DWARF expressions using the DW_OP_piece
and DW_OP_bit_piece operators.

http://reviews.llvm.org/D3373
rdar://problem/15928306

What this patch doesn't do / Future work:
- This patch only adds the backend machinery to make this work, patches
  that change SROA and SelectionDAG's type legalizer to actually create
  such debug info will follow. (http://reviews.llvm.org/D2680)
- Making the DIVariable complex expressions into an argument of dbg.value
  will reduce the memory footprint of the debug metadata.
- The sorting/uniquing of pieces should be moved into DebugLocEntry,
  to facilitate the merging of multi-piece entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214576 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-01 22:11:58 +00:00
Reid Kleckner
cdc41f5bcf docs: Strongly recommend setting rpath when using a local GCC toolchain
Users keep emailing us about the difficulties of getting LD_LIBRARY_PATH
into their environment, which should be completely unecessary. Try to
strengthen the rpath recommentation by putting in an example cmake
invocation.

Speaking of which, we might want to make CMake the recommended build
system in GettingStarted.html.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214565 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-01 21:40:53 +00:00
Eric Fiselier
156ce6cc13 Add documentation for lit's --show-unsupported flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214431 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 20:11:13 +00:00
Bill Schmidt
8d6cf4ddd3 Clarify in PowerPC release notes that 32-bit PIC support is incomplete.
As requested, changing this wording slightly.

Thanks,
Bill

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214430 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 20:04:51 +00:00
Bill Schmidt
b74ca14f1c Wrong heading level for PowerPC changes in release notes
Oops.  Used the wrong heading level by mistake.

Thanks,
Bill

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214405 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 15:20:30 +00:00
Bill Schmidt
40b4bf53c9 Release Notes: Overriding PPC64 and PPC64LE ABI defaults is not yet supported.
I wrongly included a description of a patch that came in after 3.5 branched
and has not been backported.

Thanks,
Bill

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214404 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 15:17:33 +00:00
Bill Schmidt
b0574ad2a2 Add PowerPC release notes for 3.5.
Here's my take on 3.5 changes for PowerPC.  Others please feel free to add,
edit, delete as desired.

Thanks,
Bill

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214403 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 14:38:17 +00:00
Richard Smith
d1d53e81f6 Fix some grammatical errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214383 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 04:25:36 +00:00
Rafael Espindola
d57120551f Use "weak alias" instead of "alias weak"
Before this patch we had

@a = weak global ...
but
@b = alias weak ...

The patch changes aliases to look more like global variables.

Looking at some really old code suggests that the reason was that the old
bison based parser had a reduction for alias linkages and another one for
global variable linkages. Putting the alias first avoided the reduce/reduce
conflict.

The days of the old .ll parser are long gone. The new one parses just "linkage"
and a later check is responsible for deciding if a linkage is valid in a
given context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214355 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-30 22:51:54 +00:00
Alex Lorenz
31c0b5bc44 docs: update the command guide documentation for llvm-profdata.
Differential Revision: http://reviews.llvm.org/D4726


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214331 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-30 20:30:11 +00:00
Hans Wennborg
dab34a615b LangRef: add a note about the mangling-suppressing \01 prefix
Someone asked about this on IRC the other day, and I couldn't
find the magic prefix documented anywhere.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214329 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-30 20:02:08 +00:00
Manuel Jacob
b5b178a1ed Correct vector type definition in LangRef.
According to VectorType::isValidElementType, any integer, floating point
or pointer type is a valid vector element type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214302 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-30 12:30:06 +00:00
Hans Wennborg
0b783fc554 Update LLVM version: 3.5 => 3.6
We branched 3.5, it's now time to work on 3.6.

This is Sylvestre's patch from [1] plus regenerated configure
file by me, and minus the release notes reset, which Sean
pointed out [2] should happen later.

 1. http://reviews.llvm.org/D4660
 2. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140721/111137.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214131 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-28 22:10:52 +00:00
Dan Liew
1149da67c5 Document the new LLVM CMake interface for building against LLVM
libraries. With many contributions from Brad King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214077 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-28 13:36:37 +00:00
Dan Liew
e301e0b9a1 Fixed sphinx warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214076 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-28 13:33:51 +00:00
Hal Finkel
8ef7b17dfc Add @llvm.assume, lowering, and some basic properties
This is the first commit in a series that add an @llvm.assume intrinsic which
can be used to provide the optimizer with a condition it may assume to be true
(when the control flow would hit the intrinsic call). Some basic properties are added here:

 - llvm.invariant(true) is dead.
 - llvm.invariant(false) is unreachable (this directly corresponds to the
   documented behavior of MSVC's __assume(0)), so is llvm.invariant(undef).

The intrinsic is tagged as writing arbitrarily, in order to maintain control
dependencies. BasicAA has been updated, however, to return NoModRef for any
particular location-based query so that we don't unnecessarily block code
motion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213973 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-25 21:13:35 +00:00
Hal Finkel
6f5c609076 Simplify and improve scoped-noalias metadata semantics
In the process of fixing the noalias parameter -> metadata conversion process
that will take place during inlining (which will be committed soon, but not
turned on by default), I have come to realize that the semantics provided by
yesterday's commit are not really what we want. Here's why:

void foo(noalias a, noalias b, noalias c, bool x) {
  *q = x ? a : b;
  *c = *q;
}

Generically, we know that *c does not alias with *a and with *b (so there is an
'and' in what we know we're not), and we know that *q might be derived from *a
or from *b (so there is an 'or' in what we know that we are). So we do not want
the semantics currently, where any noalias scope matching any alias.scope
causes a NoAlias return. What we want to know is that the noalias scopes form a
superset of the alias.scope list (meaning that all the things we know we're not
is a superset of all of things the other instruction might be).

Making that change, however, introduces a composibility problem. If we inline
once, adding the noalias metadata, and then inline again adding more, and we
append new scopes onto the noalias and alias.scope lists each time. But, this
means that we could change what was a NoAlias result previously into a MayAlias
result because we appended an additional scope onto one of the alias.scope
lists. So, instead of giving scopes the ability to have parents (which I had
borrowed from the TBAA implementation, but seems increasingly unlikely to be
useful in practice), I've given them domains. The subset/superset condition now
applies within each domain independently, and we only need it to hold in one
domain. Each time we inline, we add the new scopes in a new scope domain, and
everything now composes nicely. In addition, this simplifies the
implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213948 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-25 15:50:02 +00:00
Hal Finkel
16fd27b2c3 Add scoped-noalias metadata
This commit adds scoped noalias metadata. The primary motivations for this
feature are:
  1. To preserve noalias function attribute information when inlining
  2. To provide the ability to model block-scope C99 restrict pointers

Neither of these two abilities are added here, only the necessary
infrastructure. In fact, there should be no change to existing functionality,
only the addition of new features. The logic that converts noalias function
parameters into this metadata during inlining will come in a follow-up commit.

What is added here is the ability to generally specify noalias memory-access
sets. Regarding the metadata, alias-analysis scopes are defined similar to TBAA
nodes:

!scope0 = metadata !{ metadata !"scope of foo()" }
!scope1 = metadata !{ metadata !"scope 1", metadata !scope0 }
!scope2 = metadata !{ metadata !"scope 2", metadata !scope0 }
!scope3 = metadata !{ metadata !"scope 2.1", metadata !scope2 }
!scope4 = metadata !{ metadata !"scope 2.2", metadata !scope2 }

Loads and stores can be tagged with an alias-analysis scope, and also, with a
noalias tag for a specific scope:

... = load %ptr1, !alias.scope !{ !scope1 }
... = load %ptr2, !alias.scope !{ !scope1, !scope2 }, !noalias !{ !scope1 }

When evaluating an aliasing query, if one of the instructions is associated
with an alias.scope id that is identical to the noalias scope associated with
the other instruction, or is a descendant (in the scope hierarchy) of the
noalias scope associated with the other instruction, then the two memory
accesses are assumed not to alias.

Note that is the first element of the scope metadata is a string, then it can
be combined accross functions and translation units. The string can be replaced
by a self-reference to create globally unqiue scope identifiers.

[Note: This overview is slightly stylized, since the metadata nodes really need
to just be numbers (!0 instead of !scope0), and the scope lists are also global
unnamed metadata.]

Existing noalias metadata in a callee is "cloned" for use by the inlined code.
This is necessary because the aliasing scopes are unique to each call site
(because of possible control dependencies on the aliasing properties). For
example, consider a function: foo(noalias a, noalias b) { *a = *b; } that gets
inlined into bar() { ... if (...) foo(a1, b1); ... if (...) foo(a2, b2); } --
now just because we know that a1 does not alias with b1 at the first call site,
and a2 does not alias with b2 at the second call site, we cannot let inlining
these functons have the metadata imply that a1 does not alias with b2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213864 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-24 14:25:39 +00:00
Rafael Espindola
b74b9541ac Document what backwards compatibility we provide for bitcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213813 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-23 22:43:22 +00:00
Mark Heffernan
e8d7ebcd5a In unroll pragma syntax and loop hint metadata, change "enable" forms to a new form using the string "full".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213772 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-23 17:31:37 +00:00
Daniel Sanders
e35dcb69b8 Added release notes for MIPS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213749 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-23 12:59:26 +00:00
Dan Liew
66ce49d22a Revert "Treat warnings in Sphinx as errors. The reasons for doing this are..."
This reverts commit r213661.

Reverting at the request of Sean Silva.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213675 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 18:09:17 +00:00
Hal Finkel
b3b2aac5be Make use of the align parameter attribute for all pointer arguments
We previously supported the align attribute on all (pointer) parameters, but we
only used it for byval parameters. However, it is completely consistent at the
IR level to treat 'align n' on all pointer parameters as an alignment
assumption on the pointer, and now we wll. Specifically, this causes
computeKnownBits to use the align attribute on all pointer parameters, not just
byval parameters. I've also added an explicit parameter attribute test for this
to test/Bitcode/attributes.ll.

And I've updated the LangRef to document the align parameter attribute (as it
turns out, it was not documented at all previously, although the byval
documentation mentioned that it could be used).

There are (at least) two benefits to doing this:
 - It allows enhancing alignment based on the pointer alignment after inlining callees.
 - It allows simplification of pointer arithmetic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213670 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 16:58:55 +00:00
Dan Liew
976824a7a4 Added LLVM_ENABLE_RTTI and LLVM_ENABLE_EH options that allow RTTI and EH
to globally be controlled. Individual targets (e.g.  ExceptionDemo) can
still override this by using LLVM_REQUIRE_RTTI and LLVM_REQUIRE_EH if
they need to be compiled with RTTI or exception handling respectively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213663 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 15:41:18 +00:00
Dan Liew
43b471c45e Treat warnings in Sphinx as errors. The reasons for doing this are...
- When CMake builds the documentation with sphinx-build it treats
  warnings as errors. We should be consistent with what we do in
  CMake.
- Having warnings treated as errors will hopefully encourage
  developers to write documentation correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213661 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 15:07:35 +00:00
Dan Liew
d883110014 Fix Sphinx warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213660 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 14:59:38 +00:00
Mark Heffernan
bc7f1aba2d Rename metadata llvm.loop.vectorize.unroll to llvm.loop.vectorize.interleave.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213588 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-21 23:11:03 +00:00
Duncan P. N. Exon Smith
facdfc6781 Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges."
This reverts commit r213474 (and r213475), which causes a miscompile on
a stage2 LTO build.  I'll reply on the list in a moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213562 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-21 17:06:51 +00:00
Dan Liew
cef5388ce8 Fix Sphinx warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213559 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-21 16:39:00 +00:00
Tom Stellard
9f276b7021 docs: Update relaease documents to include the patch number in the RELEASE tags
This will make it easier to update the release scripts to support
bug-fix releases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213544 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-21 14:28:31 +00:00
Manuel Jacob
a4697dad19 [C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges.
Summary: This patch introduces two new iterator ranges and updates existing code to use it.  No functional change intended.

Test Plan: All tests (make check-all) still pass.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213474 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-20 09:10:11 +00:00
Mark Heffernan
8ec1546db4 Add loop unrolling metadata descriptions to docs/LangRef.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213397 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-18 19:24:51 +00:00
Hal Finkel
11af4b49b2 Add a dereferenceable attribute
This attribute indicates that the parameter or return pointer is
dereferenceable. Practically speaking, loads from such a pointer within the
associated byte range are safe to speculatively execute. Such pointer
parameters are common in source languages (C++ references, for example).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213385 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-18 15:51:28 +00:00
Reid Kleckner
5d83e5bdd5 Remove rules against std::function from the programmer's manual
Clarify that llvm::function_ref is like StringRef for callables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213326 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-17 22:43:00 +00:00
Alp Toker
3cf9f37312 Drop the udis86 wrapper from llvm::sys
This optional dependency on the udis86 library was added some time back to aid
JIT development, but doesn't make much sense to link into LLVM binaries these
days.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213300 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-17 20:05:29 +00:00
Adam Nemet
30cced119b [TableGen] Allow shift operators to take bits<n>
Convert the operand to int if possible, i.e. if the value is properly
initialized.  (I suppose there is further room for improvement here to also
peform the shift if the uninitialized bits are shifted out.)

With this little change we can now compute the scaling factor for compressed
displacement with pure tablegen code in the X86 backend.  This is useful
because both the X86-disassembler-specific part of tablegen and the assembler
need this and TD is the natural sharing place.

The patch also adds the missing documentation for the shift and add operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213277 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-17 17:04:27 +00:00
Tim Northover
3e61ccdded CodeGen: extend f16 conversions to permit types > float.
This makes the two intrinsics @llvm.convert.from.f16 and
@llvm.convert.to.f16 accept types other than simple "float". This is
only strictly needed for the truncate operation, since otherwise
double rounding occurs and there's no way to represent the strict IEEE
conversion. However, for symmetry we allow larger types in the extend
too.

During legalization, we can expand an "fp16_to_double" operation into
two extends for convenience, but abort when the truncate isn't legal. A new
libcall is probably needed here.

Even after this commit, various target tweaks are needed to actually use the
extended intrinsics. I've put these into separate commits for clarity, so there
are no actual tests of f64 conversion here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213248 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-17 10:51:23 +00:00
Hal Finkel
e0fd412fb2 Fix a typo in the inalloca description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213200 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-16 21:22:46 +00:00
Duncan P. N. Exon Smith
c12ce2b661 ADT: Add MapVector::remove_if
Add a `MapVector::remove_if()` that erases items in bulk in linear time,
as opposed to quadratic time for repeated calls to `MapVector::erase()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213090 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-15 20:24:56 +00:00
Duncan P. N. Exon Smith
d9ebc5991b ADT: Fix MapVector::erase()
Actually update the changed indexes in the map portion of `MapVector`
when erasing from the middle.  Add a unit test that checks for this.

Note that `MapVector::erase()` is a linear time operation (it was and
still is).  I'll commit a new method in a moment called
`MapVector::remove_if()` that deletes multiple entries in linear time,
which should be slightly less painful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213084 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-15 18:32:30 +00:00
Reid Kleckner
cbebdef6eb Document the maximum LLVM IR alignment, which is 1 << 29 or 0.5 GiB
Add verifier checks.  We already check these in the assembly parser, but
a frontend producing IR in memory wouldn't hit those checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213027 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-15 01:16:09 +00:00
Sanjay Patel
e0a56a0cf6 fixed link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212977 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-14 19:52:36 +00:00
Alexander Kornienko
c58b079d23 Add FileCheck -implicit-check-not option to allow stricter tests without adding too many CHECK-NOTs manually.
Summary:
Add FileCheck -implicit-check-not option which allows specifying a
pattern that should only occur in the input when explicitly matched by a
positive check. This feature allows checking tool diagnostics in a way
clang -verify does it for compiler diagnostics.

The option has been tested on a number of clang-tidy checks, I'll post a link to
the clang-tidy patch to this thread.

Once there's an agreement on the general direction, I can add tests and
documentation.

Reviewers: djasper, bkramer

Reviewed By: bkramer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212810 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11 12:39:32 +00:00
Matt Arsenault
985d66c081 Fix types in documentation.
The examples were using f32, but the IR type is called float

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212675 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-10 03:22:16 +00:00
Cameron McInally
9753da175d Update ReleaseNotes to mention Atomic NAND semantic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212635 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-09 18:29:55 +00:00
Sanjay Patel
d4921230be fixed typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212355 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-04 19:40:43 +00:00
Sylvestre Ledru
2856d23b9c Phabricator doc: Explicit the fact that the patch needs to be there before the commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212328 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-04 09:00:35 +00:00
Rafael Espindola
bc04f3c793 Expand the note about llvm-ar now that inline asm works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212292 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-03 21:34:25 +00:00
Sylvestre Ledru
6508430c76 Also document the 'arc commit' commands in the 'Committing a change' section of the Phabricator doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212184 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-02 15:25:25 +00:00
Reid Kleckner
6dfd006fcf Remove the recommendation against using std::function
Clang-cl supports MSVC-style RTTI now, and we can even compile
typeid(...) with /GR-.  Just don't instantiate std::function with a
polymorphic type, or bad things will happen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212148 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-02 00:42:07 +00:00
Sean Silva
a454a5d05b [docs] Fix a mangled sentence.
Fixes PR20169

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212116 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-01 18:22:32 +00:00
Sean Silva
6cb0af5081 [docs] Remove stray HTML tag.
Fixes PR20167

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212115 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-01 18:15:00 +00:00
Alp Toker
a0d04ac9f1 Fix 'platform-specific' hyphenations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212056 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-30 18:57:16 +00:00
Adrian Prantl
93b97c9a57 Debug info: split out complex DIVariable address expressions into a
separate MDNode so they can be uniqued via folding set magic. To conserve
space, DIVariable nodes are still variable-length, with the last two
fields being optional.

No functional change.
http://reviews.llvm.org/D3526

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212050 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-30 17:17:35 +00:00
Scott Douglass
780e5e897d undo test commit (whitespace only)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212021 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-30 08:09:35 +00:00
Scott Douglass
27391adfd1 test commit (whitespace only)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212020 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-30 08:07:32 +00:00
Tyler Nowicki
9487d2ad4c Vectorization documentation for loop hint pragmas and Rpass diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211924 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-27 18:30:08 +00:00
David Majnemer
c8a1169c93 IR: Add COMDATs to the IR
This new IR facility allows us to represent the object-file semantic of
a COMDAT group.

COMDATs allow us to tie together sections and make the inclusion of one
dependent on another. This is required to implement features like MS
ABI VFTables and optimizing away certain kinds of initialization in C++.

This functionality is only representable in COFF and ELF, Mach-O has no
similar mechanism.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211920 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-27 18:19:56 +00:00
Chandler Carruth
39ea80cc56 Re-apply r211287: Remove support for LLVM runtime multi-threading.
I'll fix the problems in libclang and other projects in ways that don't
require <mutex> until we sort out the cygwin situation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211900 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-27 15:13:01 +00:00
Sanjay Patel
3259c25b3a fixed typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211808 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-26 22:18:51 +00:00
Sanjay Patel
e0dd8fd552 Changed Phab 'CC' to 'subscriber'; fixed typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211793 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-26 18:12:42 +00:00
Reid Kleckner
dd4814ec92 Mention that Phabricator users should subscribe to *-commits
This probably explains why a lot of messages get lost for first time
Phabricator users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211731 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-25 20:25:21 +00:00
Eli Bendersky
bb167336b3 Rename loop unrolling and loop vectorizer metadata to have a common prefix.
[LLVM part]

These patches rename the loop unrolling and loop vectorizer metadata
such that they have a common 'llvm.loop.' prefix.  Metadata name
changes:

llvm.vectorizer.* => llvm.loop.vectorizer.*
llvm.loopunroll.* => llvm.loop.unroll.*

This was a suggestion from an earlier review
(http://reviews.llvm.org/D4090) which added the loop unrolling
metadata. 

Patch by Mark Heffernan.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211710 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-25 15:41:00 +00:00
NAKAMURA Takumi
cdde33ebaa Revert r211287, "Remove support for LLVM runtime multi-threading."
libclang still requires it on cygming, lack of incomplete <mutex>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211592 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-24 13:36:31 +00:00
Oliver Stannard
e5241cc488 Emit the ARM build attributes ABI_PCS_wchar_t and ABI_enum_size.
Emit the ARM build attributes ABI_PCS_wchar_t and ABI_enum_size based on
module flags metadata.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211349 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-20 10:08:11 +00:00
Zachary Turner
a4d0ff9cd1 Remove support for LLVM runtime multi-threading.
After a number of previous small iterations, the functions
llvm_start_multithreaded() and llvm_stop_multithreaded() have
been reduced essentially to no-ops.  This change removes them
entirely.

Reviewed by: rnk, dblaikie

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211287 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-19 18:18:23 +00:00
Jingyue Wu
e4d0a5ec18 [ValueTracking] Extend range metadata to call/invoke
Summary:
With this patch, range metadata can be added to call/invoke including
IntrinsicInst. Previously, it could only be added to load.

Rename computeKnownBitsLoad to computeKnownBitsFromRangeMetadata because
range metadata is not only used by load.

Update the language reference to reflect this change.

Test Plan:
Add several tests in range-2.ll to confirm the verifier is happy with
having range metadata on call/invoke.

Add two tests in AddOverFlow.ll to confirm annotating range metadata to
call/invoke can benefit InstCombine.

Reviewers: meheff, nlewycky, reames, hfinkel, eliben

Reviewed By: eliben

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211281 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-19 16:50:16 +00:00
Zachary Turner
761f33167f Kill the LLVM global lock.
This patch removes the LLVM global lock, and updates all existing
users of the global lock to use their own mutex.    None of the
existing users of the global lock were protecting code that was
mutually exclusive with any of the other users of the global
lock, so its purpose was not being met.

Reviewed by: rnk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211277 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-19 16:17:42 +00:00
Zachary Turner
5ea46694d0 Revert r211066, 211067, 211068, 211069, 211070.
These were committed accidentally from the wrong branch before having
a review sign-off.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211072 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-16 22:49:41 +00:00
Zachary Turner
4641b6b427 Programmer's Manual changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211070 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-16 22:40:48 +00:00
Tim Northover
6eaf840a3d Docs: remove extra {} around result types.
It makes the types look like they're single-element structures. And
when we have instructions that *do* result in a struct, that can get
confusing rather quickly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210905 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-13 14:24:23 +00:00
Tim Northover
ab47c159b0 Docs: fix grammar error in description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210904 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-13 14:24:16 +00:00
Tim Northover
8f2a85e099 IR: add "cmpxchg weak" variant to support permitted failure.
This commit adds a weak variant of the cmpxchg operation, as described
in C++11. A cmpxchg instruction with this modifier is permitted to
fail to store, even if the comparison indicated it should.

As a result, cmpxchg instructions must return a flag indicating
success in addition to their original iN value loaded. Thus, for
uniformity *all* cmpxchg instructions now return "{ iN, i1 }". The
second flag is 1 when the store succeeded.

At the DAG level, a new ATOMIC_CMP_SWAP_WITH_SUCCESS node has been
added as the natural representation for the new cmpxchg instructions.
It is a strong cmpxchg.

By default this gets Expanded to the existing ATOMIC_CMP_SWAP during
Legalization, so existing backends should see no change in behaviour.
If they wish to deal with the enhanced node instead, they can call
setOperationAction on it. Beware: as a node with 2 results, it cannot
be selected from TableGen.

Currently, no use is made of the extra information provided in this
patch. Test updates are almost entirely adapting the input IR to the
new scheme.

Summary for out of tree users:
------------------------------

+ Legacy Bitcode files are upgraded during read.
+ Legacy assembly IR files will be invalid.
+ Front-ends must adapt to different type for "cmpxchg".
+ Backends should be unaffected by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210903 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-13 14:24:07 +00:00
Bob Wilson
4cea00282f LangRef: clarify that global declarations can have section and alignment info.
I'm not sure what it means to set a section for a declaration in another
translation unit, but there are some tests in the tree that do it so it seems
to be legal now regardless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210819 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-12 20:40:33 +00:00
Bob Wilson
7c3436d941 Add missing "InitializerConstant" to global variable syntax in LangRef.
The syntax for Global Variables in LangRef is missing the initializer.
This syntax section was added in r199218 along with changes to the
dllexport/dllimport handling, and I guess it was just an oversight to omit the
initializer values. I’ve marked the initializer as optional because this syntax
is used for both declarations and definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210808 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-12 18:42:55 +00:00
Alp Toker
8aeca44558 Reduce verbiage of lit.local.cfg files
We can just split targets_to_build in one place and make it immutable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210496 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-09 22:42:55 +00:00
Rafael Espindola
ed7d283ce5 Update langref for unnamed_addr being allowed in aliases.
Thanks to Duncan P. N. Exon Smith and Owen Anderson for noticing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210490 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-09 21:21:33 +00:00
Saleem Abdulrasool
c90ddb1869 ARM: add VLA extension for WoA Itanium ABI
The armv7-windows-itanium environment is nearly identical to the MSVC ABI. It
has a few divergences, mostly revolving around the use of the Itanium ABI for
C++. VLA support is one of the extensions that are amongst the set of the
extensions.

This adds support for proper VLA emission for this environment. This is
somewhat similar to the handling for __chkstk emission on X86 and the large
stack frame emission for ARM. The invocation style for chkstk is still
controlled via the -mcmodel flag to clang.

Make an explicit note that this is an extension.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210489 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-09 20:18:42 +00:00
Jeroen Ketema
503447efba [docs] Fix typo, align comments, fix syntax highlighting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210462 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-09 10:12:29 +00:00
Rafael Espindola
013321a0f9 Fix a few issues with comdat handling on COFF.
* Section association cannot use just the section name as many
sections can have the same name. With this patch, the comdat symbol in
an assoc section is interpreted to mean a symbol in the associated
section and the mapping is discovered from it.

* Comdat symbols were not being set correctly. Instead we were getting
whatever was output first for that section.

A consequence is that associative sections now must use .section to
set the association. Using .linkonce would not work since it is not
possible to change a sections comdat symbol (it is used to decide if
we should create a new section or reuse an existing one).

This includes r210298, which was reverted because it was asserting
on an associated section having the same comdat as the associated
section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210367 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06 19:26:12 +00:00
Dan Liew
8cfe2c00b0 Fix a typo made in Programmer's Manual made in r210354. Spotted
by Paul Robinson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210363 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06 18:44:21 +00:00
Dan Liew
64d39d3281 Mention the IRBuilder in Programmer's Manual with a few small examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210354 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06 17:25:47 +00:00
Pekka Jaaskelainen
53b344dcca Slight language tweak from Jonathan Humphreys.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210327 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06 11:21:44 +00:00
Rafael Espindola
6fd1b8ee48 Allow aliases to be unnamed_addr.
Alias with unnamed_addr were in a strange state. It is stored in GlobalValue,
the language reference talks about "unnamed_addr aliases" but the verifier
was rejecting them.

It seems natural to allow unnamed_addr in aliases:

* It is a property of how it is accessed, not of the data itself.
* It is perfectly possible to write code that depends on the address
of an alias.

This patch then makes unname_addr legal for aliases. One side effect is that
the syntax changes for a corner case: In globals, unnamed_addr is now printed
before the address space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210302 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06 01:20:28 +00:00
Alexey Samsonov
bbd34136f3 Fix markup for -debug-only option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210300 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-05 23:12:43 +00:00
Tom Roeder
5d0f7af3dc Add a new attribute called 'jumptable' that creates jump-instruction tables for functions marked with this attribute.
It includes a pass that rewrites all indirect calls to jumptable functions to pass through these tables.

This also adds backend support for generating the jump-instruction tables on ARM and X86.
Note that since the jumptable attribute creates a second function pointer for a
function, any function marked with jumptable must also be marked with unnamed_addr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210280 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-05 19:29:43 +00:00
Yaron Keren
4db3ad47fc Document how to select build configuration with Visual C++ IDE or command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210273 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-05 16:42:26 +00:00
Justin Bogner
e5d8481310 docs: Remove documentation for legacy PGO options
Late last year r191835 removed a largely unmaintained legacy PGO
infrastructure, but some of the docs were missed. Since these docs are
for things that don't actually exist anymore, they should be removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210165 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-04 06:29:38 +00:00
Rafael Espindola
2d21b25393 Allow alias to point to an arbitrary ConstantExpr.
This  patch changes GlobalAlias to point to an arbitrary ConstantExpr and it is
up to MC (or the system assembler) to decide if that expression is valid or not.

This reduces our ability to diagnose invalid uses and how early we can spot
them, but it also lets us do things like

@test5 = alias inttoptr(i32 sub (i32 ptrtoint (i32* @test2 to i32),
                                 i32 ptrtoint (i32* @bar to i32)) to i32*)

An important implication of this patch is that the notion of aliased global
doesn't exist any more. The alias has to encode the information needed to
access it in its metadata (linkage, visibility, type, etc).

Another consequence to notice is that getSection has to return a "const char *".
It could return a NullTerminatedStringRef if there was such a thing, but when
that was proposed the decision was to just uses "const char*" for that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210062 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-03 02:41:57 +00:00
Alp Toker
04de60e28f GraphWriter: detect graph viewer programs at runtime
Replace the crufty build-time configure checks for program paths with
equivalent runtime logic.

This lets users install graphing tools as needed without having to reconfigure
and rebuild LLVM, while eliminating a long chain of inappropriate compile
dependencies that included GUI programs and the windowing system.

Additional features:

 * Support the OS X 'open' command to view graphs generated by any of the
   Graphviz utilities. This is an alternative to the Graphviz OS X UI which is
   no longer available on Mountain Lion.

 * Produce informative log output upon failure to indicate which programs can
   be installed to view graphs.

Ping me if this doesn't work for your particular environment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210001 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-02 01:40:04 +00:00
Sanjay Patel
6126c55782 fixed more typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209921 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-30 21:18:13 +00:00
Sanjay Patel
26476d32d3 added link to CMake page
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209918 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-30 21:07:25 +00:00
Sanjay Patel
c6d0c90b30 fixed typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209916 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-30 20:55:55 +00:00
Jeroen Ketema
3fda4b2cd8 Sync list of targets with configure's reality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209855 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-29 22:23:22 +00:00
Sanjay Patel
9139823866 fixed a few typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209768 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-28 20:07:37 +00:00
Rafael Espindola
665d42accf [pr19844] Add thread local mode to aliases.
This matches gcc's behavior. It also seems natural given that aliases
contain other properties that govern how it is accessed (linkage,
visibility, dll storage).

Clang still has to be updated to expose this feature to C.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209759 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-28 18:15:43 +00:00
Reid Kleckner
54ba0dfb55 Wording fix for llvm.global_dtors docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209687 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-27 21:35:17 +00:00
Rafael Espindola
b84ced649e Fix link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209640 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-26 21:30:40 +00:00
Tim Northover
29f94c7201 AArch64/ARM64: move ARM64 into AArch64's place
This commit starts with a "git mv ARM64 AArch64" and continues out
from there, renaming the C++ classes, intrinsics, and other
target-local objects for consistency.

"ARM64" test directories are also moved, and tests that began their
life in ARM64 use an arm64 triple, those from AArch64 use an aarch64
triple. Both should be equivalent though.

This finishes the AArch64 merge, and everyone should feel free to
continue committing as normal now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209577 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-24 12:50:23 +00:00
Pekka Jaaskelainen
4f22c980f4 Updated the llvm.mem.parallel_loop_access semantics to include the possibility
to have only some of the loop's memory instructions be annotated and still _help_
the loop carried dependence analysis. 

This was discussed in the llvmdev ML (topic: "parallel loop metadata question").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209507 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-23 11:35:46 +00:00
Simon Atanasyan
84a0dc323d [YAML] Add an optional argument EnumMask to the yaml::IO::bitSetCase().
Some bit-set fields used in ELF file headers in fact contain two parts.
The first one is a regular bit-field. The second one is an enumeraion.
For example ELF header `e_flags` for MIPS target might contain the
following values:

Bit-set values:

  EF_MIPS_NOREORDER = 0x00000001
  EF_MIPS_PIC       = 0x00000002
  EF_MIPS_CPIC      = 0x00000004
  EF_MIPS_ABI2      = 0x00000020

Enumeration:

  EF_MIPS_ARCH_32   = 0x50000000
  EF_MIPS_ARCH_64   = 0x60000000
  EF_MIPS_ARCH_32R2 = 0x70000000
  EF_MIPS_ARCH_64R2 = 0x80000000

For printing bit-sets we use the `yaml::IO::bitSetCase()`. It does not
support bit-set/enumeration combinations and prints too many flags from
an enumeration part. This patch fixes this problem. New method
`yaml::IO::maskedBitSetCase()` handle "enumeration" part of bitset
defined by provided mask.

Patch reviewed by Nick Kledzik and Sean Silva.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209504 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-23 08:07:09 +00:00
Eric Christopher
ff93350aa6 Update some AliasAnalysis pass docs for getAdjustedAnalysisPointer.
Patch by George Burgess.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209467 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-22 19:38:25 +00:00
Eric Christopher
68c7a1cb98 Clean up language and grammar.
Based on a patch by jfcaron3@gmail.com!
PR19806

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209216 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-20 17:11:11 +00:00
Nick Lewycky
fe47ebfad3 Add 'nonnull', a new parameter and return attribute which indicates that the pointer is not null. Instcombine will elide comparisons between these and null. Patch by Luqman Aden!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209185 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-20 01:23:40 +00:00
Alexey Samsonov
df0d63dec4 Add documentation for llvm-dwarfdump tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209173 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-19 22:53:29 +00:00
Alexey Samsonov
bf6e3f9257 [DWARF parser] Teach DIContext to fetch short (non-linkage) function names for a given address.
Change --functions option in llvm-symbolizer tool to accept
values "none", "short" or "linkage". Update the tests and docs
accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209050 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-17 00:07:48 +00:00
Reid Kleckner
1ce3088669 Add comdat key field to llvm.global_ctors and llvm.global_dtors
This allows us to put dynamic initializers for weak data into the same
comdat group as the data being initialized.  This is necessary for MSVC
ABI compatibility.  Once we have comdats for guard variables, we can use
the combination to help GlobalOpt fire more often for weak data with
guarded initialization on other platforms.

Reviewers: nlewycky

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209015 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-16 20:39:27 +00:00
Alp Toker
727273b11c Fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208839 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-15 01:52:21 +00:00
Sylvestre Ledru
df75220bc7 Update of the documentation: I think we are now happy with Phabricator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208764 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-14 09:22:15 +00:00
Jay Foad
8517c90a0a Fix strange typo in markup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208759 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-14 08:10:16 +00:00
James Molloy
05052f660b [ARM64-BE] Correct grammar mistake pointed out by Tobias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208580 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-12 15:30:31 +00:00
James Molloy
85918049ab [ARM64-BE] Add sphinx documentation for the ARM64 NEON implementation.
There are some interesting decisions based on non-obvious rationale in
the ARM64-BE NEON implementation - decent documentation is definitely required.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208577 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-12 15:13:39 +00:00
Hal Finkel
70a83b490e [PowerPC] Add global named register support
Support for the intrinsics that read from and write to global named registers
is added for r1, r2 and r13 (depending on the subtarget).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208509 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-11 19:29:11 +00:00
Reid Kleckner
d30c11edde Revert "[ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret'"
This reverts commit r200561.

This calling convention was an attempt to match the MSVC C++ ABI for
methods that return structures by value.  This solution didn't scale,
because it would have required splitting every CC available on Windows
into two: one for methods and one for free functions.

Now that we can put sret on the second arg (r208453), and Clang does
that (r208458), revert this hack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208459 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-09 22:56:42 +00:00
Duncan P. N. Exon Smith
76c17d324c IR: Don't allow non-default visibility on local linkage
Visibilities of `hidden` and `protected` are meaningless for symbols
with local linkage.

  - Change the assembler to reject non-default visibility on symbols
    with local linkage.

  - Change the bitcode reader to auto-upgrade `hidden` and `protected`
    to `default` when the linkage is local.

  - Update LangRef.

<rdar://problem/16141113>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208263 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-07 22:57:20 +00:00
Daniel Sanders
d80222a48b [tablegen] Add !listconcat operator with the similar semantics as !strconcat
Summary:
It concatenates two or more lists. In addition to the !strconcat semantics
the lists must have the same element type.

My overall aim is to make it easy to append to Instruction.Predicates
rather than override it. This can be done by concatenating lists passed as
arguments, or by concatenating lists passed in additional fields.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: hfinkel, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208183 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-07 10:13:19 +00:00
Justin Bogner
ffb8718ee5 llvm-cov: Document --no-output in the command guide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208151 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-07 02:33:58 +00:00
Renato Golin
22f779d1fd Implememting named register intrinsics
This patch implements the infrastructure to use named register constructs in
programs that need access to specific registers (bare metal, kernels, etc).

So far, only the stack pointer is supported as a technology preview, but as it
is, the intrinsic can already support all non-allocatable registers from any
architecture.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208104 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 16:51:25 +00:00
Bob Wilson
534ec26d07 Add some details to the llvm-cov documentation. <rdar://problem/15819496>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208098 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 15:58:06 +00:00
Richard Smith
64cd55a126 Update programmers manual to cover llvm::function_ref, and add a note to the
coding standard suggesting using it instead of the (unavailable) std::function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208067 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 07:45:39 +00:00
Richard Smith
2efa833c4e Revert accidentally-committed files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208034 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 01:46:26 +00:00
Richard Smith
36ecb2ee9d Re-commit r208025, reverted in r208030, with a fix for a conformance issue
which GCC detects and Clang does not!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208033 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 01:44:26 +00:00
Rafael Espindola
814442a8cd Be a bit more specific in the release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207981 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 17:53:29 +00:00
Rafael Espindola
c6e42b5590 Remove the -disable-cfi option.
This also add a release note about it. If this stays I will cleanup MC
next week.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207977 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 17:33:26 +00:00
Alp Toker
0bf9cca8c8 Update docs still mentioning LLVM_ENABLE_CXX11
C++11 is now required.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207914 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-03 15:10:04 +00:00
Yaron Keren
879875f802 Updated Doxygen link for InstIterator.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207906 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-03 12:06:13 +00:00
Yaron Keren
5608a25a73 InstIterator.h lives in llvm/IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207903 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-03 11:30:49 +00:00
Daniel Sanders
1913eeb385 [tablegen] !strconcat accepts more than two arguments but this wasn't documented or tested.
Summary:
* Updated the documentation
* Added a test for >2 arguments
* Added a check for the lexical concatenation
* Made the existing test a bit stricter.

Reviewers: t.p.northover

Reviewed By: t.p.northover

Subscribers: t.p.northover, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207865 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-02 19:25:52 +00:00
Yaron Keren
74e9519ef9 Code style fix from Duncan P. N. Exon Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207831 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-02 08:26:30 +00:00
Michael J. Spencer
d4b4f2d340 [IR] Make {extract,insert}element accept an index of any integer type.
Given the following C code llvm currently generates suboptimal code for
x86-64:

__m128 bss4( const __m128 *ptr, size_t i, size_t j )
{
    float f = ptr[i][j];
    return (__m128) { f, f, f, f };
}

=================================================

define <4 x float> @_Z4bss4PKDv4_fmm(<4 x float>* nocapture readonly %ptr, i64 %i, i64 %j) #0 {
  %a1 = getelementptr inbounds <4 x float>* %ptr, i64 %i
  %a2 = load <4 x float>* %a1, align 16, !tbaa !1
  %a3 = trunc i64 %j to i32
  %a4 = extractelement <4 x float> %a2, i32 %a3
  %a5 = insertelement <4 x float> undef, float %a4, i32 0
  %a6 = insertelement <4 x float> %a5, float %a4, i32 1
  %a7 = insertelement <4 x float> %a6, float %a4, i32 2
  %a8 = insertelement <4 x float> %a7, float %a4, i32 3
  ret <4 x float> %a8
}

=================================================

        shlq    $4, %rsi
        addq    %rdi, %rsi
        movslq  %edx, %rax
        vbroadcastss    (%rsi,%rax,4), %xmm0
        retq

=================================================

The movslq is uneeded, but is present because of the trunc to i32 and then
sext back to i64 that the backend adds for vbroadcastss.

We can't remove it because it changes the meaning. The IR that clang
generates is already suboptimal. What clang really should emit is:

  %a4 = extractelement <4 x float> %a2, i64 %j

This patch makes that legal. A separate patch will teach clang to do it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207801 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-01 22:12:39 +00:00
Yaron Keren
3152576ea4 Update post-r203364 http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140303/207915.html
and ranged for loops.

http://reviews.llvm.org/D3582



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207755 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-01 12:33:26 +00:00
Saleem Abdulrasool
ddbde80aae ARM: support stack probe emission for Windows on ARM
This introduces the stack lowering emission of the stack probe function for
Windows on ARM. The stack on Windows on ARM is a dynamically paged stack where
any page allocation which crosses a page boundary of the following guard page
will cause a page fault. This page fault must be handled by the kernel to
ensure that the page is faulted in. If this does not occur and a write access
any memory beyond that, the page fault will go unserviced, resulting in an
abnormal program termination.

The watermark for the stack probe appears to be at 4080 bytes (for
accommodating the stack guard canaries and stack alignment) when SSP is
enabled.  Otherwise, the stack probe is emitted on the page size boundary of
4096 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207615 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-30 07:05:07 +00:00
Dan Liew
f90262a09d Document recently added sphinx documentation options in
CMake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207543 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 16:13:27 +00:00
Reid Kleckner
710c1a449d Add 'musttail' marker to call instructions
This is similar to the 'tail' marker, except that it guarantees that
tail call optimization will occur.  It also comes with convervative IR
verification rules that ensure that tail call optimization is possible.

Reviewers: nicholas

Differential Revision: http://llvm-reviews.chandlerc.com/D3240

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207143 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-24 20:14:34 +00:00
Sean Silva
423575405d [docs] Add a note to docs/README.txt
Added note to docs/README.txt on how to check the reachibility of
external links in the documentation.

Patch by Dan Liew!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206924 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-22 21:47:53 +00:00
Reid Kleckner
4c464def6a Added Sphinx documentation generation to CMake build system.
The option LLVM_ENABLE_SPHINX option enables the "docs-llvm-html",
"docs-llvm-man" targets but does not build them by default. The
following CMake options have been added that control what targets are
made available

SPHINX_OUTPUT_HTML
SPHINX_OUTPUT_MAN

If LLVM_BUILD_DOCS is enabled then the enabled docs-llvm-* targets will
be built by default and if ``make install`` is run then docs-llvm-html
and docs-llvm-man will be installed (tested on Linux only).

The add_sphinx_target function is in its own file so it can be included
by other projects that use Sphinx for their documentation.

Patch by Daniel Liew <daniel.liew@imperial.ac.uk>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206655 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-18 21:45:25 +00:00
Reid Kleckner
ed5604850a Remove -simplify-libcalls pass form Passes documentation
This pass was removed in r184459.

Also added note that the InstCombine pass does library call
simplification.

Patch slightly modified from one by Daniel Liew
<daniel.liew@imperial.ac.uk>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206650 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-18 21:19:06 +00:00
Paul Robinson
c0bbe8259c Fix example for VS2012.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206544 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-18 01:20:08 +00:00
Duncan P. N. Exon Smith
dd0f0d6a9d C++11: Compatibility with (C++03 => MSVC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206481 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-17 18:02:36 +00:00
Duncan P. N. Exon Smith
5bcd7106b5 C++11: Document some limitations imposed by MSVC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206480 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-17 18:02:34 +00:00
Eric Christopher
ac871732b5 Remove documentation for a deleted pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206097 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-12 02:09:17 +00:00
Duncan P. N. Exon Smith
23a6033104 blockfreq: Document BlockFrequencyInfo terminology
Documents terminology used in the forthcoming rewrite of
BlockFrequencyInfo.

<rdar://problem/14292693>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206086 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-11 23:21:07 +00:00
Reid Kleckner
bc1fd917f0 Move the segmented stack switch to a function attribute
This removes the -segmented-stacks command line flag in favor of a
per-function "split-stack" attribute.

Patch by Luqman Aden and Alex Crichton!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205997 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-10 22:58:43 +00:00
David Majnemer
878657074a YAMLIO: Allow scalars to dictate quotation rules
Introduce ScalarTraits::mustQuote which determines whether or not a
StringRef needs quoting before it is acceptable to output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205955 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-10 07:37:33 +00:00
Alp Toker
46d36be2eb Fix some doc and comment typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205899 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-09 14:47:27 +00:00
Sean Silva
2300669d41 [docs] VCS contains a record of authorship
No need to explicitly mention the author in the document.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205793 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-08 21:12:56 +00:00
Sean Silva
0a50cec3cb [docs] Fix up some links to the preferred style.
:doc:`...` and :ref:`...` links help Sphinx keep track the dependencies
between documents and ensure that they are not pointing to nowhere.

Raw HTML links work just fine and are easier for people less familiar
with reST/Sphinx. They are easy to change over to the :doc:/:ref: style
after the fact so this is not a problem.

This commit doesn't fix all of them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205792 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-08 21:06:22 +00:00
Sean Silva
b9a65fd002 [docs] Fix some links
The TableGen docs have changed structure

Patch by Tay Ray Chuan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205744 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-07 22:46:40 +00:00
Sean Silva
ba9e79f7ef [docs] Update link title
docs/TableGen/ is not really just "fundamentals" anymore, but rather
more of a portal for all things TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205743 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-07 22:42:53 +00:00
Sean Silva
71e245c1f6 [docs] Fix some Sphinx warnings that have crept in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205742 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-07 22:29:53 +00:00
Manuel Klimek
d17a4f957e Make docs point to new domain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205701 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-07 10:21:33 +00:00
Andrew Trick
c8ce9677e6 Stack map docs. Remove some stray markup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205515 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-03 07:08:21 +00:00
Andrew Trick
3b8ad82b39 Minor update to the stack map documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205513 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-03 07:03:28 +00:00
Renato Golin
a5b283ab23 Recover TableGen/LangRef, make it official
Making the new TableGen documentation official and marking the old file as
"Moved". Also, reverting the original LangRef as the normative formal
description of the language, while keeping the "new" LangRef as LangIntro
for the less inlcined to reading language grammars.

We should remove TableGenFundamentals.rst one day, but for now, just a
warning that it moved will have to do, while we make sure there are no more
links to it from elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205289 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-01 09:51:49 +00:00
Juergen Ributzka
d8c9577764 [Stackmaps] Update the stackmap format to use 64-bit relocations for the function address and properly align all entries.
This commit updates the stackmap format to version 1 to indicate the
reorganizaion of several fields. This was done in order to align stackmap
entries to their natural alignment and to minimize padding.

Fixes <rdar://problem/16005902>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205254 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-31 22:14:04 +00:00
Mark Seaborn
e2591680b4 Exception handling docs: Clarify how the llvm.eh.* intrinsics are used
The non-SJLJ and SJLJ intrinsics are generated by the frontend and
backend respectively.

Differential Revision: http://llvm-reviews.chandlerc.com/D3010

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205017 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-28 17:08:57 +00:00