Commit Graph

6246 Commits

Author SHA1 Message Date
Kostya Serebryany
da55e69f83 [libFuzzer] fix docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268092 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 19:28:24 +00:00
Kostya Serebryany
168e51186d [libFuzzer] enable detect_leaks=1, add proper docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 18:49:55 +00:00
Sanjoy Das
f828c4b375 Remove stale documentation on -no-aa
The pass itself was removed in rL247167.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267978 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 03:01:49 +00:00
Kostya Serebryany
361c970533 [libFuzzer] Improve documentation
Reviewers: kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267892 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 15:19:05 +00:00
Adam Nemet
a47271f69d Fixed sphinx warning from r267672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267675 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-27 05:59:51 +00:00
Adam Nemet
8d171c8f85 [LoopDist] Add llvm.loop.distribute.enable loop metadata
Summary:
D19403 adds a new pragma for loop distribution.  This change adds
support for the corresponding metadata that the pragma is translated to
by the FE.

As part of this I had to rethink the flag -enable-loop-distribute.  My
goal was to be backward compatible with the existing behavior:

  A1. pass is off by default from the optimization pipeline
  unless -enable-loop-distribute is specified

  A2. pass is on when invoked directly from opt (e.g. for unit-testing)

The new pragma/metadata overrides these defaults so the new behavior is:

  B1. A1 + enable distribution for individual loop with the pragma/metadata

  B2. A2 + disable distribution for individual loop with the pragma/metadata

The default value whether the pass is on or off comes from the initiator
of the pass.  From the PassManagerBuilder the default is off, from opt
it's on.

I moved -enable-loop-distribute under the pass.  If the flag is
specified it overrides the default from above.

Then the pragma/metadata can further modifies this per loop.

As a side-effect, we can now also use -enable-loop-distribute=0 from opt
to emulate the default from the optimization pipeline.  So to be precise
this is the new behavior:

  C1. pass is off by default from the optimization pipeline
  unless -enable-loop-distribute or the pragma/metadata enables it

  C2. pass is on when invoked directly from opt
  unless -enable-loop-distribute=0 or the pragma/metadata disables it

Reviewers: hfinkel

Subscribers: joker.eph, mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267672 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-27 05:28:18 +00:00
Adam Nemet
9f23dcdf45 [Docs] Try to clarify the concept of domains for noalias scope
Summary:
This tries to anchor down the concept of domains a bit better.  I had
trouble initially relating this to anything.  Also talking to David
Majnemer on IRC suggested that I wasn't the only one.

Reviewers: hfinkel

Subscribers: llvm-commits, majnemer

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267647 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-27 00:52:48 +00:00
Chuang-Yu Cheng
9585d8910f [ppc64] Reenable sibling call optimization on ppc64 since fixed tsan library tail-call issue
print-stack-trace.cc test failure of compiler-rt has been fixed by
r266869 (http://reviews.llvm.org/D19148), so reenable sibling call
optimization on ppc64

Reviewers: nemanjai kbarton

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267527 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-26 07:38:24 +00:00
Hal Finkel
681428ed7d [LoopVectorize] Don't consider conditional-load dereferenceability for marked parallel loops
I really thought we were doing this already, but we were not. Given this input:

void Test(int *res, int *c, int *d, int *p) {
  for (int i = 0; i < 16; i++)
    res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
}

we did not vectorize the loop. Even with "assume_safety" the check that we
don't if-convert conditionally-executed loads (to protect against
data-dependent deferenceability) was not elided.

One subtlety: As implemented, it will still prefer to use a masked-load
instrinsic (given target support) over the speculated load. The choice here
seems architecture specific; the best option depends on how expensive the
masked load is compared to a regular load. Ideally, using the masked load still
reduces unnecessary memory traffic, and so should be preferred. If we'd rather
do it the other way, flipping the order of the checks is easy.

The LangRef is updated to make explicit that llvm.mem.parallel_loop_access also
implies that if conversion is okay.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267514 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-26 02:00:36 +00:00
Duncan P. N. Exon Smith
de7484036b DebugInfo: Remove MDString-based type references
Eliminate DITypeIdentifierMap and make DITypeRef a thin wrapper around
DIType*.  It is no longer legal to refer to a DICompositeType by its
'identifier:', and DIBuilder no longer retains all types with an
'identifier:' automatically.

Aside from the bitcode upgrade, this is mainly removing logic to resolve
an MDString-based reference to an actualy DIType.  The commits leading
up to this have made the implicit type map in DICompileUnit's
'retainedTypes:' field superfluous.

This does not remove DITypeRef, DIScopeRef, DINodeRef, and
DITypeRefArray, or stop using them in DI-related metadata.  Although as
of this commit they aren't serving a useful purpose, there are patchces
under review to reuse them for CodeView support.

The tests in LLVM were updated with deref-typerefs.sh, which is attached
to the thread "[RFC] Lazy-loading of debug info metadata":

  http://lists.llvm.org/pipermail/llvm-dev/2016-April/098318.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-23 21:08:00 +00:00
Sanjoy Das
9ef1010484 Add some release notes about the fix for PR26774
As suggested by Chandler on the review thread for D18634.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267239 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22 22:45:23 +00:00
Peter Collingbourne
74eabdd998 Introduce llvm.load.relative intrinsic.
This intrinsic takes two arguments, ``%ptr`` and ``%offset``. It loads
a 32-bit value from the address ``%ptr + %offset``, adds ``%ptr`` to that
value and returns it. The constant folder specifically recognizes the form of
this intrinsic and the constant initializers it may load from; if a loaded
constant initializer is known to have the form ``i32 trunc(x - %ptr)``,
the intrinsic call is folded to ``x``.

LLVM provides that the calculation of such a constant initializer will
not overflow at link time under the medium code model if ``x`` is an
``unnamed_addr`` function. However, it does not provide this guarantee for
a constant initializer folded into a function body. This intrinsic can be
used to avoid the possibility of overflows when loading from such a constant.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22 21:18:02 +00:00
Michael Kuperstein
0e44a1ed64 Point link to CODE_OWNERS.txt to klaus instead of viewvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267176 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22 17:41:12 +00:00
Teresa Johnson
47534d9ca6 Document source_filename in LangRef.
Summary: Add documentation for new LLVM IR source_filename identifier.

Reviewers: joker.eph, majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267150 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22 13:09:17 +00:00
Amaury Sechet
7b1322cacb Add LLVMGetAttrKindID in the C API in order to facilitate migration away from LLVMAttribute
Summary:
LLVMAttribute has outlived its utility and is becoming a problem for C API users that what to use all the LLVM attributes. In order to help moving away from LLVMAttribute in a smooth manner, this diff introduce LLVMGetAttrKindIDInContext, which can be used instead of the enum values.

See D18749 for reference.

Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266842 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-20 01:02:12 +00:00
Kostya Serebryany
50620d6de4 [libFuzzer] more trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266830 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 22:37:44 +00:00
Marcin Koscielnicki
9ebfa4db3c [AArch64] [ARM] Make a target-independent llvm.thread.pointer intrinsic.
Both AArch64 and ARM support llvm.<arch>.thread.pointer intrinsics that
just return the thread pointer.  I have a pending patch that does the same
for SystemZ (D19054), and there are many more targets that could benefit
from one.

This patch merges the ARM and AArch64 intrinsics into a single target
independent one that will also be used by subsequent targets.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266818 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 20:51:05 +00:00
Tim Shen
e7221e673c [SSP, 2/2] Create llvm.stackguard() intrinsic and lower it to LOAD_STACK_GUARD
With this change, ideally IR pass can always generate llvm.stackguard
call to get the stack guard; but for now there are still IR form stack
guard customizations around (see getIRStackGuard()). Future SSP
customization should go through LOAD_STACK_GUARD.

There is a behavior change: stack guard values are not CSEed anymore,
since we should never reuse the value in case that it has been spilled (and
corrupted). See ssp-guard-spill.ll. This also cause the change of stack
size and codegen in X86 and AArch64 test cases.

Ideally we'd like to know if the guard created in llvm.stackprotector() gets
spilled or not. If the value is spilled, discard the value and reload
stack guard; otherwise reuse the value. This can be done by teaching
register allocator to know how to rematerialize LOAD_STACK_GUARD and
force a rematerialization (which seems hard), or check for spilling in
expandPostRAPseudo. It only makes sense when the stack guard is a global
variable, which requires more instructions to load. Anyway, this seems to go out
of the scope of the current patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266806 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 19:40:37 +00:00
Sanjoy Das
151328540e Introduce a "patchable-function" function attribute
Summary:
The `"patchable-function"` attribute can be used by an LLVM client to
influence LLVM's code generation in ways that makes the generated code
easily patchable at runtime (for instance, to redirect control).
Right now only one patchability scheme is supported,
`"prologue-short-redirect"`, but this can be expanded in the future.

Reviewers: joker.eph, rnk, echristo, dberris

Subscribers: joker.eph, echristo, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266715 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 05:24:47 +00:00
Kostya Serebryany
d8fa185e03 [libFuzzer] add fresh openssl trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266649 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 18:41:25 +00:00
Duncan P. N. Exon Smith
9bb5d5d42c IR: Use an explicit map for debug info type uniquing
Rather than relying on the structural equivalence of DICompositeType to
merge type definitions, use an explicit map on the LLVMContext that
LLParser and BitcodeReader consult when constructing new nodes.
Each non-forward-declaration DICompositeType with a non-empty
'identifier:' field is stored/loaded from the type map, and the first
definiton will "win".

This map is opt-in: clients that expect ODR types from different modules
to be merged must call LLVMContext::ensureDITypeMap.

  - Clients that just happen to load more than one Module in the same
    LLVMContext won't magically merge types.

  - Clients (like LTO) that want to continue to merge types based on ODR
    identifiers should opt-in immediately.

I have updated LTOCodeGenerator.cpp, the two "linking" spots in
gold-plugin.cpp, and llvm-link (unless -disable-debug-info-type-map) to
set this.

With this in place, it will be straightforward to remove the DITypeRef
concept (i.e., referencing types by their 'identifier:' string rather
than pointing at them directly).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266549 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 03:58:21 +00:00
Duncan P. N. Exon Smith
12a8b1475d IR: Use ODR to unique DICompositeType members
Merge members that are describing the same member of the same ODR type,
even if other bits differ.  If the file or line differ, we don't care;
if anything else differs, it's an ODR violation (and we still don't
really care).

For DISubprogram declarations, this looks at the LinkageName and Scope.
For DW_TAG_member instances of DIDerivedType, this looks at the Name and
Scope.  In both cases, we know that the Scope follows ODR rules if it
has a non-empty identifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266548 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 02:30:20 +00:00
Duncan P. N. Exon Smith
4460c98673 LangRef: Removed some outdated text about DIDerivedType
This text is also incorrect (much like r266540).  It looks like I missed
updating some of what I moved from SourceLevelDebugging.rst in r232566.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266544 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 00:45:00 +00:00
Duncan P. N. Exon Smith
2c71d39640 LangRef: Fix some bugs in debug info descriptions
Fix descriptions of DICompositeType and DIDerivedType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266540 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 22:46:47 +00:00
Kostya Serebryany
c4caccc851 [libFuzzer] menion the git mirror in the docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266476 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15 21:10:27 +00:00
Mehdi Amini
8be7707c14 Remove every uses of getGlobalContext() in LLVM (but the C API)
At the same time, fixes InstructionsTest::CastInst unittest: yes
you can leave the IR in an invalid state and exit when you don't
destroy the context (like the global one), no longer now.

This is the first part of http://reviews.llvm.org/D19094

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266379 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-14 21:59:01 +00:00
Adam Nemet
cf0a711bff Revert "Support arbitrary addrspace pointers in masked load/store intrinsics"
This reverts commit r266086.

It breaks the LTO build of gcc in SPEC2000.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-14 08:47:17 +00:00
James Y Knight
69f961c26e Update psabi link for x86-64. Add link to linux gabi supplement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266137 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-12 21:54:57 +00:00
James Y Knight
238d8199af Add __atomic_* lowering to AtomicExpandPass.
(Recommit of r266002, with r266011, r266016, and not accidentally
including an extra unused/uninitialized element in LibcallRoutineNames)

AtomicExpandPass can now lower atomic load, atomic store, atomicrmw, and
cmpxchg instructions to __atomic_* library calls, when the target
doesn't support atomics of a given size.

This is the first step towards moving all atomic lowering from clang
into llvm. When all is done, the behavior of __sync_* builtins,
__atomic_* builtins, and C11 atomics will be unified.

Previously LLVM would pass everything through to the ISelLowering
code. There, unsupported atomic instructions would turn into __sync_*
library calls. Because of that behavior, Clang currently avoids emitting
llvm IR atomic instructions when this would happen, and emits __atomic_*
library functions itself, in the frontend.

This change makes LLVM able to emit __atomic_* libcalls, and thus will
eventually allow clang to depend on LLVM to do the right thing.

It is advantageous to do the new lowering to atomic libcalls in
AtomicExpandPass, before ISel time, because it's important that all
atomic operations for a given size either lower to __atomic_*
libcalls (which may use locks), or native instructions which won't. No
mixing and matching.

At the moment, this code is enabled only for SPARC, as a
demonstration. The next commit will expand support to all of the other
targets.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-12 20:18:48 +00:00
Artur Pilipenko
80ce67004b Support arbitrary addrspace pointers in masked load/store intrinsics
This is a resubmittion of 263158 change.

This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.

The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.

Reviewed By: reames

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-12 15:58:04 +00:00
Matt Arsenault
e6c6eef042 LangRef: Update example syntax for atomic load instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-12 14:41:03 +00:00
Rafael Espindola
586f018931 This reverts commit r266002, r266011 and r266016.
They broke the msan bot.

Original message:

Add __atomic_* lowering to AtomicExpandPass.

AtomicExpandPass can now lower atomic load, atomic store, atomicrmw,and
cmpxchg instructions to __atomic_* library calls, when the target
doesn't support atomics of a given size.

This is the first step towards moving all atomic lowering from clang
into llvm. When all is done, the behavior of __sync_* builtins,
__atomic_* builtins, and C11 atomics will be unified.

Previously LLVM would pass everything through to the ISelLowering
code. There, unsupported atomic instructions would turn into __sync_*
library calls. Because of that behavior, Clang currently avoids emitting
llvm IR atomic instructions when this would happen, and emits __atomic_*
library functions itself, in the frontend.

This change makes LLVM able to emit __atomic_* libcalls, and thus will
eventually allow clang to depend on LLVM to do the right thing.

It is advantageous to do the new lowering to atomic libcalls in
AtomicExpandPass, before ISel time, because it's important that all
atomic operations for a given size either lower to __atomic_*
libcalls (which may use locks), or native instructions which won't. No
mixing and matching.

At the moment, this code is enabled only for SPARC, as a
demonstration. The next commit will expand support to all of the other
targets.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266062 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-12 12:30:25 +00:00
George Burgess IV
274105b8b5 Add the allocsize attribute to LLVM.
`allocsize` is a function attribute that allows users to request that
LLVM treat arbitrary functions as allocation functions.

This patch makes LLVM accept the `allocsize` attribute, and makes
`@llvm.objectsize` recognize said attribute.

The review for this was split into two patches for ease of reviewing:
D18974 and D14933. As promised on the revisions, I'm landing both
patches as a single commit.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266032 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-12 01:05:35 +00:00
James Y Knight
36720c565c Add __atomic_* lowering to AtomicExpandPass.
AtomicExpandPass can now lower atomic load, atomic store, atomicrmw, and
cmpxchg instructions to __atomic_* library calls, when the target
doesn't support atomics of a given size.

This is the first step towards moving all atomic lowering from clang
into llvm. When all is done, the behavior of __sync_* builtins,
__atomic_* builtins, and C11 atomics will be unified.

Previously LLVM would pass everything through to the ISelLowering
code. There, unsupported atomic instructions would turn into __sync_*
library calls. Because of that behavior, Clang currently avoids emitting
llvm IR atomic instructions when this would happen, and emits __atomic_*
library functions itself, in the frontend.

This change makes LLVM able to emit __atomic_* libcalls, and thus will
eventually allow clang to depend on LLVM to do the right thing.

It is advantageous to do the new lowering to atomic libcalls in
AtomicExpandPass, before ISel time, because it's important that all
atomic operations for a given size either lower to __atomic_*
libcalls (which may use locks), or native instructions which won't. No
mixing and matching.

At the moment, this code is enabled only for SPARC, as a
demonstration. The next commit will expand support to all of the other
targets.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 22:22:33 +00:00
Tim Shen
1a7750eecd [SSP] Remove llvm.stackprotectorcheck.
This is a cleanup patch for SSP support in LLVM. There is no functional change.
llvm.stackprotectorcheck is not needed, because SelectionDAG isn't
actually lowering it in SelectBasicBlock; rather, it adds check code in
FinishBasicBlock, ignoring the position where the intrinsic is inserted
(See FindSplitPointForStackProtector()).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 21:26:31 +00:00
Ehsan Amiri
8a6b9f2987 [PPC] Added a note to release notes
A draft line added to release notes for PPC, to keep a record of changes.
This is just a draft and will be rewritten towards the end of release.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265694 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-07 16:47:35 +00:00
Dmitry Polukhin
ba4922356c [GCC] Attribute ifunc support in llvm
This patch add support for GCC attribute((ifunc("resolver"))) for
targets that use ELF as object file format. In general ifunc is a
special kind of function alias with type @gnu_indirect_function. Patch
for Clang http://reviews.llvm.org/D15524

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265667 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-07 12:32:19 +00:00
JF Bastien
b36d1a86f1 NFC: make AtomicOrdering an enum class
Summary:
In the context of http://wg21.link/lwg2445 C++ uses the concept of
'stronger' ordering but doesn't define it properly. This should be fixed
in C++17 barring a small question that's still open.

The code currently plays fast and loose with the AtomicOrdering
enum. Using an enum class is one step towards tightening things. I later
also want to tighten related enums, such as clang's
AtomicOrderingKind (which should be shared with LLVM as a 'C++ ABI'
enum).

This change touches a few lines of code which can be improved later, I'd
like to keep it as NFC for now as it's already quite complex. I have
related changes for clang.

As a follow-up I'll add:
  bool operator<(AtomicOrdering, AtomicOrdering) = delete;
  bool operator>(AtomicOrdering, AtomicOrdering) = delete;
  bool operator<=(AtomicOrdering, AtomicOrdering) = delete;
  bool operator>=(AtomicOrdering, AtomicOrdering) = delete;
This is separate so that clang and LLVM changes don't need to be in sync.

Reviewers: jyknight, reames

Subscribers: jyknight, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-06 21:19:33 +00:00
Tom Stellard
43f537f492 AMDGPU: Document address space mapping
Summary:
Address space mapping is described in lib/Target/AMDGPU/AMDGPU.h in
Doxygen comments. This patch adds the description to user guide for
AMDGPU back-end.

Patch By: Vedran Miletić

Reviewers: tstellarAMD, arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-06 01:29:19 +00:00
Manman Ren
cf18232c49 Swift Calling Convention: swiftcc for ARM.
Differential Revision: http://reviews.llvm.org/D18769


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05 22:44:44 +00:00
Manman Ren
1f7638e1cb Swift Calling Convention: add swiftcc.
Differential Revision: http://reviews.llvm.org/D17863


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05 22:41:47 +00:00
JF Bastien
f90bc5f1a3 Docs: dampen story time for atomics
Story time was nice a few years ago, but by now it's nice to state how things are, rather than explain the diff from ye olden atomic history. These were dark times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05 00:31:25 +00:00
Paul Robinson
0a27f400f2 Document standard substitutions defined by lit.
Patch by Guilherme Bufolo!

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-04 17:14:45 +00:00
Manman Ren
4bda882517 Swift Calling Convention: add swifterror attribute.
A ``swifterror`` attribute can be applied to a function parameter or an
AllocaInst.

This commit does not include any target-specific change. The target-specific
optimization will come as a follow-up patch.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265189 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 21:41:15 +00:00
Adrian Prantl
7876f64bc3 testcase gardening: update the emissionKind enum to the new syntax. (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-01 00:16:49 +00:00
Hans Wennborg
f864a32c13 Change eliminateCallFramePseudoInstr() to return an iterator
This will become necessary in a subsequent change to make this method
merge adjacent stack adjustments, i.e. it might erase the previous
and/or next instruction.

It also greatly simplifies the calls to this function from Prolog-
EpilogInserter. Previously, that had a bunch of logic to resume iteration
after the call; now it just continues with the returned iterator.

Note that this changes the behaviour of PEI a little. Previously,
it attempted to re-visit the new instruction created by
eliminateCallFramePseudoInstr(). That code was added in r36625,
but I can't see any reason for it: the new instructions will obviously
not be pseudo instructions, they will not have FrameIndex operands,
and we have already accounted for the stack adjustment.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-31 18:33:38 +00:00
Sanjoy Das
de765686f8 Introduce a @llvm.experimental.guard intrinsic
Summary:
As discussed on llvm-dev[1].

This change adds the basic boilerplate code around having this intrinsic
in LLVM:

 - Changes in Intrinsics.td, and the IR Verifier
 - A lowering pass to lower @llvm.experimental.guard to normal
   control flow
 - Inliner support

[1]: http://lists.llvm.org/pipermail/llvm-dev/2016-February/095523.html

Reviewers: reames, atrick, chandlerc, rnk, JosephTremoulet, echristo

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264976 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-31 00:18:46 +00:00
Sanjay Patel
c3260cad54 fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264933 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-30 21:38:20 +00:00
Justin Lebar
6feb1718ed [NVPTX] Make NVVMReflect a function pass.
Summary:
Currently it's a module pass.  Make it a function pass so that we can
move it to PassManagerBuilder's EP_EarlyAsPossible extension point,
which only accepts function passes.

Reviewers: rnk

Subscribers: tra, llvm-commits, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264919 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-30 20:40:11 +00:00
Jingyue Wu
8c5f0de0ab [docs] Add gpucc publication and tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-30 05:05:40 +00:00
Kostya Serebryany
8bb475faa3 [libFuzzer] more trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-29 23:13:25 +00:00
Kostya Serebryany
7544ffc130 [libFuzzer] more docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264803 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-29 23:07:36 +00:00
Aaron Ballman
68b470458c Clarifying some of the requirements for building with Visual Studio on Windows. Namely, we require the latest Update to be installed (for sanity purposes), and we require CMake 2.8.12.2 for building LLVM with Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-29 20:23:55 +00:00
Manman Ren
d9e9e2b717 Swift Calling Convention: add swiftself attribute.
Differential Revision: http://reviews.llvm.org/D17866


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264754 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-29 17:37:21 +00:00
Elena Demikhovsky
5a15e95c59 Added 2 notes
1) Skylake and KNL support for X86
2) masked intrinsics load/store/gather/scatter

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-29 06:55:56 +00:00
Vedant Kumar
cfef8b9a08 [docs] Corrections w.r.t V2 of the coverage mapping format
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264679 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 22:16:01 +00:00
Nico Weber
51d98d364c docs: Fix footnote after r260042.
r260042 removed a footnote referring to autoconf, but it left
around one item still referring to that footnote (libtool), and
it didn't renumber the later footnote reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264663 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 21:24:46 +00:00
Nico Weber
8c94859cd7 docs: Try to remove weird linebreak from generated html.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264654 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 21:00:21 +00:00
Nico Weber
c056d20eaf docs: Update Ninja link, also fix link syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264648 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 20:32:38 +00:00
Lang Hames
215b61f08e [Kaleidoscope] Rename Error -> LogError in Chapters 2-5.
This keeps the naming consistent with Chapters 6-8, where Error was renamed to
LogError in r264426 to avoid clashes with the new Error class in libSupport.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264427 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 17:41:26 +00:00
Lang Hames
d7b240afb9 [Kaleidoscope] Fix 'Error' name clashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264426 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 17:33:32 +00:00
Reid Kleckner
c68f3d4c8d Try to fix ODR violation of ErrorInfo::ID
This implements my suggestion to Lang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 23:49:34 +00:00
Sanjoy Das
8ba5ebc098 Add lowering support for llvm.experimental.deoptimize
Summary:
Only adds support for "naked" calls to llvm.experimental.deoptimize.
Support for round-tripping through RewriteStatepointsForGC will come
as a separate patch (should be simpler than this one).

Reviewers: reames

Subscribers: sanjoy, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:23:29 +00:00
Chris Bieneman
c28ee9ced7 [Docs] Updating CMake docs to include LLVM_OPTIMIZED_TABLEGEN
This is based on feedback on llvm-commits from Sean Silvas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264318 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 18:46:43 +00:00
Lang Hames
2e2ed8c746 [docs] Clarify Error example in Programmer's Manual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 18:05:21 +00:00
Justin Bogner
8b620f3783 docs: Fix a missing language in a code-block
This should fix the docs build.
Spotted by spstarr, thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 22:54:19 +00:00
Justin Lebar
fe3378bb83 [CUDA] Update docs to reflect that we no longer define __NVCC__.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264208 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 22:43:10 +00:00
Justin Bogner
2515d26400 FAQ: Remove the entire Build Problems section
This is all horribly outdated, and is mostly about the autoconf build
system that doesn't even exist anymore. These questions aren't
frequent, and these answers aren't useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 06:54:42 +00:00
Justin Bogner
ce3a62bee8 FAQ: We require GCC 4.7 - nobody's asking about build failures with 3.3.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 06:38:53 +00:00
Vedant Kumar
4b4e6ab6be [docs] Fix typo in ProgrammersManual.rst
Patch by Miod Vallat!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 05:18:50 +00:00
Lang Hames
3821992393 [Docs] Clarify boolean conversion for Error and Expected<T> in the Programmer's
Manual.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264135 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 03:18:16 +00:00
Sean Silva
1495b908cb [docs] Use reST link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264121 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 00:31:21 +00:00
Sean Silva
00b768bfef Bring back Makefile.sphinx
It is not part of autoconf and should not have been removed in r258861.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264120 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 00:30:57 +00:00
Sean Silva
806688c673 [docs] Clarify the sense of --compile-command
In retrospect, it seems "obvious" that the sense of the return code is
the same as if it crashed on "interesting" inputs. But that didn't stop
me from spending more time than I care to admit verifying this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 00:25:13 +00:00
Matthias Braun
a31e891389 Revert "Support arbitrary addrspace pointers in masked load/store intrinsics"
This commit broke LTO builds. Reverting it to unbreak the bots while the
issue is investigated. See also:

http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160321/341002.html

This reverts r263158

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 20:24:34 +00:00
Justin Lebar
9dd6a5392f [CUDA] Add documentation explaining how to detect clang vs nvcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 23:05:15 +00:00
Kostya Serebryany
bccbdac96f [libFuzzer] one more trophie
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263868 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-19 01:05:33 +00:00
Chris Bieneman
07799b24b7 Fixing autocorrect changing cmake->make
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 22:11:51 +00:00
Chris Bieneman
fd9f306bd8 Missed a few non-ascii characters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263841 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 21:59:33 +00:00
Chris Bieneman
eceee13676 Updates based on post-commit review of r263834
* Renamed to be camel case, consistent with other docs.
* Fixed non-ascii characters (this is what I get for writing docs on an iPad).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 21:57:51 +00:00
Chris Bieneman
3600511689 [Docs] New documentation for advanced build configurations
This document covers how to use some of the new complex build configurations CMake supports.

Feedback and improvements welcomed!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263834 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 21:16:26 +00:00
Kostya Serebryany
4aa62c5d17 [libFuzzer] add a flag close_fd_mask so that we can silence spammy targets by closing stderr/stdout
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263831 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 20:58:29 +00:00
Alexey Samsonov
b0697bb475 [Docs] Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263754 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-17 23:08:01 +00:00
Wilfred Hughes
0a1bf1d197 Remove obselete reference to TypeResolve from the tutorial.
TypeResolve went away in r134829 in 2011.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263702 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-17 10:20:58 +00:00
Wilfred Hughes
656df231ed Minor grammar fix in kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263700 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-17 10:18:13 +00:00
Wilfred Hughes
c2e48fb33a Further typo fixes in kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263697 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-17 09:26:45 +00:00
Wilfred Hughes
a66f9eb55e Fix typo in kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263696 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-17 09:09:07 +00:00
Lang Hames
b92213233c [Support] Add the 'Error' class for structured error handling.
This patch introduces the Error classs for lightweight, structured,
recoverable error handling. It includes utilities for creating, manipulating
and handling errors. The scheme is similar to exceptions, in that errors are
described with user-defined types. Unlike exceptions however, errors are
represented as ordinary return types in the API (similar to the way
std::error_code is used).

For usage notes see the LLVM programmer's manual, and the Error.h header.
Usage examples can be found in unittests/Support/ErrorTest.cpp.

Many thanks to David Blaikie, Mehdi Amini, Kevin Enderby and others on the
llvm-dev and llvm-commits lists for lots of discussion and review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263609 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 01:02:46 +00:00
Justin Lebar
0e344de12e [docs] "Straightforward" is one word.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-14 20:18:51 +00:00
Justin Lebar
d63dbd5680 [docs] Fix typo in docs/CodeGenerator.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263479 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-14 20:17:08 +00:00
Kostya Serebryany
258d1e6be7 [libFuzzer] refresh docs more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263332 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 03:23:02 +00:00
Kostya Serebryany
b3dcade510 [libFuzzer] refresh docs more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263331 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 03:11:27 +00:00
Kostya Serebryany
4b45ff1d5d [libFuzzer] refresh docs more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263330 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 03:05:37 +00:00
Kostya Serebryany
409f59e332 [libFuzzer] refresh docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 02:56:25 +00:00
Kostya Serebryany
b30f32650e [libFuzzer] try to use max_len based on the items of the corpus instead of blindly defaulting to 64 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263323 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 01:57:04 +00:00
Wilfred Hughes
0ba30ee421 Updating source languages entry in FAQ.
Dragonegg is no longer actively maintained[1], and the Pypy team is not
actively pursuing LLVM[2].

1: http://reviews.llvm.org/D9331
2: http://rpython.readthedocs.org/en/latest/faq.html#could-we-use-llvm



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 00:43:26 +00:00
Chris Matthews
053b5e9854 Fix the docs I broke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 23:31:02 +00:00
Chris Matthews
41cfc0be88 Extend test-suite docs to describe how to run test-suite with cmake+lit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263305 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 22:33:36 +00:00
Sanjoy Das
f9e7219610 Introduce @llvm.experimental.deoptimize
Summary:
This intrinsic, together with deoptimization operand bundles, allow
frontends to express transfer of control and frame-local state from
one (typically more specialized, hence faster) version of a function
into another (typically more generic, hence slower) version.

In languages with a fully integrated managed runtime this intrinsic can
be used to implement "uncommon trap" like functionality.  In unmanaged
languages like C and C++, this intrinsic can be used to represent the
slow paths of specialized functions.

Note: this change does not address how `@llvm.experimental_deoptimize`
is lowered.  That will be done in a later change.

Reviewers: chandlerc, rnk, atrick, reames

Subscribers: llvm-commits, kmod, mjacob, maksfb, mcrosier, JosephTremoulet

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 19:08:34 +00:00
Artur Pilipenko
980df33d17 Support arbitrary addrspace pointers in masked load/store intrinsics
This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.

The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.

Reviewed By: reames

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263158 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-10 20:39:22 +00:00
Mehdi Amini
0693d31138 Add an entry in the Release Notes for LLVMContext::discardValueNames()
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-10 02:18:17 +00:00
Hans Wennborg
86b13ad31e ReleaseNotes: update 'you may prefer' link to 3.8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263030 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09 17:25:34 +00:00
Matt Arsenault
d92b7ee9bc Fix broken example for bitreverse documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262865 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-07 21:54:52 +00:00
Wilfred Hughes
5949d69774 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262802 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-06 12:37:34 +00:00
Alexander Kornienko
41664c2aeb [docs] Updated docs to work with Doxygen 1.8.11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262786 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-06 03:50:08 +00:00
Sanjoy Das
f34ebb336e [Statepoint docs] Delete trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-04 18:14:09 +00:00
Philip Reames
94c4abb5ad [docs] Add a description of current problem areas to the statepoint docs
Triggered by a question on llvm-dev about status



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262671 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03 23:24:44 +00:00
Kostya Serebryany
89ab66dcfc [libFuzzer] more trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262509 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 19:45:10 +00:00
Steven Wu
b9de197a7a Rename embedded bitcode section in MachO
Summary:
Rename the section embeds bitcode from ".llvmbc,.llvmbc" to "__LLVM,__bitcode".
The new name matches MachO section naming convention.

Reviewers: rafael, pcc

Subscribers: davide, llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262245 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 19:40:10 +00:00
Kostya Serebryany
e01ce57c55 [libFuzzer] don't emit callbacks to sanitizer run-time in -fsanitize-coverage=trace-pc mode; update libFuzzer doc for previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262110 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 05:45:12 +00:00
Sanjoy Das
f35e0d3757 Minor doc fix: statepoints are invokable too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 03:33:59 +00:00
Sanjay Patel
fb916c227d fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261805 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-24 23:44:19 +00:00
Jingyue Wu
89e030264f [doc] Obtaining help on LLVM's CUDA support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261706 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-23 23:34:49 +00:00
Sylvestre Ledru
887de490bd fix the indentation of the example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261628 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-23 11:17:27 +00:00
Tom Stellard
58ca760083 docs/AMDGPUUsage: Update assembly example
Reviewers: arsenm, nhaustov

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261550 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-22 18:36:00 +00:00
Chandler Carruth
fe6345c537 [LPM] Document the new helpers to make it easy to get consistent require
and preserve behavior from loop passes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261319 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-19 10:59:43 +00:00
Philip Reames
3dbdebce48 [IR] Extend cmpxchg to allow pointer type operands
Today, we do not allow cmpxchg operations with pointer arguments. We require the frontend to insert ptrtoint casts and do the cmpxchg in integers. While correct, this is problematic from a couple of perspectives:
1) It makes the IR harder to analyse (for instance, it make capture tracking overly conservative)
2) It pushes work onto the frontend authors for no real gain

This patch implements the simplest form of IR support. As we did with floating point loads and stores, we teach AtomicExpand to convert back to the old representation. This prevents us needing to change all backends in a single lock step change. Over time, we can migrate each backend to natively selecting the pointer type. In the meantime, we get the advantages of a cleaner IR representation without waiting for the backend changes.

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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-19 00:06:41 +00:00
Akira Hatanaka
763454153f Mention 'notail' attribute in 3.9 release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 19:35:47 +00:00
Justin Lebar
97a9fd0f0b Update langref to indicate that calls may be convergent.
Summary:
As previously written, only functions could be convergent.  But calls
need to have a notion of convergence as well.

To see why this is important, consider an indirect call.  We may or may
not want to disable optimizations around it and behave as though we're
calling a convergent function -- it depends on the semantics of the
language we're compiling.  Thus the need for this attr on the call.

Reviewers: jingyue, joker.eph

Subscribers: llvm-commits, tra, jhen, arsenm, chandlerc, hfinkel, resistor

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 17:46:41 +00:00
Amaury Sechet
89e84d7221 Deprecate LLVMGetDataLayout and replace it by LLVMGetDataLayoutStr
Summary: The name is confusing as it matche another method on the module.

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260920 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 00:23:52 +00:00
Amaury Sechet
d0aed13e56 Kill LLVMAddTargetData
Summary: It's red, it's dead.

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: llvm-commits, axw

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260919 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 00:22:02 +00:00
Sylvestre Ledru
3c5ec72fb6 Fix some typos in the llvm doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260855 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 20:16:22 +00:00
Rafael Espindola
9234391598 Delete the deprecated LLVMLinkModules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 15:28:45 +00:00
Mehdi Amini
0090eb9d61 C API: Remove LLVMGetDataLayout that was deprecated in 3.7
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 06:22:00 +00:00
Mark Lacey
0ff839adc1 Fix minor error with debug info doc.
Replace 'third' with 'fourth' in the description of the fourth argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260656 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 06:19:16 +00:00
James Y Knight
5b06a939bd Add -match-full-lines argument to FileCheck.
This is useful for some tests where more-exact matching is useful, such
as clang's Preprocessor tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260540 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 16:46:09 +00:00
Hemant Kulkarni
d712968e30 [llvm-nm] Add -radix option
Differential Revision: http://reviews.llvm.org/D16822

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260392 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 17:51:39 +00:00
Tim Northover
b2a20abf63 ARM: improve documentation slightly.
It seems the ARMv8 instruction set overview is no longer provided by ARM, so
I've removed it. Since most of the other documents were the same I unified the
two sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 23:55:48 +00:00
Justin Lebar
96d6052072 Update documentation about convergent attribute.
Summary:
Be more explicit about what 'convergent' means, and indicate that the
compiler may remove the attribute from a function if it can prove that
the function doesn't in fact execute any convergent ops.

Reviewers: resistor, jingyue, joker.eph

Subscribers: hfinkel, chandlerc, arsenm, jhen, tra, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260318 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 23:03:17 +00:00
Justin Bogner
1d15d57f1e cmake: Accept "thin" or "full" as arguments to -DLLVM_ENABLE_LTO
Mehdi suggested in a review of r259766 that it's also useful to easily
set the type of LTO. Augment the cmake variable to support that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260143 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 21:01:24 +00:00
Hans Wennborg
7dfc3433f3 [X86] Don't zero/sign-extend i1, i8, or i16 return values to 32 bits (PR22532)
This matches GCC and MSVC's behaviour, and saves on code size.

We were already not extending i1 return values on x86_64 after r127766. This
takes that patch further by applying it to x86 target as well, and also for i8
and i16.

The ABI docs have been unclear about the required behaviour here. The new i386
psABI [1] clearly states (Table 2.4, page 14) that i1, i8, and i16 return
vales do not need to be extended beyond 8 bits. The x86_64 ABI doc is being
updated to say the same [2].

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

 [1]. https://01.org/sites/default/files/file_attach/intel386-psabi-1.0.pdf
 [2]. https://groups.google.com/d/msg/x86-64-abi/E8O33onbnGQ/_RFWw_ixDQAJ

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260133 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 19:34:30 +00:00
Xinliang David Li
04638a608b [PGO] Enable compression in pgo instrumentation
This reduces sizes of instrumented object files, final binaries,
process images, and raw profile data.

The format of the indexed profile data remain the same.

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





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260117 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 18:13:49 +00:00
Keno Fischer
3440864413 [docs] Add a note that the Visual Studio C++ tools are required
Watching new contributors trying to build LLVM on Windows, one of the
very common failure modes was getting a version of Visual Studio
that did not have a C++ compiler for CMake to put up. Trying to create
a C++ project in Visual Studio will cause Visual Studio to go and
download the C++ tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260049 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 19:36:54 +00:00
Philip Reames
e51c15a4f4 [docs] Remove now confusing references to cofigure/autoconf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260042 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 16:35:04 +00:00
Philip Reames
a22f43f7dc [docs] Wordsmithing to program layout descriptio in GettingStarted
This just incrementally improves what was already there; it's questionable whether this content belongs in the getting started guide at all.

Patch by Ben Nathanson w/permission w/minor edtis by me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260040 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 16:23:32 +00:00
Philip Reames
56df681177 [docs] Clarify disk space usage of debug builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260039 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 15:58:35 +00:00
Philip Reames
55cdcca8e2 [docs] Remove a stale and confusing section from GettingStarted
The mentioned environment variable doesn't appear to have any use in the LLVM repository.  If it is still relevant for clang, we can consider adding it to the clang getting started page.

Patch inspired by documentation work by Ben Nathanson at the LLVM Bloomberg sprint.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 15:49:57 +00:00
Philip Reames
06f0086461 [docs] Update the docs to describe how to build the docs with cmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 15:42:12 +00:00
Duncan P. N. Exon Smith
e7a916a707 LangRef: Fix example code for cmpxchg
Patch by Daniel Robertson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260018 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 05:06:35 +00:00
Philip Reames
3e299e14c8 [docs] Warn against slow serial builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260006 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 19:43:40 +00:00
Philip Reames
d14beda7f7 [docs] Redirect new contributors to the right starting point
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 19:29:23 +00:00
Philip Reames
79a6578f71 [docs] Clarify a couple of getting started issues identified during Sprint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 19:20:26 +00:00
Ashutosh Nema
393c3c6b68 Fixed short underline error in LangRef.rst for recently added
metadata 'llvm.loop.licm_versioning.disable' description.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 09:24:37 +00:00
Ashutosh Nema
9feccf470d New Loop Versioning LICM Pass
Summary:
When alias analysis is uncertain about the aliasing between any two accesses,
it will return MayAlias. This uncertainty from alias analysis restricts LICM
from proceeding further. In cases where alias analysis is uncertain we might
use loop versioning as an alternative.

Loop Versioning will create a version of the loop with aggressive aliasing
assumptions in addition to the original with conservative (default) aliasing
assumptions. The version of the loop making aggressive aliasing assumptions
will have all the memory accesses marked as no-alias. These two versions of
loop will be preceded by a memory runtime check. This runtime check consists
of bound checks for all unique memory accessed in loop, and it ensures the
lack of memory aliasing. The result of the runtime check determines which of
the loop versions is executed: If the runtime check detects any memory
aliasing, then the original loop is executed. Otherwise, the version with
aggressive aliasing assumptions is used.

The pass is off by default and can be enabled with command line option 
-enable-loop-versioning-licm.

Reviewers: hfinkel, anemet, chatur01, reames

Subscribers: MatzeB, grosser, joker.eph, sanjoy, javed.absar, sbaranga,
             llvm-commits

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259986 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 07:47:48 +00:00
Vedant Kumar
2cf81c9f96 [docs] Fix typo in YamlIO.rst
Patch by Mario Lang!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259825 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 20:42:43 +00:00
Niels Ole Salscheider
891198c2e4 Install cmake files to lib/cmake/llvm
This is the right location for platform-specific files.

On some distributions (e. g. Exherbo), a package can be installed for several
architectures in parallel, but the architecture-independent files are shared.
Therefore, we must not install architecture-dependent files (like the CMake
config and export files) to share/.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259821 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 20:08:19 +00:00
Justin Bogner
125c5460fd cmake: Add a flag to enable LTO
This adds -DLLVM_ENABLE_LTO, rather than forcing people to manually
add -flto to the various _FLAGS variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 07:28:30 +00:00
Peter Collingbourne
863bc58917 docs: Document how bitsets may be used to encode type information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259619 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 02:01:08 +00:00
Kostya Serebryany
485551ecaf [libFuzzer] allow passing 1 or more files as individual inputs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02 03:03:47 +00:00
Jingyue Wu
e3e4ffd172 [doc] improve the doc for CUDA
1. Mentioned that CUDA support works best with trunk.
2. Simplified the example by removing its dependency on the CUDA samples.
3. Explain the --cuda-gpu-arch flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 23:48:47 +00:00
Alexey Samsonov
af1aa14cb5 [docs] Remove references to autotools build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 01:10:15 +00:00
Kostya Serebryany
58b3c64b6b [libFuzzer] add -timeout_exitcode option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:30:07 +00:00
Vedant Kumar
0c94d7d441 [Profiling] Add a -sparse mode to llvm-profdata merge
Add an option to llvm-profdata merge for writing out sparse indexed
profiles. These profiles omit InstrProfRecords for functions which are
never executed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:54:45 +00:00
Xinliang David Li
04aa02841f [Coverage] Fix more bugs in covmap V1 documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258906 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 03:13:09 +00:00
Sanjoy Das
a3f542f695 [docs] Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258878 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 23:26:25 +00:00
Chris Bieneman
6ed3ca91e5 Fixing the documentation builds
I broke the documentation builds when I deleted the MakefileGuide as part of the autoconf removal. At some point I'll need to do a more in-depth pass updating the documentation to remove references to the old build system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258873 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 22:53:12 +00:00
Chris Bieneman
caeade4234 Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html

"I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened."
- Obi Wan Kenobi

Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark

Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258861 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 21:29:08 +00:00
Hemant Kulkarni
8822b47f7c [llvm-readobj] Add -elf-section-groups option
Adds a way to inspect SHT_GROUP sections in ELF objects.
Displays signature, member sections of these sections.

Differential revision: http://reviews.llvm.org/D16555

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 19:46:39 +00:00
Matt Arsenault
f748e83708 AMDGPU: Note mesa version in release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 04:29:15 +00:00
Vedant Kumar
56ad20691a [docs] Document how to merge patches into release branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258736 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 22:47:54 +00:00
Kostya Serebryany
d75ddafc2f [libFuzzer] add -abort_on_timeout option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258631 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-23 19:34:19 +00:00
Sanjoy Das
e6a9ed76ea Add a "gc-transition" operand bundle
Summary:
This adds a new kind of operand bundle to LLVM denoted by the
`"gc-transition"` tag.  Inputs to `"gc-transition"` operand bundle are
lowered into the "transition args" section of `gc.statepoint` by
`RewriteStatepointsForGC`.

This removes the last bit of functionality that was unsupported in the
deopt bundle based code path in `RewriteStatepointsForGC`.

Reviewers: pgavlin, JosephTremoulet, reames

Subscribers: sanjoy, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258338 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 19:50:25 +00:00
Andrew Wilkins
4ced44d3d7 docs: address post-commit review
Rewording/expansion of CMake options
suggested by Dan Liew.

See http://reviews.llvm.org/D16208.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258112 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 05:43:21 +00:00
Kostya Serebryany
1e595319e3 [libFuzzer] introduce LLVMFuzzerInitialize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257980 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-16 01:23:12 +00:00
Andrew Wilkins
01cb5fc688 [docs] Document LLVM_{BUILD,LINK}_LLVM_DYLIB
Summary:
Document the LLVM_BUILD_LLVM_DYLIB and LLVM_LINK_LLVM_DYLIB
CMake options, move BUILD_SHARED_LIBS out of frequently-used,
and add a note/warning to BUILD_SHARED_LIBS.

Reviewers: beanz, delcypher, mjacob

Subscribers: mjacob, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257864 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 03:33:35 +00:00
Philip Reames
16b8b2d9ac [docs] Restructure description of records created by Statepoints
The previous text was hard to understand even for me and I wrote it.  Hopefully the new structure makes it a bit more clear what's going on.  If anyone has word smithing suggestion or clarification questions, please let me know.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257847 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:13:39 +00:00
Philip Reames
112e094b77 [docs] Update Statepoint docs to clarify format for recent changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 23:58:18 +00:00
Dan Liew
10387d22ff [docs] Improve the documentation on committing code reviewed on
Phabricator to trunk.

The previous documentation had a few issues:

* It did not make it explicit that code could be
committed without using the Arcanist tool and how this should be done.

* There was also an implicit assumption on using Subversion
rather than git-svn in the example using Arcanist. The documentation now
explicitly mentions both cases and details how to commit to trunk in
each case.

Reviewers: klimek, probinson

Subscribers: probinson, nwilson, reames, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257764 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 13:39:29 +00:00
Hans Wennborg
81124df23b Unbreak the sphinx build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257659 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 19:33:49 +00:00
Hans Wennborg
a07c74ea61 Update version to 3.9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 17:32:32 +00:00
Sanjay Patel
57353d1bcc fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257617 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 16:46:41 +00:00
Sanjay Patel
56ae12b99b fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257611 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 16:30:44 +00:00
JF Bastien
8d4101c8c9 Doc fix: code-quote load / store doc the same way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257573 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 04:52:26 +00:00
Christof Douma
d6d9c0e008 The --debug-only option now takes a comma separated list of debug types.
This means that the DEBUG_TYPE cannot take a comma anymore. All existing passes
conform to this rule.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 10:23:13 +00:00
Reid Kleckner
b973616c17 Update the VS getting started docs to reflect the current state of support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 20:51:57 +00:00
Joseph Tremoulet
f3f9d83b92 [LangRef] Move catchpad to "Other Operators" (NFC)
It is no longer a terminator, so should no longer be grouped with them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257276 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 04:46:10 +00:00
Joseph Tremoulet
12b6cd2e54 [WinEH] Disallow cyclic unwinds
Summary:
Funclet-based EH personalities/tables likely can't handle these, and they
can't be generated at source, so make them officially illegal in IR as
well.


Reviewers: andrew.w.kaylor, rnk, majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257274 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 04:31:05 +00:00
Joseph Tremoulet
c2d8241d67 [WinEH] Verify consistent funclet unwind exits
Summary:
A funclet EH pad may be exited by an unwind edge, which may be a
cleanupret exiting its cleanuppad, an invoke exiting a funclet, or an
unwind out of a nested funclet transitively exiting its parent.  Funclet
EH personalities require all such exceptional exits from a given funclet to
have the same unwind destination, and EH preparation / state numbering /
table generation implicitly depends on this.  Formalize it as a rule of
the IR in the LangRef and verifier.


Reviewers: rnk, majnemer, andrew.w.kaylor

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257273 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 04:30:02 +00:00
Joseph Tremoulet
fe9953a02c [WinEH] Verify unwind edges against EH pad tree
Summary:
Funclet EH personalities require a tree-like nesting among funclets
(enforced by the ParentPad linkage in the IR), and also require that
unwind edges conform to certain rules with respect to the tree:
 - An unwind edge may exit 0 or more ancestor pads
 - An unwind edge must enter exactly one EH pad, which must be distinct
   from any exited pads
 - A cleanupret's edge must exit its cleanuppad

Describe these rules in the LangRef, and enforce them in the verifier.


Reviewers: rnk, majnemer, andrew.w.kaylor

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257272 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 04:28:38 +00:00
Paul Robinson
604ad96a35 How to close a review manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257180 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-08 17:05:12 +00:00
Mike Aizatsky
ba07fc7f19 [llvm-symbolizer] Print out non-address lines verbatim.
Differential Revision: http://reviews.llvm.org/D15876

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-07 23:57:41 +00:00
Xinliang David Li
42115a720d More fix to coverage documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256895 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-06 01:23:41 +00:00
Eric Christopher
7fdf13ed48 Update docs to recommend CMake >= v3.2.
CMake v3.2 or newer is necessary to get interactive output when running
Lit via Ninja. Otherwise Ninja will buffer Lit's output, which makes
for a crummy experience -- you can't tell if your tests are hung!

Patch by Justin Lebar!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-04 23:22:43 +00:00
Xinliang David Li
e27d311065 Update documantation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-04 20:00:47 +00:00
Dimitry Andric
ac6a87b06e Fix several accidental DOS line endings in source files
Summary:
There are a number of files in the tree which have been accidentally checked in with DOS line endings.  Convert these to native line endings.

There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those.

Reviewers: joerg, aaron.ballman

Subscribers: aaron.ballman, sanjoy, dsanders, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256707 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-03 17:22:03 +00:00
Chen Li
955318d58d [gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead of i32 type
Summary: This patch changes gc.statepoint intrinsic's return type to token type instead of i32 type. Using token types could prevent LLVM to merge different gc.statepoint nodes into PHI nodes and cause further problems with gc relocations. The patch also changes the way on how gc.relocate and gc.result look for their corresponding gc.statepoint on unwind path. The current implementation uses the selector value extracted from a { i8*, i32 } landingpad as a hook to find the gc.statepoint, while the patch directly uses a token type landingpad (http://reviews.llvm.org/D15405) to find the gc.statepoint. 

Reviewers: sanjoy, JosephTremoulet, pgavlin, igor-laevsky, mjacob

Subscribers: reames, mjacob, sanjoy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256443 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-26 07:54:32 +00:00
Paul Robinson
c47dfee800 Add advice on choosing reviewers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256265 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22 18:59:02 +00:00
NAKAMURA Takumi
d644801757 [Cygwin] Enable TLS as emutls.
It resolves clang selfhosting with std::once() for Cygwin.

FIXME: It may be EmulatedTLS-generic also for X86-Android.
FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256134 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 02:37:23 +00:00
Rafael Espindola
9c2c05d70e Delete APIs that have been deprecated since 2010.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256107 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19 21:42:07 +00:00
Kostya Serebryany
62663ee66e [libFuzzer] deprecate -save_minimized_corpus, -merge can be used instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256086 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19 03:42:16 +00:00
Rafael Espindola
8d184ad258 Deprecate a few C APIs.
This deprecates:
* LLVMParseBitcode
* LLVMParseBitcodeInContext
* LLVMGetBitcodeModuleInContext
* LLVMGetBitcodeModule

They are replaced with the functions with a 2 suffix which do not record
a diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256065 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 23:46:42 +00:00
Eric Christopher
cca8dbee4e Reorganize the C API headers to improve build times.
Type specific declarations have been moved to Type.h and error handling
routines have been moved to ErrorHandling.h. Both are included in Core.h
so nothing should change for projects directly including the headers,
but transitive dependencies may be affected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255965 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 01:46:52 +00:00
JF Bastien
7e54c38de0 Polish atomic pointers
Summary:
I didn't realize that we already allowed atomic load/store of pointers,
it was added in 2012 by r162146. This patch updates the documentation
and tightens the verifier by using DataLayout to make sure that the
stored size is byte-sized and power-of-two. DataLayout is also used for
integers, and while I'm here I updated the corresponding code for
cmpxchg and rmw.

See the following discussion for context and upcoming changes to
add floating-point and vector atomics:
  https://groups.google.com/forum/#!topic/llvm-dev/Nh0P_E3CRoo/discussion

Reviewers: reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255931 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 22:09:19 +00:00
Rafael Espindola
50005f6837 Drop function that are deprecated since 2010.
These functions were deprecated in r97608.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255927 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 21:16:12 +00:00
Vedant Kumar
b12341d9ee [docs] Motivate ninja in GettingStarted.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255924 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 20:49:48 +00:00
Rafael Espindola
d912be98f8 Change linkInModule to take a std::unique_ptr.
Passing in a std::unique_ptr should help find errors when the module
is used after being linked into another module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255842 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 23:16:33 +00:00
Vaivaswatha Nagaraj
ee7970e77e Add InaccessibleMemOnly and inaccessibleMemOrArgMemOnly attributes
Summary:
This patch introduces two new function attributes 

InaccessibleMemOnly: This attribute indicates that the function may only access memory that is not accessible by the program/IR being compiled. This is a weaker form of ReadNone.
inaccessibleMemOrArgMemOnly: This attribute indicates that the function may only access memory that is either not accessible by the program/IR being compiled, or is pointed to by its pointer arguments. This is a weaker form of  ArgMemOnly

Test cases have been updated. This revision uses this (d001932f3a) as reference.

Reviewers: jmolloy, hfinkel

Subscribers: reames, joker.eph, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255778 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 16:16:19 +00:00
Philip Reames
56318195bf [IR] Add support for floating pointer atomic loads and stores
This patch allows atomic loads and stores of floating point to be specified in the IR and adds an adapter to allow them to be lowered via existing backend support for bitcast-to-equivalent-integer idiom.

Previously, the only way to specify a atomic float operation was to bitcast the pointer to a i32, load the value as an i32, then bitcast to a float. At it's most basic, this patch simply moves this expansion step to the point we start lowering to the backend.

This patch does not add canonicalization rules to convert the bitcast idioms to the appropriate atomic loads. I plan to do that in the future, but for now, let's simply add the support. I'd like to get instruction selection working through at least one backend (x86-64) without the bitcast conversion before canonicalizing into this form.

Similarly, I haven't yet added the target hooks to opt out of the lowering step I added to AtomicExpand. I figured it would more sense to add those once at least one backend (x86) was ready to actually opt out.

As you can see from the included tests, the generated code quality is not great. I plan on submitting some patches to fix this, but help from others along that line would be very welcome. I'm not super familiar with the backend and my ramp up time may be material.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255737 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 00:49:36 +00:00
David Majnemer
b46bb541f5 [WinEH] Use operand bundles to describe call sites
SimplifyCFG allows tail merging with code which terminates in
unreachable which, in turn, makes it possible for an invoke to end up in
a funclet which it was not originally part of.

Using operand bundles on invokes allows us to determine whether or not
an invoke was part of a funclet in the source program.

Furthermore, it allows us to unambiguously answer questions about the
legality of inlining into call sites which the personality may have
trouble with.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255674 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15 21:27:27 +00:00
Alex Denisov
022b1097ba LLVM tutorial: fix broken links/anchors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255671 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15 20:50:29 +00:00