Commit Graph

6759 Commits

Author SHA1 Message Date
Kostya Serebryany
05ceafb725 [libFuzzer] update the docs, document how to resume the merge
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317836 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09 21:32:02 +00:00
Dan Gohman
b5e0bec282 Add an @llvm.sideeffect intrinsic
This patch implements Chandler's idea [0] for supporting languages that
require support for infinite loops with side effects, such as Rust, providing
part of a solution to bug 965 [1].

Specifically, it adds an `llvm.sideeffect()` intrinsic, which has no actual
effect, but which appears to optimization passes to have obscure side effects,
such that they don't optimize away loops containing it. It also teaches
several optimization passes to ignore this intrinsic, so that it doesn't
significantly impact optimization in most cases.

As discussed on llvm-dev [2], this patch is the first of two major parts.
The second part, to change LLVM's semantics to have defined behavior
on infinite loops by default, with a function attribute for opting into
potential-undefined-behavior, will be implemented and posted for review in
a separate patch.

[0] http://lists.llvm.org/pipermail/llvm-dev/2015-July/088103.html
[1] https://bugs.llvm.org/show_bug.cgi?id=965
[2] http://lists.llvm.org/pipermail/llvm-dev/2017-October/118632.html

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317729 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 21:59:51 +00:00
Alexander Richardson
7c37aa1189 Add a -D flag to FileCheck to define variables
Summary:
This makes it very easy to test files that only differ in a constant
value somewhere in the test case.

Reviewers: jlebar, hfinkel, chandlerc, probinson

Reviewed By: probinson

Subscribers: probinson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317572 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 13:24:44 +00:00
Peter Smith
51bcf5f4a5 [docs][ARM] Add HowTo for cross compiling and testing compiler-rt builtins
This document contains information on how to cross-compile the compiler-rt
builtins library for several flavours of Arm target and how to test the
libraries using qemu.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317554 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 09:40:05 +00:00
Adrian Prantl
94bed7d968 Canonicalize spelling of long-form-options in dsymutil.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317490 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-06 16:52:05 +00:00
Sanjay Patel
00e900afdb [IR] redefine 'UnsafeAlgebra' / 'reassoc' fast-math-flags and add 'trans' fast-math-flag
As discussed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/107104.html
and again more recently:
http://lists.llvm.org/pipermail/llvm-dev/2017-October/118118.html

...this is a step in cleaning up our fast-math-flags implementation in IR to better match
the capabilities of both clang's user-visible flags and the backend's flags for SDNode.

As proposed in the above threads, we're replacing the 'UnsafeAlgebra' bit (which had the 
'umbrella' meaning that all flags are set) with a new bit that only applies to algebraic 
reassociation - 'AllowReassoc'.

We're also adding a bit to allow approximations for library functions called 'ApproxFunc' 
(this was initially proposed as 'libm' or similar).

...and we're out of bits. 7 bits ought to be enough for anyone, right? :) FWIW, I did 
look at getting this out of SubclassOptionalData via SubclassData (spacious 16-bits), 
but that's apparently already used for other purposes. Also, I don't think we can just 
add a field to FPMathOperator because Operator is not intended to be instantiated. 
We'll defer movement of FMF to another day.

We keep the 'fast' keyword. I thought about removing that, but seeing IR like this:
%f.fast = fadd reassoc nnan ninf nsz arcp contract afn float %op1, %op2
...made me think we want to keep the shortcut synonym.

Finally, this change is binary incompatible with existing IR as seen in the 
compatibility tests. This statement:
"Newer releases can ignore features from older releases, but they cannot miscompile 
them. For example, if nsw is ever replaced with something else, dropping it would be 
a valid way to upgrade the IR." 
( http://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility )
...provides the flexibility we want to make this change without requiring a new IR 
version. Ie, we're not loosening the FP strictness of existing IR. At worst, we will 
fail to optimize some previously 'fast' code because it's no longer recognized as 
'fast'. This should get fixed as we audit/squash all of the uses of 'isFast()'.

Note: an inter-dependent clang commit to use the new API name should closely follow 
commit.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317488 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-06 16:27:15 +00:00
Jonas Devlieghere
2b2534cd85 [docs] Update code block for compatibility with Sphinx 1.5.1
It is currently not possible to build the documentation with cmake and
the same version of Sphinx (1.5.1) used to generate the public facing
documentation on llvm.org. When code blocks cannot be parsed by
Pygments, it generates a warning which is treated as an error.

In addition to being annoying and confusing for developers, this
needlessly increases the bar for newcomers that want to get involved.

This patch removes the language specifier from the affected block. The
result is the same as when parsing fails: the block are not highlighted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317472 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-06 11:47:24 +00:00
Raphael Isemann
d64a599112 Fixed dead links in WritingAnLLVMPass.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317467 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-06 09:51:39 +00:00
Hiroshi Yamauchi
dd33e177dd Irreducible loop metadata for more accurate block frequency under PGO.
Summary:
Currently the block frequency analysis is an approximation for irreducible
loops.

The new irreducible loop metadata is used to annotate the irreducible loop
headers with their header weights based on the PGO profile (currently this is
approximated to be evenly weighted) and to help improve the accuracy of the
block frequency analysis for irreducible loops.

This patch is a basic support for this.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: mehdi_amini, llvm-commits, eraman

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317278 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02 22:26:51 +00:00
Shoaib Meenai
fbb50d9079 [tools] Add option to install binutils symlinks
The LLVM tools can be used as a replacement for binutils, in which case
it's convenient to create symlinks with the binutils names. Add support
for these symlinks in the build system. As with any other llvm tool
symlinks, the user can limit the installed symlinks by only adding the
desired ones to `LLVM_TOOLCHAIN_TOOLS`.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317272 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02 21:43:32 +00:00
Jonas Devlieghere
2f759d471a [dsymutil][doc] Improve wording in manpage and rename file.
- Improve wording
 - Rename llvm-dsymutil to dsymutil
 - Name -arch=<arch> argument

Differential revision: https://reviews.llvm.org/D39561

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02 18:44:54 +00:00
Jonas Devlieghere
9cca1f183a [dsymutil] Add a manpage for dsymutil
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317221 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02 17:12:34 +00:00
Yaxun Liu
a52756b2c9 [AMDGPU] Emit metadata for hidden arguments for kernel enqueue
Identifies kernels which performs device side kernel enqueues and emit
metadata for the associated hidden kernel arguments. Such kernels are
marked with calls-enqueue-kernel function attribute by
AMDGPUOpenCLEnqueueKernelLowering pass and later on
hidden kernel arguments metadata HiddenDefaultQueue and
HiddenCompletionAction are emitted for them.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316907 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30 14:30:28 +00:00
Vedant Kumar
beb047f3df [docs] Fix a small typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316682 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-26 17:58:05 +00:00
Sean Fertile
509132b368 Represent runtime preemption in the IR.
Currently we do not represent runtime preemption in the IR, which has several
drawbacks:

  1) The semantics of GlobalValues differ depending on the object file format
     you are targeting (as well as the relocation-model and -fPIE value).
  2) We have no way of disabling inlining of run time interposable functions,
     since in the IR we only know if a function is link-time interposable.
     Because of this llvm cannot support elf-interposition semantics.
  3) In LTO builds of executables we will have extra knowledge that a symbol
     resolved to a local definition and can't be preemptable, but have no way to
     propagate that knowledge through the compiler.

This patch adds preemptability specifiers to the IR with the following meaning:

dso_local --> means the compiler may assume the symbol will resolve to a
 definition within the current linkage unit and the symbol may be accessed
 directly even if the definition is not within this compilation unit.

dso_preemptable --> means that the compiler must assume the GlobalValue may be
replaced with a definition from outside the current linkage unit at runtime.

To ease transitioning dso_preemptable is treated as a 'default' in that
low-level codegen will still do the same checks it did previously to see if a
symbol should be accessed indirectly. Eventually when IR producers emit the
specifiers on all Globalvalues we can change dso_preemptable to mean 'always
access indirectly', and remove the current logic.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316668 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-26 15:00:26 +00:00
Aaron Ballman
b7f6ffb538 Added instructions for obtaining clang-tools-extra to the Getting Started page.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316468 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-24 17:28:39 +00:00
Bjorn Pettersson
7b97ca1b57 [LangRef] Update description of Constant Expressions
Summary:
When describing trunc/zext/sext/ptrtoint/inttoptr in the chapter
about Constant Expressions we now simply refer to the Instruction
Reference. As far as I know there are no difference when it comes
to the semantics and the argument constraints. The only difference
is that the syntax is slighly different for the constant expressions,
regarding the use of parenthesis in constant expressions.
Referring to the Instruction Reference is the same solution as
already used for several other operations, such as bitcast.

The main goal was to add information that vector types are allowed
also in trunc/zext/sext/ptrtoint/inttoptr constant expressions.
That was not explicitly mentioned earlier, and resulted in some
questions in the review of https://reviews.llvm.org/D38546

Reviewers: efriedma, majnemer

Reviewed By: efriedma

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316429 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-24 11:59:20 +00:00
Jan Korous
0c65800586 [docs] Code example fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316425 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-24 10:23:10 +00:00
Mitch Phillips
67f07003fe Updated 'Getting Started' to use valid git links (added trailing slashes)
Reviewers: pcc, asl, tonic

Reviewed By: pcc

Subscribers: llvm-commits, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316352 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-23 17:37:41 +00:00
Daniel Sanders
86274cd55d [globalisel] Add very brief docs summarizing the ISel part of the LLVMDev tutorial.
Also added links to the talks available.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316350 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-23 17:18:44 +00:00
Keith Wyss
4dea1f2710 [XRay] [docs] Document how to generate flamegraphs from xray traces.
Summary:
Updated the XRayExample docs with instructions for using the llvm-xray stacks
command.

Reviewers: dberris

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316192 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-19 22:35:09 +00:00
Konstantin Zhuravlyov
cb5868c4b8 AMDGPU/Docs: Fix unreadable characters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316171 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-19 17:12:55 +00:00
Tony Tye
0a09220c32 [AMDGPU] Corrections to memory model description.
- Add description on nontemporal support.
 - Correct OpenCL sequentially consistent and fence code sequences.
 - Minor test cleanup.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316131 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-18 22:16:55 +00:00
Konstantin Zhuravlyov
a05cf7b27d AMDGPU/Docs: Make target naming consistent
- R600 Arch: Use Radeon HD XXXX Series
  - GCN Arch: Use GFXX

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316100 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-18 17:59:20 +00:00
Konstantin Zhuravlyov
28cb7901b7 AMDGPU: Rename MaxFlatWorkgroupSize to MaxFlatWorkGroupSize for consistency
Differential Revision: https://reviews.llvm.org/D38957


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316097 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-18 17:31:09 +00:00
Matthew Simpson
9f219e8d89 Add !callees metadata
This patch adds a new kind of metadata that indicates the possible callees of
indirect calls.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315944 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-16 22:22:11 +00:00
Tony Tye
300ec0aaa2 Add base relative relocation record that can be used for the following case (OpenCL example):
static __global int Var = 0; 
__global int* Ptr[] = {&Var};
...

In this case Var is a non premptable symbol and so its address can be used as the value of Ptr, with a base relative relocation that will add the delta between the ELF address and the actual load address. Such relocations do not require a symbol.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315935 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-16 20:44:29 +00:00
Konstantin Zhuravlyov
755155fab9 AMDGPU: Add AMDGPU HSA Kernel Descriptor
- Update docs to match llvm coding style
  - Add missing FP16_OVFL bit for gfx9
  - Fix the size of the kernel descriptor in the docs

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315822 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-14 19:17:08 +00:00
Konstantin Zhuravlyov
5556d8485b AMDGPU: Bring HSA metadata on par with the specification
Differential Revision: https://reviews.llvm.org/D38753


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315821 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-14 19:03:51 +00:00
Jordan Rose
a17d20085d Revert "lit.py: Add new %{shared_output(LABEL)} substitution"
This reverts r315697 and my ill-fated attempts to fix it on Windows.
I'll try again when I get access to a Windows machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315793 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-14 04:01:27 +00:00
Matt Morehouse
b1b02b7e6c [llvm-demangle-fuzzer] Add a fuzz target for ItaniumDemangler.
Patch By: hctim

Reviewers: morehouse, bogner

Reviewed By: bogner

Subscribers: bogner, kcc, llvm-commits, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315716 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13 17:35:37 +00:00
Jordan Rose
e9bafbf370 lit.py: Add new %{shared_output(LABEL)} substitution
This refers to a temporary path that can be shared across all tests,
identified by a particular label. This can be used for things like
caches.

At the moment, the character set for the LABEL is limited to C
identifier characters, plus '-', '+', '=', and '.'. This is the same
set of characters currently allowed in REQUIRES clause identifiers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315697 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13 16:12:23 +00:00
Sjoerd Meijer
a0af046f39 [FileCheck] regexp doc update/fix
Minor doc update that the FileCheck matcher supports POSIX ERE.
It also fixes a minor issue in the regexp describing a variable
name: underscores are allowed too.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315679 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13 14:02:36 +00:00
Justin Bogner
18c35eb7c9 docs: Improve wording on building for fuzzing
The original sentence didn't really make sense.

Patch by Vedant Kumar. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315676 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13 06:29:09 +00:00
Justin Bogner
c88052663b docs: Improve the docs about llvm-isel-fuzzer on OSS Fuzz
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315651 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13 00:27:35 +00:00
Matt Morehouse
5cb6ac0fdb [llvm-isel-fuzzer] Use "--" as separator rather than '='.
Summary: OSS-Fuzz doesn't support '=' in filenames.

Reviewers: bogner, kcc

Reviewed By: kcc

Subscribers: javed.absar, hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315647 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13 00:18:32 +00:00
Justin Bogner
58658afbec Re-commit "llvm-isel-fuzzer: Handle a subset of backend flags in the exec name"
Here we add a secondary option parser to llvm-isel-fuzzer (and provide
it for use with other fuzzers). With this, you can copy the fuzzer to
a name like llvm-isel-fuzzer=aarch64-gisel for a fuzzer that fuzzer
AArch64 with GlobalISel enabled, or fuzzer=x86_64 to fuzz x86, with no
flags required. This should be useful for running these in OSS-Fuzz.

Note that this handrolls a subset of cl::opts to recognize, rather
than embedding a complete command parser for argv[0]. If we find we
really need the flexibility of handling arbitrary options at some
point we can rethink this.

This re-applies 315545 using "=" instead of ":" as a separator for
arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315557 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12 04:35:32 +00:00
Hans Wennborg
fba3ac1b76 Revert r315545 "llvm-isel-fuzzer: Handle a subset of backend flags in the executable name"
It broke some tests on Windows:

Failing Tests (4):
    LLVM :: tools/llvm-isel-fuzzer/execname-options.ll
    LLVM :: tools/llvm-isel-fuzzer/missing-triple.ll
    LLVM :: tools/llvm-isel-fuzzer/x86-empty-bc.ll
    LLVM :: tools/llvm-isel-fuzzer/x86-empty.ll

> llvm-isel-fuzzer: Handle a subset of backend flags in the executable name
>
> Here we add a secondary option parser to llvm-isel-fuzzer (and provide
> it for use with other fuzzers). With this, you can copy the fuzzer to
> a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer
> AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no
> flags required. This should be useful for running these in OSS-Fuzz.
>
> Note that this handrolls a subset of cl::opts to recognize, rather
> than embedding a complete command parser for argv[0]. If we find we
> really need the flexibility of handling arbitrary options at some
> point we can rethink this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315554 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12 03:32:09 +00:00
Justin Bogner
68b5d4b666 docs: Add some links to OSS Fuzz
I'd left a couple of stray links here in a previous commit rather than
writing a paragraph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315550 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12 02:28:26 +00:00
Justin Bogner
997df9e38f docs: Try to fix sphinx build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315546 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12 02:04:39 +00:00
Justin Bogner
58e4a84347 llvm-isel-fuzzer: Handle a subset of backend flags in the executable name
Here we add a secondary option parser to llvm-isel-fuzzer (and provide
it for use with other fuzzers). With this, you can copy the fuzzer to
a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer
AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no
flags required. This should be useful for running these in OSS-Fuzz.

Note that this handrolls a subset of cl::opts to recognize, rather
than embedding a complete command parser for argv[0]. If we find we
really need the flexibility of handling arbitrary options at some
point we can rethink this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315545 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12 01:57:49 +00:00
Justin Bogner
89b77ce2ca docs: Add some information about Fuzzing LLVM itself
This splits some content out of the libFuzzer docs and adds a fair
amount of detail about the fuzzers in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315544 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12 01:44:24 +00:00
Yaxun Liu
091c043b90 [AMDGPU] Lower enqueued blocks and generate runtime metadata
This patch adds a post-linking pass which replaces the function pointer of enqueued
block kernel with a global variable (runtime handle) and adds
runtime-handle attribute to the enqueued block kernel.

In LLVM CodeGen the runtime-handle metadata will be translated to
RuntimeHandle metadata in code object. Runtime allocates a global buffer
for each kernel with RuntimeHandel metadata and saves the kernel address
required for the AQL packet into the buffer. __enqueue_kernel function
in device library knows that the invoke function pointer in the block
literal is actually runtime handle and loads the kernel address from it
and puts it into AQL packet for dispatching.

This cannot be done in FE since FE cannot create a unique global variable
with external linkage across LLVM modules. The global variable with internal
linkage does not work since optimization passes will try to replace loads
of the global variable with its initialization value.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315352 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-10 19:39:48 +00:00
Adrian Prantl
eadc313c6a llvm-dwarfdump: Add an option to collect debug info quality metrics.
At the last LLVM dev meeting we had a debug info for optimized code
BoF session. In that session I presented some graphs that showed how
the quality of the debug info produced by LLVM changed over the last
couple of years. This is a cleaned up version of the patch I used to
collect the this data. It is implemented as an extension of
llvm-dwarfdump, adding a new --statistics option. The intended
use-case is to automatically run this on the debug info produced by,
e.g., our bots, to identify eyebrow-raising changes or regressions
introduced by new transformations that we could act on.

In the current form, two kinds of data are being collected:

- The number of variables that have a debug location versus the number
  of variables in total (this takes into account inlined instances of
  the same function, so if a variable is completely missing form only
  one instance it will be found).

- The PC range covered by variable location descriptions versus the PC
  range of all variables' containing lexical scopes.

The output format is versioned and extensible, so I'm looking forward
to both bug fixes and ideas for other data that would be interesting
to track.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315101 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-06 20:24:34 +00:00
Adrian Prantl
f4e8e0363a Add a manpage for llvm-dwarfdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314863 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-03 23:46:57 +00:00
Konstantin Zhuravlyov
eb47c09ba9 AMDGPU/Docs: Follow up on review feedback in https://reviews.llvm.org/D38387
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-03 21:18:03 +00:00
Konstantin Zhuravlyov
4b145dd117 AMDGPU: Add ELFOSABI_AMDGPU_MESA3D
Differential Revision: https://reviews.llvm.org/D38387


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314846 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-03 21:14:14 +00:00
Konstantin Zhuravlyov
7624630b81 AMDGPU: Add ELFOSABI_AMDGPU_PAL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314843 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-03 20:54:07 +00:00
Hans Wennborg
55a93de502 Docs: fix link to Debugger intrinsic functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314420 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-28 15:16:37 +00:00
Vedant Kumar
ab0b78f634 [docs] llvm-cov: Make docs for boolean options more consistent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314176 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-25 23:10:04 +00:00