Commit Graph

7505 Commits

Author SHA1 Message Date
Yaxun Liu
95d322b634 [AMDGPU] Added a new metadata for multi grid sync implicit argument
Patch by Christudasan Devadasan.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365217 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-05 16:05:17 +00:00
Graham Hunter
6fea0a2262 Scalable Vector IR Type with further LTO fixes
Reintroduces the scalable vector IR type from D32530, after it was reverted
a couple of times due to increasing chromium LTO build times. This latest
incarnation removes the walk over aggregate types from the verifier entirely,
in favor of rejecting scalable vectors in the isValidElementType methods in
ArrayType and StructType. This removes the 70% degradation observed with
the second repro tarball from PR42210.

Reviewers: thakis, hans, rengolin, sdesmalen

Reviewed By: sdesmalen

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365203 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-05 12:48:16 +00:00
James Henderson
1fa2d68de3 [docs][llvm-objcopy] Improve some wording.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365187 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-05 11:57:07 +00:00
Alex Brachet
54b24f6f26 [docs] [tools] Fix see also links
Summary: Changes "see also" links to use :manpage: instead of plain text or the form `name|name` which was being treated literally, not as a link.

Reviewers: jhenderson, rupprecht

Reviewed By: jhenderson

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365159 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-04 21:19:05 +00:00
Serge Guelton
2b94262f2a Document legacy pass manager extension points
Differential Revision: https://reviews.llvm.org/D64093

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365142 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-04 14:03:11 +00:00
James Henderson
583692c361 [docs][llvm-dwarfdump] Remove unnecessary reference to --show-children
The --show-children option description describes what it does, and
references the =<offset> parameter of section dump switches. I don't
think it needs to be explained again in the documentation of the
section dump switches too.

Reviewed by: JDevlieghere

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365115 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-04 08:49:04 +00:00
Alex Brachet
110647a2ad [docs] [NFC] Removed excess spacing
Summary: Removed excess new lines from documentations. As far as I can tell, it seems as though restructured text is agnostic to new lines, the use of new lines was inconsistent and had no effect on how the files were being displayed.

Reviewers: jhenderson, rupprecht, JDevlieghere

Reviewed By: jhenderson

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365105 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-04 04:41:06 +00:00
James Henderson
966519d69a [docs][llvm-objcopy] Write documentation for llvm-objcopy
This patch addresses https://bugs.llvm.org/show_bug.cgi?id=42183 by replacing
the stub markdown doc for llvm-objcopy with a full one describing the current
options available in llvm-objcopy.

Reviewed by: jakehehrlich, MaskRay

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365042 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-03 14:21:48 +00:00
Sven van Haastregt
fe4f8765dc Remove some autoconf references from docs and comments
The autoconf build system support has been removed a while ago, remove
some outdated references.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365013 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-03 09:57:59 +00:00
James Henderson
f6382c83d7 [docs][llvm-readelf] Delete old llvm-readelf.md
This was accidentally missed when committing r364800.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364918 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-02 13:11:34 +00:00
James Henderson
a1ebca4b3e [docs][llvm-readelf] Expand llvm-readelf documentation
Previously, the llvm-readelf documentation was essentially just a list
of differences to llvm-readobj. Since llvm-readelf is the more likely
goto tool for many people migrating to the LLVM toolchain, it seems like
it would be helpful to document all the switches in the llvm-readelf
document too. This change expands the options listed accordingly.
Additionally, they are unlikely to care what the differences are to
llvm-readobj, since they won't be familiar with the latter as there is
no GNU equivalent, so this change moves the "differences" section to
llvm-readobj's documentation.

Reviewed by: peter.smith

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364800 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-01 16:18:57 +00:00
Amara Emerson
1794725538 [LangRef] Clarify codegen expectations for intrinsics with fp/integer-only overloads.
This change is a result of discussions on list: "GlobalISel: Ambiguous intrinsic semantics problem"

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364610 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 23:33:05 +00:00
Yuanfang Chen
616dcd2a52 [llvm-objdump] Update the doc for --disassemble-functions.
Update the doc after llvm-svn: 364121 is landed.
With two more trivial fixes that are not related to
--disassemble-functions but still about llvm-objdump.

Reviewers: jhenderson, grimar, MaskRay, rupprecht, peter.smith

Reviewed by: jhenderson, MaskRay

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364573 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 18:39:34 +00:00
Johannes Doerfert
8a0fc5ba4f [Attr] Add "willreturn" function attribute
This patch introduces a new function attribute, willreturn, to indicate
that a call of this function will either exhibit undefined behavior or
comes back and continues execution at a point in the existing call stack
that includes the current invocation.

This attribute guarantees that the function does not have any endless
loops, endless recursion, or terminating functions like abort or exit.

Patch by Hideto Ueno (@uenoku)

Reviewers: jdoerfert

Subscribers: mehdi_amini, hiraditya, steven_wu, dexonsmith, lebedev.ri, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364555 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 15:51:40 +00:00
James Henderson
c87feb6e55 [docs][llvm-nm][llvm-objdump] Improve "See Also" section
The "See Also" section for llvm-nm didn't actually contain any links,
and the tools referred to didn't make much sense (referring to non-LLVM
tools, when we have equivalents, or tools that aren't really to do with
symbol dumping). llvm-objdump's didn't refer to llvm-readelf.

Reviewed by: grimar

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364552 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 15:18:15 +00:00
Hans Wennborg
a1a5ec67ec Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix"
We saw a 70% ThinLTO link time increase in Chromium for Android, see
crbug.com/978817. Sounds like more of PR42210.

> Recommit of D32530 with a few small changes:
>   - Stopped recursively walking through aggregates in
>     the verifier, so that we don't impose too much
>     overhead on large modules under LTO (see PR42210).
>   - Changed tests to match; the errors are slightly
>     different since they only report the array or
>     struct that actually contains a scalable vector,
>     rather than all aggregates which contain one in
>     a nested member.
>   - Corrected an older comment
>
> Reviewers: thakis, rengolin, sdesmalen
>
> Reviewed By: sdesmalen
>
> Differential Revision: https://reviews.llvm.org/D63321

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364543 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 13:55:02 +00:00
Djordje Todorovic
192906bcfd [DWARF] Handle the DW_OP_entry_value operand
Add the IR and the AsmPrinter parts for handling of the DW_OP_entry_values
DWARF operation.

([11/13] Introduce the debug entry values.)

Co-authored-by: Ananth Sowda <asowda@cisco.com>
Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
Co-authored-by: Ivan Baev <ibaev@cisco.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364542 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 13:52:34 +00:00
James Henderson
c10a5d752e [docs][tools] Add missing "program" tags to rst files
Sphinx allows for definitions of command-line options using
`.. option <name>` and references to those options via `:option:<name>`.
However, it looks like there is no scoping of these options by default,
meaning that links can end up pointing to incorrect documents. See for
example the llvm-mca document, which contains references to -o that,
prior to this patch, pointed to a different document. What's worse is
that these links appear to be non-deterministic in which one is picked
(on my machine, some references end up pointing to opt, whereas on the
live docs, they point to llvm-dwarfdump, for example).

The fix is to add the .. program <name> tag. This essentially namespaces
the options (definitions and references) to the named program, ensuring
that the links are kept correct.

Reviwed by: andreadb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364538 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 13:24:46 +00:00
Djordje Todorovic
3aa859711c [MachineFunction] Base support for call site info tracking
Add an attribute into the MachineFunction that tracks call site info.

([8/13] Introduce the debug entry values.)

Co-authored-by: Ananth Sowda <asowda@cisco.com>
Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
Co-authored-by: Ivan Baev <ibaev@cisco.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364506 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 07:48:06 +00:00
Djordje Todorovic
0bbea12560 [IR] Add DISuprogram and DIE for a func decl
A unique DISubprogram may be attached to a function declaration used for
call site debug info.

([6/13] Introduce the debug entry values.)

Co-authored-by: Ananth Sowda <asowda@cisco.com>
Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
Co-authored-by: Ivan Baev <ibaev@cisco.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364500 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 06:07:41 +00:00
Thomas Lively
78cbc90959 [WebAssembly] Implement tail calls and unify tablegen call classes
Summary:
Implements direct and indirect tail calls enabled by the 'tail-call'
feature in both DAG ISel and FastISel. Updates existing call tests and
adds new tests including a binary encoding test.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364445 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 16:17:15 +00:00
James Henderson
95a26fa9ab [docs][llvm-symbolizer] Improve llvm-symbolizer documentation
As detailed in https://bugs.llvm.org/show_bug.cgi?id=42253, there were a
number of issues in the llvm-symbolizer documentation. This patch fixes
them by:

 1. Adding [addresses...] to the synopsis, and matching the formatting
    of other tools.
 2. Rewriting the description to fix grammar issues and mention other
    usage options.
 3. Rewriting the examples to be easier to read.
 4. Re-ordering the options into alphabetical order.
 5. Improving the text of some of the option descriptions, and adding
    some examples to individual options.
 6. Splitting the Mach-O options into a separate section of the
    document.
 7. Standardizing on double dashes for long options throughout the file.
 8. Adding a reference to the llvm-addr2line document.

Reviewed by: mtrent, ikudrin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364410 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 11:42:03 +00:00
Djordje Todorovic
9eaa8818a5 [IR/DIVar] Add the flag for params that have unmodified value
Introduce the debug info flag that indicates that a parameter has unchanged
value throughout a function. This info will be used to emit the expressions
with DW_OP_entry_value.

([4/13] Introduce the debug entry values.)

Co-authored-by: Ananth Sowda <asowda@cisco.com>
Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
Co-authored-by: Ivan Baev <ibaev@cisco.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364406 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 11:19:26 +00:00
Simon Tatham
6b3b0e03f0 [ARM] Support inline assembler constraints for MVE.
"To" selects an odd-numbered GPR, and "Te" an even one. There are some
8.1-M instructions that have one too few bits in their register fields
and require registers of particular parity, without necessarily using
a consecutive even/odd pair.

Also, the constraint letter "t" should select an MVE q-register, when
MVE is present. This didn't need any source changes, but some extra
tests have been added.

Reviewers: dmgreen, samparker, SjoerdMeijer

Subscribers: javed.absar, eraman, kristof.beyls, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364331 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 16:49:32 +00:00
Kevin P. Neal
84a952a3e6 [FPEnv] A missing crucial step was undocumented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364328 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 16:09:39 +00:00
James Henderson
dc878ecbc8 [docs][llvm-readobj] Improve llvm-readobj documentation
There were a number of issues with the llvm-readobj documentation. The
following points were raised in https://bugs.llvm.org/show_bug.cgi?id=42255,
and have been fixed in this patch:

 1. The description section claimed "The tool and its output is
    primarily designed for use in FileCheck-based tests" which is not
    really the case any more.
 2. The documentation used single-dash long options for option names,
    but references in the help text to other options exclusively used
    double-dashes. Fixed by standardising on double-dashes for all
    long-form options.
 3. The majority of options available and in the help text were not
    present in the documentation. This patch adds them.
 4. Several aliases, both long and short, were missing, e.g. --relocs.

Additionally, this patch improves the documentation by:

 1. Splitting the options into categories based on the file format they
    are specific to.
 2. Updating the Exit Status section to correctly mention that errors
    lead to a non-zero exit code.
 3. Adding a See Also section referencing other similar LLVM tools.
 4. Improving/correcting some of the descriptions of options that did
    not quite match up with what llvm-readobj does.

Reviewed by: peter.smith, MaskRay, mtrent

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364306 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 13:12:38 +00:00
Nicolai Haehnle
f1a1a392db AMDGPU/MC: Add .amdgpu_lds directive
Summary:
The directive defines a symbol as an group/local memory (LDS) symbol.
LDS symbols behave similar to common symbols for the purposes of ELF,
using the processor-specific SHN_AMDGPU_LDS as section index.

It is the linker and/or runtime loader's job to "instantiate" LDS symbols
and resolve relocations that reference them.

It is not possible to initialize LDS memory (not even zero-initialize
as for .bss).

We want to be able to link together objects -- starting with relocatable
objects, but possible expanding to shared objects in the future -- that
access LDS memory in a flexible way.

LDS memory is in an address space that is entirely separate from the
address space that contains the program image (code and normal data),
so having program segments for it doesn't really make sense.

Furthermore, we want to be able to compile multiple kernels in a
compilation unit which have disjoint use of LDS memory. In that case,
we may want to place LDS symbols differently for different kernels
to save memory (LDS memory is very limited and physically private to
each kernel invocation), so we can't simply place LDS symbols in a
.lds section.

Hence this solution where LDS symbols always stay undefined.

Change-Id: I08cbc37a7c0c32f53f7b6123aa0afc91dbc1748f

Reviewers: arsenm, rampitec, t-tye, b-sumner, jsjodin

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, rupprecht, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364296 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 11:51:35 +00:00
James Henderson
9762cf4df3 [docs][llvm-cxxfilt] Write llvm-cxxfilt documentation
There was a stub for llvm-cxxfilt, but it didn't describe the options.
Additionally, it was in markdown, which was causing issues, so as
discussed in https://reviews.llvm.org/D63211, this change replaces the
existing stub with an RST file.

Reviewed by: MaskRay, mattd

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364287 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 10:36:15 +00:00
Hiroshi Inoue
a3dd071eeb [NFC] fix trivial typos in documents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364278 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 07:24:27 +00:00
James Henderson
c64c5eade8 [docs][llvm-nm] Add missing options to documentation
There were several options missing from the documentation. This patch
adds them as well as improving some wording and separating the Mach-O
only options into a separate section.

Fixes https://bugs.llvm.org/show_bug.cgi?id=42234.

Reviewed by: MaskRay

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364176 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 10:50:49 +00:00
James Henderson
097d54dca0 [docs][llvm-nm] Improve symbol code documentation
The existing symbol code documentation was very incomplete. This patch
adds the missing codes, and defines them based on the current code
behaviour.

Fixes https://bugs.llvm.org/show_bug.cgi?id=42231.

Reviewed by: rupprecht, mtrent, MaskRay

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364171 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 09:53:02 +00:00
Nico Weber
20428852cc PDB docs: Delete trailing whitespace, wrap to 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364131 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-22 11:23:01 +00:00
James Henderson
dcaffa78b4 [docs][llvm-objdump] Fix bad merge of docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364056 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-21 14:41:36 +00:00
James Henderson
b7bdff997f [binutils] Add response file option to help and docs
Many LLVM-based tools already support response files (i.e. files
containing a list of options, specified with '@'). This change simply
updates the documentation and help text for some of these tools to
include it. I haven't attempted to fix all tools, just a selection that
I am interested in.

I've taken the opportunity to add some tests for --help behaviour, where
they were missing. We could expand these tests, but I don't think that's
within scope of this patch.

This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and
https://bugs.llvm.org/show_bug.cgi?id=42236.

Reviewed by: grimar, MaskRay, jkorous

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364036 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-21 11:49:20 +00:00
James Henderson
467003480e [docs][llvm-objdump] Improve llvm-objdump documentation
The llvm-objdump document was missing many options, and there were also
some style issues with it. This patches fixes all but the first issue
listed in https://bugs.llvm.org/show_bug.cgi?id=42249 by:

    1. Adding missing options and commands.
    2. Standardising on double dashes for long-options throughout.
    3. Moving Mach-O specific options to a separate section.
    4. Removing options that don't exist or aren't relevant to
       llvm-objdump.

Reviewed by: MaskRay, mtrent, alexshap

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364019 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-21 10:12:53 +00:00
Thomas Preud'homme
4a675fb7cf [FileCheck] Stop qualifying expressions as numeric
Summary:
Stop referring to "numeric expression", using simply the term
"expression" instead. Likewise for numeric operation since operations
are only used in numeric expressions.

Reviewers: jhenderson, jdenny, probinson, arichardson

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363901 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-19 23:47:24 +00:00
Andrea Di Biagio
daec1e09d3 [llvm-mca][docs] clarify how the quality of the perf report is affected by the quality of the scheduling models.
Differential Revision: https://reviews.llvm.org/D63556


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363830 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-19 16:10:58 +00:00
Graham Hunter
3ec873e4ef [SVE][IR] Scalable Vector IR Type with pr42210 fix
Recommit of D32530 with a few small changes:
  - Stopped recursively walking through aggregates in
    the verifier, so that we don't impose too much
    overhead on large modules under LTO (see PR42210).
  - Changed tests to match; the errors are slightly
    different since they only report the array or
    struct that actually contains a scalable vector,
    rather than all aggregates which contain one in
    a nested member.
  - Corrected an older comment

Reviewers: thakis, rengolin, sdesmalen

Reviewed By: sdesmalen

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363658 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-18 10:11:56 +00:00
Jeremy Morse
d65677457c [DebugInfo][Docs] Document that prologue/epilogue variable location changes are ignored
This patch documents that LLVM does not describe all changes in variable
locations during the prologue and the epilogue. The debugger doesn't /
shouldn't step through that portion of the function anyway, and describing
every location through such stages would bloat location lists.

Perform some minor cleanup at the same time,
 * Fix an enumerated list
 * Document that dbg.declare intrinsics have their variable location recorded
   in a MachineFunction table, not with DBG_VALUE meta-insts
 * Adds frame-indexes to the list of things that can be operands to
   DBG_VALUEs.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363654 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-18 08:52:38 +00:00
Peter Collingbourne
f159a1182e hwasan: Add a tag_offset DWARF attribute to instrumented stack variables.
The goal is to improve hwasan's error reporting for stack use-after-return by
recording enough information to allow the specific variable that was accessed
to be identified based on the pointer's tag. Currently we record the PC and
lower bits of SP for each stack frame we create (which will eventually be
enough to derive the base tag used by the stack frame) but that's not enough
to determine the specific tag for each variable, which is the stack frame's
base tag XOR a value (the "tag offset") that is unique for each variable in
a function.

In IR, the tag offset is most naturally represented as part of a location
expression on the llvm.dbg.declare instruction. However, the presence of the
tag offset in the variable's actual location expression is likely to confuse
debuggers which won't know about tag offsets, and moreover the tag offset
is not required for a debugger to determine the location of the variable on
the stack, so at the DWARF level it is represented as an attribute so that
it will be ignored by debuggers that don't know about it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363635 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-17 23:39:41 +00:00
James Henderson
5900b63bf6 [docs][llvm-dwarfdump] Make the --show-parents and --show-children help text and docs more consistent and correct
The docs and help text for --show-parents and --show-children were a bit
inconsistent. The help text claimed they had an effect when "=<offset>"
was used, whereas the doc said it had an effect when "--find" or
"--name" were used. This change changes the doc to mention "=<offset>"
and removes this reference from the help text, to avoid having a very
long description in the help text (it still says "when selectively
printing entries").

Reviewed by: JDevlieghere, aprantl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363380 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-14 13:00:09 +00:00
Stanislav Mekhanoshin
50d6e67368 [AMDGPU] gfx10 documentation update. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363332 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-13 22:18:47 +00:00
Vedant Kumar
235358f255 [Coverage] Load code coverage data from archives
Support loading code coverage data from regular archives, thin archives,
and from MachO universal binaries which contain archives.

Testing: check-llvm, check-profile (with {A,UB}San enabled)

rdar://51538999

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363325 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-13 20:48:57 +00:00
Nikita Popov
2528c30938 [LangRef] Clarify poison semantics
I find the current documentation of poison somewhat confusing,
mainly because its use of "undefined behavior" doesn't seem to
align with our usual interpretation (of immediate UB). Especially
the sentence "any instruction that has a dependence on a poison
value has undefined behavior" is very confusing.

Clarify poison semantics by:

 * Replacing the introductory paragraph with the standard rationale
   for having poison values.
 * Spelling out that instructions depending on poison return poison.
 * Spelling out how we go from a poison value to immediate undefined
   behavior and give the two examples we currently use in ValueTracking.
 * Spelling out that side effects depending on poison are UB.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363320 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-13 19:45:36 +00:00
Jordan Rupprecht
708401a85b [docs] Fix TableGen/LangRef typos
This fixes:
 - `Pred` -> `Prep`
 - `IfDef` -> `Ifdef` (rst is case sensitive here)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363294 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-13 18:42:30 +00:00
James Henderson
5ce9ebd9ec [docs][llvm-symbolizer] Fix formatting issue with --functions
Reviewed by: rupprecht

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363266 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-13 13:58:44 +00:00
James Henderson
6528ff861f [docs][llvm-dwarfdump] Add missing options and behaviour to documentation
This fixes https://bugs.llvm.org/show_bug.cgi?id=42185.

llvm-dwarfdump's documentation was missing a number of options and other
behaviours. This change tries to fix up the documentation by adding
these missing items.

Reviewed by: JDevlieghere

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363264 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-13 13:53:16 +00:00
Sander de Smalen
cdca5bb4d5 Improve reduction intrinsics by overloading result value.
This patch uses the mechanism from D62995 to strengthen the
definitions of the reduction intrinsics by letting the scalar
result/accumulator type be overloaded from the vector element type.

For example:

  ; The LLVM LangRef specifies that the scalar result must equal the
  ; vector element type, but this is not checked/enforced by LLVM.
  declare i32 @llvm.experimental.vector.reduce.or.i32.v4i32(<4 x i32> %a)

This patch changes that into:

  declare i32 @llvm.experimental.vector.reduce.or.v4i32(<4 x i32> %a)

Which has the type-constraint more explicit and causes LLVM to check
the result type with the vector element type.

Reviewers: RKSimon, arsenm, rnk, greened, aemerson

Reviewed By: arsenm

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363240 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-13 09:37:38 +00:00
Shoaib Meenai
a5dd191d8d [llvm-lipo] Update llvm-lipo docs for -archs flag
The information for -archs flag is added to llvm-lipo.rst.

Patch by Anusha Basana <anusha.basana@gmail.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363182 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 17:37:01 +00:00
James Henderson
6db0247339 [docs][llvm-symbolizer] Fix typo and grammar error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363145 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-12 11:41:43 +00:00