Commit Graph

6559 Commits

Author SHA1 Message Date
Vassil Vassilev
94e7e888f8 Sync with changes from r300825 in clang.
Generate the better include paths. Instead of #include <llvm_header.h> doxygen
produces #include "llvm/Folder/llvm_header.h"

Patch by Yuka Takahashi (D32342)!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301569 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-27 17:23:53 +00:00
Aaron Ballman
d3d0cd648c Fixing a malformed RST table to get the documentation bot back to green.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301545 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-27 14:33:01 +00:00
Sanjoy Das
263da12ab2 Reverts commit r301424, r301425 and r301426
Commits were:

"Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts"
"Add a new WeakVH value handle; NFC"
"Rename WeakVH to WeakTrackingVH; NFC"

The changes assumed pointers are 8 byte aligned on all architectures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301429 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26 16:37:05 +00:00
Sanjoy Das
d0cf26e443 Rename WeakVH to WeakTrackingVH; NFC
Summary:
I plan to use WeakVH to mean "nulls itself out on deletion, but does
not track RAUW" in a subsequent commit.

Reviewers: dblaikie, davide

Reviewed By: davide

Subscribers: arsenm, mehdi_amini, mcrosier, mzolotukhin, jfb, llvm-commits, nhaehnle

Differential Revision: https://reviews.llvm.org/D32266

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301424 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26 16:20:52 +00:00
Galina Kistanova
02ad713833 Cosmetic change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301253 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 21:06:29 +00:00
Galina Kistanova
3d88243825 Small addition on how to add a builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301248 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 20:48:40 +00:00
George Karpenkov
6f76a43cea Updates documentation for a syntax sugar libfuzzer flag,
as implemented in https://reviews.llvm.org/D32193

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301217 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 18:39:52 +00:00
Matt Arsenault
666020a37d AMDGPU: Move trap lowering to DAG
Fixes traps in any block besides the entry block,
and fixes depending on a live-in physical register
by using a virtual register copy.

Also happens to stop emitting a nop in the case
debug trap is not supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301206 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 17:49:13 +00:00
George Karpenkov
e6dc33fc17 Testing commit credentials
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301200 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 17:28:32 +00:00
Kamil Rytarowski
bb7651ba99 Update documentation for the NetBSD target
LLVM is known to work on NetBSD x86 32-bit and 64-bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301081 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-22 16:11:23 +00:00
Andrew Kaylor
f7c70afb60 Fix formatting of constrained FP intrinsic documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300865 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 18:18:36 +00:00
Sanjoy Das
ef5181372f Statepoint Docs: fix incorrect uses of it's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300797 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 23:55:03 +00:00
Philip Reames
a716933950 Refresh the statepoint docs a bit
The documentation had gotten a bit stale.  The revised one are by no means perfect, but I tried to remove the obvious incorrect or misleading statements.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300782 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 23:16:13 +00:00
Adrian Prantl
b560ea777b PR32382: Fix emitting complex DWARF expressions.
The DWARF specification knows 3 kinds of non-empty simple location
descriptions:
1. Register location descriptions
  - describe a variable in a register
  - consist of only a DW_OP_reg
2. Memory location descriptions
  - describe the address of a variable
3. Implicit location descriptions
  - describe the value of a variable
  - end with DW_OP_stack_value & friends

The existing DwarfExpression code is pretty much ignorant of these
restrictions. This used to not matter because we only emitted very
short expressions that we happened to get right by accident.  This
patch makes DwarfExpression aware of the rules defined by the DWARF
standard and now chooses the right kind of location description for
each expression being emitted.

This would have been an NFC commit (for the existing testsuite) if not
for the way that clang describes captured block variables. Based on
how the previous code in LLVM emitted locations, DW_OP_deref
operations that should have come at the end of the expression are put
at its beginning. Fixing this means changing the semantics of
DIExpression, so this patch bumps the version number of DIExpression
and implements a bitcode upgrade.

There are two major changes in this patch:

I had to fix the semantics of dbg.declare for describing function
arguments. After this patch a dbg.declare always takes the *address*
of a variable as the first argument, even if the argument is not an
alloca.

When lowering a DBG_VALUE, the decision of whether to emit a register
location description or a memory location description depends on the
MachineLocation — register machine locations may get promoted to
memory locations based on their DIExpression. (Future) optimization
passes that want to salvage implicit debug location for variables may
do so by appending a DW_OP_stack_value. For example:
  DBG_VALUE, [RBP-8]                        --> DW_OP_fbreg -8
  DBG_VALUE, RAX                            --> DW_OP_reg0 +0
  DBG_VALUE, RAX, DIExpression(DW_OP_deref) --> DW_OP_reg0 +0

All testcases that were modified were regenerated from clang. I also
added source-based testcases for each of these to the debuginfo-tests
repository over the last week to make sure that no synchronized bugs
slip in. The debuginfo-tests compile from source and run the debugger.

https://bugs.llvm.org/show_bug.cgi?id=32382
<rdar://problem/31205000>

Differential Revision: https://reviews.llvm.org/D31439

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300522 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-18 01:21:53 +00:00
Peter Collingbourne
6163b4af73 Bitcode: Add a string table to the bitcode format.
Add a top-level STRTAB block containing a string table blob, and start storing
strings for module codes FUNCTION, GLOBALVAR, ALIAS, IFUNC and COMDAT in
the string table.

This change allows us to share names between globals and comdats as well
as between modules, and improves the efficiency of loading bitcode files by
no longer using a bit encoding for symbol names. Once we start writing the
irsymtab to the bitcode file we will also be able to share strings between
it and the module.

On my machine, link time for Chromium for Linux with ThinLTO decreases by
about 7% for no-op incremental builds or about 1% for full builds. Total
bitcode file size decreases by about 3%.

As discussed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2017-April/111732.html

Differential Revision: https://reviews.llvm.org/D31838

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300464 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-17 17:51:36 +00:00
Kostya Serebryany
2bb40bf078 [libFuzzer] more trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300366 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-14 20:11:16 +00:00
Matthias Braun
dc1a361ccd MIRLangRef: Add a section on simplifying .mir tests
Differential Revision: http://reviews.llvm.org/D32058

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300282 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13 23:45:14 +00:00
Matthias Braun
1130138bb1 MIRLangRef: Simplify/update documentation
- Refer to options by `-option` instead of `option`
- Use `-mtriple=` instead of `-march` in the example (-march will still
  target the default operating system which is usually not what you want
  in a test)
- Rephrase sentence because output does not go to stdout by default (you
  need -o - for that as should be expected).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300268 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13 22:14:45 +00:00
George Burgess IV
d613770733 Remove more lies from the LangRef.
Same change as in r300168, but for invoke instead of call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300172 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13 05:00:31 +00:00
George Burgess IV
c1231f81ae Update the LangRef to reflect reality.
At the very least, we have CallInst::setIsNoInline() for adding the
noinline attribute to callsites, and I'm told alwaysinline seems to
work.

Thought of adding "not all attributes are guaranteed to work here". If
someone thinks that would be better (or has a better way of phrasing
that, etc.), happy to add it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300168 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13 04:01:55 +00:00
Sanjay Patel
2c5adb18ba [InstCombine] fix wrong undef handling when converting select to shuffle
As discussed in:
https://bugs.llvm.org/show_bug.cgi?id=32486
...the canonicalization of vector select to shufflevector does not hold up
when undef elements are present in the condition vector. 

Try to make the undef handling clear in the code and the LangRef.

Differential Revision: https://reviews.llvm.org/D31980



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300092 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-12 18:39:53 +00:00
Piotr Padlewski
715890b279 [LangRef] fix documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300050 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-12 11:18:19 +00:00
Piotr Padlewski
3512d22fea Invariant.group and mustalias docs fixes
Summary:
Alias analysis would like to know that
invariant.group.barrier returns pointer that mustalias,
but this can't imply that we can replace one pointer with another

Reviewers: dberlin, sanjoy

Subscribers: llvm-commits, chandlerc, hfinkel, nlewycky, amharc

Differential Revision: https://reviews.llvm.org/D31758

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300033 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-12 07:59:35 +00:00
Andrew Kaylor
b66309b465 Minor updates to floating point intrinsic documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299991 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11 21:52:40 +00:00
Matt Arsenault
e0b3c335a2 Allow DataLayout to specify addrspace for allocas.
LLVM makes several assumptions about address space 0. However,
alloca is presently constrained to always return this address space.
There's no real way to avoid using alloca, so without this
there is no way to opt out of these assumptions.

The problematic assumptions include:
- That the pointer size used for the stack is the same size as
  the code size pointer, which is also the maximum sized pointer.

- That 0 is an invalid, non-dereferencable pointer value.

These are problems for AMDGPU because alloca is used to
implement the private address space, which uses a 32-bit
index as the pointer value. Other pointers are 64-bit
and behave more like LLVM's notion of generic address
space. By changing the address space used for allocas,
we can change our generic pointer type to be LLVM's generic
pointer type which does have similar properties.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299888 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-10 22:27:50 +00:00
Dean Michael Berris
af703fae1e [XRay][docs] Fix hyperlink to XRay doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299624 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06 04:26:26 +00:00
Gor Nishanov
f202abfbd6 [coroutines] Add syntax coloring to examples in Coroutines.rst
Subscribers: EricWF

Differential Revision: https://reviews.llvm.org/D31699

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299517 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-05 05:26:26 +00:00
Evgeniy Stepanov
8719ab145a Change section flag character for SHF_LINK_ORDER to "o".
GAS uses "m" as a compatibility alias for "M" (SHF_MERGE).

"o" is free, except on ia64, where it already means SHF_LINK_ORDER.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299479 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04 22:35:08 +00:00
Tim Northover
9d740a4a71 Update stale doxygen links in ProgrammersManual.rst
Patch by Wei-Ren Chen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299395 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-03 22:24:32 +00:00
Joel Jones
5b2afe9ffb Fix LLVMBuild.txt typo. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299373 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-03 18:21:50 +00:00
Peter Collingbourne
7bceb16031 Bitcode: Remove reader support for MODULE_CODE_PURGEVALS.
Support for writing this module code was removed in r73220, which was well
before the LLVM 3.0 release, so we do not need to be able to understand it
for backwards compatibility.

Differential Revision: https://reviews.llvm.org/D31563

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299370 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-03 17:58:48 +00:00
Dean Michael Berris
8cefdcb5f6 [XRay][docs] Add XRayExample to docindex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299172 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 02:51:19 +00:00
Dean Michael Berris
21463ca861 [XRay][docs] Examples for how to use XRay
Summary:
This document is an attempt at showing how XRay could be used to debug
latency issues with LLVM tools, and how to use the llvm-xray tool to
analyse XRay traces.

Reviewers: echristo, mehdi_amini, davide

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D31493

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299133 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 23:46:36 +00:00
Matt Arsenault
9065c48517 LangRef: Don't refer to a 'generic' address space.
Consistently call this the default address space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299131 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 23:36:47 +00:00
Rafael Espindola
31e9ec9aa5 Fix GettingStarted.rst statement.
Patch by Wei-Ren Chen!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298995 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 14:27:38 +00:00
Adam Nemet
5c57c1108e [IR] Add AllowContract to FastMathFlags
-ffp-contract=fast does not currently work with LTO because it's passed as a
TargetOption to the backend rather than in the IR. This adds it to
FastMathFlags.

This is toward fixing PR25721

Differential Revision: https://reviews.llvm.org/D31164

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298939 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28 20:11:52 +00:00
Reid Kleckner
122446a916 Document how to fetch monorepo SVN revision notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298733 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 20:47:41 +00:00
Adrian Prantl
fbf2dadfa5 Document the status quo of DIExpression semantics in LangRef.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298528 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22 18:01:01 +00:00
George Burgess IV
3479ed63a6 Let llvm.objectsize be conservative with null pointers
This adds a parameter to @llvm.objectsize that makes it return
conservative values if it's given null.

This fixes PR23277.

Differential Revision: https://reviews.llvm.org/D28494


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298430 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21 20:08:59 +00:00
Reid Kleckner
3b53072816 Fix RST docs AttributeList heading underline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298398 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21 17:05:00 +00:00
Reid Kleckner
6707770d48 Rename AttributeSet to AttributeList
Summary:
This class is a list of AttributeSetNodes corresponding the function
prototype of a call or function declaration. This class used to be
called ParamAttrListPtr, then AttrListPtr, then AttributeSet. It is
typically accessed by parameter and return value index, so
"AttributeList" seems like a more intuitive name.

Rename AttributeSetImpl to AttributeListImpl to follow suit.

It's useful to rename this class so that we can rename AttributeSetNode
to AttributeSet later. AttributeSet is the set of attributes that apply
to a single function, argument, or return value.

Reviewers: sanjoy, javed.absar, chandlerc, pete

Reviewed By: pete

Subscribers: pete, jholewinski, arsenm, dschuff, mehdi_amini, jfb, nhaehnle, sbc100, void, llvm-commits

Differential Revision: https://reviews.llvm.org/D31102

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298393 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21 16:57:19 +00:00
Jonathan Roelofs
56d588a775 Mention that the Sphinx docs build wants version 1.5 or later
`misc.highlighting_failure` support was added to `suppress_warnings` in that
version, and the warnings-as-errors docs build relies on it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298277 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-20 17:49:36 +00:00
Evgeniy Stepanov
7c45253e30 Fix docs-llvm-html build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298163 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-17 22:31:13 +00:00
Evgeniy Stepanov
df808fe215 Add !associated metadata.
This is an ELF-specific thing that adds SHF_LINK_ORDER to the global's section
pointing to the metadata argument's section. The effect of that is a reverse dependency
between sections for the linker GC.

!associated does not change the behavior of global-dce. The global
may also need to be added to llvm.compiler.used.

Since SHF_LINK_ORDER is per-section, !associated effectively enables
fdata-sections for the affected globals, the same as comdats do.

Differential Revision: https://reviews.llvm.org/D29104

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298157 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-17 22:17:24 +00:00
Rong Xu
6f00c7bc4d Resubmit r297897: [PGO] Value profile for size of memory intrinsic calls
R297897 inadvertently enabled annotation for memop profiling. This new patch
fixed it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297996 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-16 21:15:48 +00:00
Eric Liu
9dd65de00d Revert "[PGO] Value profile for size of memory intrinsic calls"
This commit reverts r297897 and r297909.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297951 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-16 13:16:35 +00:00
Rong Xu
670b4228b0 [PGO] Value profile for size of memory intrinsic calls
This patch adds the value profile support to profile the size parameter of
memory intrinsic calls: memcpy, memcmp, and memmov.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297897 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-15 21:47:27 +00:00
Daniel Berlin
a9c06e75f1 Fix some indenting and line-wrapping issues identified in ProgrammersManual. Make description of debugCounters a little clearer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297656 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 19:09:23 +00:00
Daniel Berlin
b9513eac4a Add documentation on debug counters to Programmers Manual.
Reviewers: mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D30842

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297575 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 04:46:41 +00:00
Daniel Berlin
57bd1ea8eb Remove opt-bisect support for "cases" in favor of debug counters
Summary:
Ths "cases" support was not quite finished, is unused, and is really just debug counters.
(well, almost, debug counters are slightly more powerful, in that they can skip things at the start, too).
Note, opt-bisect itself could also be implemented as a wrapper around
debug counters, but not sure it's worth it ATM.

I'll shove it on a todo list if we think it is.

Reviewers: MatzeB, chandlerc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D30856

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297542 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 01:41:03 +00:00