1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

6866 Commits

Author SHA1 Message Date
Adrian Prantl
d11782d299 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

llvm-svn: 315101
2017-10-06 20:24:34 +00:00
Adrian Prantl
d7b3a5d1ff Add a manpage for llvm-dwarfdump.
llvm-svn: 314863
2017-10-03 23:46:57 +00:00
Konstantin Zhuravlyov
7ec1e6fa4f AMDGPU/Docs: Follow up on review feedback in https://reviews.llvm.org/D38387
llvm-svn: 314848
2017-10-03 21:18:03 +00:00
Konstantin Zhuravlyov
dd0f62bde0 AMDGPU: Add ELFOSABI_AMDGPU_MESA3D
Differential Revision: https://reviews.llvm.org/D38387

llvm-svn: 314846
2017-10-03 21:14:14 +00:00
Konstantin Zhuravlyov
faac723406 AMDGPU: Add ELFOSABI_AMDGPU_PAL
llvm-svn: 314843
2017-10-03 20:54:07 +00:00
Hans Wennborg
90f7334acf Docs: fix link to Debugger intrinsic functions
llvm-svn: 314420
2017-09-28 15:16:37 +00:00
Vedant Kumar
227a1e42db [docs] llvm-cov: Make docs for boolean options more consistent
llvm-svn: 314176
2017-09-25 23:10:04 +00:00
Quentin Colombet
ed9a033b66 [GlobalISel] Update the documentation and comment for G_[UN]MERGE_VALUES
In r296921, we added the G_[UN]MERGE_VALUES node, but did not update the
documentation. Fixing that.

NFC.

llvm-svn: 314168
2017-09-25 22:03:06 +00:00
Quentin Colombet
f124af2f5e [GlobalISel] Update the documentation for G_SEQUENCE
This instruction has been removed in r306120.

NFC.

llvm-svn: 314167
2017-09-25 22:03:05 +00:00
Quentin Colombet
2e2793f727 [GlobalISel] Update the documentation and comments for G_EXTRACT
In r297100, G_EXTRACT changed from a multiple results instruction to a
single result one. Update the documentation accordingly.

NFC.

llvm-svn: 314166
2017-09-25 22:03:01 +00:00
Ilya Biryukov
327dbdbacc Fixed broken links in docs.
Replaced references to `llvm.org/klaus` with `git.llvm.org/klaus`.

llvm-svn: 314028
2017-09-22 21:10:37 +00:00
Reid Kleckner
b408a0c51d Re-land r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare"
The fix is to avoid invalidating our insertion point in
replaceDbgDeclare:
     Builder.insertDeclare(NewAddress, DIVar, DIExpr, Loc, InsertBefore);
+    if (DII == InsertBefore)
+      InsertBefore = &*std::next(InsertBefore->getIterator());
     DII->eraseFromParent();

I had to write a unit tests for this instead of a lit test because the
use list order matters in order to trigger the bug.

The reduced C test case for this was:
  void useit(int*);
  static inline void inlineme() {
    int x[2];
    useit(x);
  }
  void f() {
    inlineme();
    inlineme();
  }

llvm-svn: 313905
2017-09-21 19:52:03 +00:00
Daniel Jasper
9eea6fd83b Revert r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare"
.. as well as the two subsequent changes r313826 and r313875.

This leads to segfaults in combination with ASAN. Will forward repro
instructions to the original author (rnk).

llvm-svn: 313876
2017-09-21 12:07:33 +00:00
Dave Lee
6d85dc7eb6 Remove references to response file argument in CommandLine.rst
Summary:
The documentation refers to a boolean that controls whether response files are
handled, but this is incorrect. Since r165535, response files are always
enabled.

Reviewers: compnerd, rafael

Reviewed By: compnerd

Subscribers: llvm-commits

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

llvm-svn: 313830
2017-09-20 22:41:34 +00:00
Reid Kleckner
d558b9268e [IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare
Summary:
This implements the design discussed on llvm-dev for better tracking of
variables that live in memory through optimizations:
  http://lists.llvm.org/pipermail/llvm-dev/2017-September/117222.html

This is tracked as PR34136

llvm.dbg.addr is intended to be produced and used in almost precisely
the same way as llvm.dbg.declare is today, with the exception that it is
control-dependent. That means that dbg.addr should always have a
position in the instruction stream, and it will allow passes that
optimize memory operations on local variables to insert llvm.dbg.value
calls to reflect deleted stores. See SourceLevelDebugging.rst for more
details.

The main drawback to generating DBG_VALUE machine instrs is that they
usually cause LLVM to emit a location list for DW_AT_location. The next
step will be to teach DwarfDebug.cpp how to recognize more DBG_VALUE
ranges as not needing a location list, and possibly start setting
DW_AT_start_offset for variables whose lifetimes begin mid-scope.

Reviewers: aprantl, dblaikie, probinson

Subscribers: eraman, hiraditya, llvm-commits

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

llvm-svn: 313825
2017-09-20 21:52:33 +00:00
Vedant Kumar
0000028223 [docs] llvm-cov: Document -show-instantiation-summary
llvm-svn: 313824
2017-09-20 21:52:09 +00:00
Vlad Tsyrklevich
c0e26bc806 Introduce the llvm-cfi-verify tool (resubmission of D37937).
Summary: Resubmission of D37937. Fixed i386 target building (conversion from std::size_t& to uint64_t& failed). Fixed documentation warning failure about docs/CFIVerify.rst not being in the tree.

Reviewers: vlad.tsyrklevich

Reviewed By: vlad.tsyrklevich

Patch by Mitch Phillips

Subscribers: sbc100, mgorny, pcc, llvm-commits, kcc

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

llvm-svn: 313809
2017-09-20 20:38:14 +00:00
Vlad Tsyrklevich
a7c52cebfb Revert "Introduce the llvm-cfi-verify tool (resubmission of D37937)."
This reverts commit r313798, it's causing buildbot failures.

llvm-svn: 313804
2017-09-20 19:46:02 +00:00
Vlad Tsyrklevich
af7b67d45c Introduce the llvm-cfi-verify tool (resubmission of D37937).
Summary: Resubmission of D37937. Fixed i386 target building (conversion from std::size_t& to uint64_t& failed). Fixed documentation warning failure about docs/CFIVerify.rst not being in the tree.

Reviewers: vlad.tsyrklevich

Reviewed By: vlad.tsyrklevich

Patch by Mitch Phillips

Subscribers: mgorny, pcc, llvm-commits, kcc

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

llvm-svn: 313798
2017-09-20 19:14:16 +00:00
Vedant Kumar
0bafc97fe2 [docs] Make a note of LLVM_BUILD_INSTRUMENTED_COVERAGE
llvm-svn: 313768
2017-09-20 17:16:00 +00:00
Vlad Tsyrklevich
5dac1a2164 Revert "Introduce the llvm-cfi-verify tool."
This reverts commit r313688, it caused build failures for
llvm-i686-linux-RA

llvm-svn: 313689
2017-09-19 22:36:32 +00:00
Vlad Tsyrklevich
e741e99a75 Introduce the llvm-cfi-verify tool.
Summary: Introduces the llvm-cfi-verify tool to llvm. Includes the design document (docs/CFIVerify.rst). Current implementation of the tool is simply a disassembler that identifies and prints the indirect control flow instructions.

Reviewers: vlad.tsyrklevich

Reviewed By: vlad.tsyrklevich

Patch by Mitch Phillips

Subscribers: llvm-commits, kcc, pcc, mgorny

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

llvm-svn: 313688
2017-09-19 22:33:09 +00:00
Tom Stellard
3d92537ff0 docs: Fix formatting in HowToReleaseLLVM
This is a follow up to r313608.

llvm-svn: 313609
2017-09-19 03:27:26 +00:00
Tom Stellard
a73200a428 docs: Add instructions for how to submit a merge request
Reviewers: hansw, hans

Reviewed By: hans

Subscribers: hans, llvm-commits

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

llvm-svn: 313608
2017-09-19 03:23:03 +00:00
Vedant Kumar
65c67f5133 [Coverage] Use gap regions to select better line exec counts
After clang started emitting deferred regions (r312818), llvm-cov has
had a hard time picking reasonable line execuction counts. There have
been one or two generic improvements in this area (e.g r310012), but
line counts can still report coverage for whitespace instead of code
(llvm.org/PR34612).

To fix the problem:

 * Introduce a new region kind so that frontends can explicitly label
   gap areas.

   This is done by changing the encoding of the columnEnd field of
   MappingRegion. This doesn't substantially increase binary size, and
   makes it easy to maintain backwards-compatibility.

 * Don't set the line count to a count from a gap area, unless the count
   comes from a wrapped segment.

 * Don't highlight gap areas as uncovered.

Fixes llvm.org/PR34612.

llvm-svn: 313597
2017-09-18 23:37:28 +00:00
Kostya Serebryany
d06dd441e8 [libFuzzer] one more trophy
llvm-svn: 313562
2017-09-18 20:48:35 +00:00
Dean Michael Berris
834a58b0df [XRay][tools] Support tail-call exits before we write them in the runtime
Summary:
This change adds support for explicit tail-exit records to be written by
the XRay runtime. This lets us differentiate the tail exit
records/events in the log, and allows us to treat those exit events
especially in the future. For now we allow printing those out in YAML
(and reading them in).

Reviewers: kpw, pelikan

Subscribers: llvm-commits

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

llvm-svn: 313514
2017-09-18 06:08:46 +00:00
Don Hinton
13c58ac2d4 [ORC][Kaleidoscope] Update ORCJit tutorial.
Summary: Fix a few typos and update names to match current source.

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

llvm-svn: 313473
2017-09-17 00:24:43 +00:00
Alexander Kornienko
0577e7411e Add a ReleaseNotes blurb for Execute.*Wait API change
... in r313155, r313156.

llvm-svn: 313356
2017-09-15 11:45:30 +00:00
Sanjoy Das
cb1c881c0d Fix a misleading phrase in the LangRef
Reviewers: hfinkel, dberlin

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 313170
2017-09-13 18:49:22 +00:00
Vlad Tsyrklevich
dc99911eb8 Fix broken links to the Itanium CXX ABI
llvm-svn: 312985
2017-09-12 00:19:11 +00:00
Mandeep Singh Grang
12350cd943 [docs] Add a note on iteration of unordered containers to coding standards
Summary: Beware of non-determinism due to ordering of pointers

Reviewers: dblaikie, dexonsmith

Reviewed By: dblaikie

Subscribers: llvm-commits

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

llvm-svn: 312667
2017-09-06 20:19:10 +00:00
Reid Kleckner
09bba7cd22 Fix RST syntax in LangRef for llvm.codeview.annotation intrinsic
llvm-svn: 312571
2017-09-05 20:26:25 +00:00
Reid Kleckner
a0dfc5a477 Add llvm.codeview.annotation to implement MSVC __annotation
Summary:
This intrinsic represents a label with a list of associated metadata
strings. It is modelled as reading and writing inaccessible memory so
that it won't be removed as dead code. I think the intention is that the
annotation strings should appear at most once in the debug info, so I
marked it noduplicate. We are allowed to inline code with annotations as
long as we strip the annotation, but that can be done later.

Reviewers: majnemer

Subscribers: eraman, llvm-commits, hiraditya

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

llvm-svn: 312569
2017-09-05 20:14:58 +00:00
Alex Bradbury
3afa781834 [Docs] Update CodingStandards to recommend range-based for loops
The CodingStandards section on avoiding the re-evaluation of end() hasn't been
updated since range-based for loops were adopted in the LLVM codebase. This
patch adds a very brief section that documents how range-based for loops
should be used wherever possible. It also moves example code in
CodingStandards to use range-based for loops and auto when appropriate.

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

llvm-svn: 312236
2017-08-31 12:34:20 +00:00
Sean Eveson
42bd8958bb [llvm-cov] Read in function names for filtering from a text file.
Summary: Add a -name-whitelist option, which behaves in the same way as -name, but it reads in multiple function names from the given input file(s).

Reviewers: vsk

Reviewed By: vsk

Subscribers: llvm-commits

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

llvm-svn: 312227
2017-08-31 09:11:31 +00:00
Hans Wennborg
d371275f07 docs: remove dead doxygen tarball link
llvm-svn: 312142
2017-08-30 17:40:28 +00:00
Reid Kleckner
1b156543dd [cmake] Stop putting the revision info in LLVM_VERSION_STRING
Summary:
This reduces the number of build actions after a no-op commit from
thousands to about six, which should be acceptable. If six actions is
still too many, developers can disable the LLVM_APPEND_VC_REV cmake
option.

llvm-config.h is a widely included header that should rarely change.
Before this patch, it would change after every re-configure. Very few
users of llvm-config.h need to know the precise version, and those that
do can migrate to incorporating LLVM_REVISION as provided by
llvm/Support/VCSRevision.h.

This should bring LLVM back to the behavior that it had before r306858
from June 30 2017. Most LLVM tools will now print a version string like
"6.0.0svn" instead of "6.0.0-git-c40c2a23de4".

Fixes PR34308

Reviewers: pcc, rafael, hans

Subscribers: mgorny, llvm-commits

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

llvm-svn: 312043
2017-08-29 21:44:21 +00:00
Kostya Kortchinsky
915ca0c4ee [docs] Fix Scudo documentation error
Summary: No Pygments lexer found for "none".

Reviewers: flowerhack

Reviewed By: flowerhack

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

llvm-svn: 312027
2017-08-29 19:54:19 +00:00
Kostya Kortchinsky
2454f6f789 Update Scudo allocator documentation.
Summary:
QuarantineSizeMb is deprecated, and QuarantineChunksUpToSize has been added as a new tunable option.


Reviewers: cryptoad

Reviewed By: cryptoad

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

llvm-svn: 312025
2017-08-29 19:42:50 +00:00
Lang Hames
16729fe8c1 [docs] In the CMake primer, correct the description of the ARGV/ARGN variables.
ARGN is the sublist of unnamed arguments, not the count of the arguments.

llvm-svn: 311632
2017-08-24 05:38:39 +00:00
Wei Ding
cb5ec6af94 Add ‘llvm.experimental.constrained.fma‘ Intrinsic.
Differential Revision: http://reviews.llvm.org/D36335

llvm-svn: 311629
2017-08-24 04:18:24 +00:00
Pete Couperus
17a44cf206 Test commit.
Fix instrinsic -> intrinsic typo.

llvm-svn: 311598
2017-08-23 20:58:22 +00:00
Erich Keane
efd71540c2 Emit section information for extern variables
Update IR generated to retain section information for external declarations. 
This is related to https://reviews.llvm.org/D36487

Patch By: eandrews
Differential Revision: https://reviews.llvm.org/D36712

llvm-svn: 311459
2017-08-22 15:30:43 +00:00
Brian Gesiak
171bd76e17 [Lexicon] Add "GEP"
Summary:
`getelementptr` is frequently abbreviated as "GEP", often in source files that
do not ever reference the full name of the instruction. Add it to the Lexicon,
in case readers go to look for what it means there.

Test plan:
1. `ninja sphinx`
2. Confirm that the rendered docs HTML contains the new "GEP" entry

llvm-svn: 311168
2017-08-18 15:35:53 +00:00
Alex Bradbury
305bbba6b4 Refine report_fatal_error guidance after post-commit review
Use text suggested by Justin Bogner in post-commit review of r311146 
<http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170814/479898.html>, 
which makes it clear that report_fatal_error shouldn't be used when there is a 
practicable alternative. Also make this clearer in CodingStandards.

llvm-svn: 311147
2017-08-18 06:45:34 +00:00
Alex Bradbury
7e1ad5a152 Give guidance on report_fatal_error in CodingStandards.rst and ProgrammersManual.rst
The current ProgrammersManual.rst document has a lot of well-written 
documentation on error handling thanks to @lhames. It suggests errors can be 
split cleanly into "programmatic" and "recoverable" errors. However, the 
reality in current LLVM seems to be there are a number of cases where a 
non-programmatic error is not easily recoverable. Therefore, add a note to 
indicate the existence of report_fatal_error for these cases. I've also added 
a reminder to CodingStandards.rst in the section on assertions, to indicate 
that llvm_unreachable and assertions should not be relied upon to report 
errors triggered by user input.

The ProgrammersManual is also silent on the use of LLVMContext::diagnose, 
which is used in BPF+WebAssembly+AMDGPU to report some errors during 
instruction selection. I don't address that in this patch, as it's not quite 
clear how to fit in to the current error handling story

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

llvm-svn: 311146
2017-08-18 05:29:21 +00:00
Lang Hames
a7916db1dd [docs] Tweak phrasing of the varargs explanation in the command section of the
CMake primer.

This moves the introduction of the ARGV/ARGN variables up to immmediately follow
the introduction of the concept of variable argument functions, and explicitly
connects this concept to C varargs functions.

llvm-svn: 311113
2017-08-17 18:21:53 +00:00
Lang Hames
dd0cce70a7 [docs] Fix typo and tweak wording of special variable handling in CMake primer.
llvm-svn: 311112
2017-08-17 18:00:28 +00:00
Quentin Colombet
862e639dc6 Reapply "[GlobalISel] Remove the GISelAccessor API."
This reverts commit r310425, thus reapplying r310335 with a fix for link
issue of the AArch64 unittests on Linux bots when BUILD_SHARED_LIBS is ON.

Original commit message:
[GlobalISel] Remove the GISelAccessor API.

Its sole purpose was to avoid spreading around ifdefs related to
building global-isel. Since r309990, GlobalISel is not optional anymore,
thus, we can get rid of this mechanism all together.

NFC.

----
The fix for the link issue consists in adding the GlobalISel library in
the list of dependencies for the AArch64 unittests. This dependency
comes from the use of AArch64Subtarget that needs to know how
to destruct the GISel related APIs when being detroyed.

Thanks to Bill Seurer and Ahmed Bougacha for helping me reproducing and
understand the problem.

llvm-svn: 310969
2017-08-15 22:31:51 +00:00
Tony Tye
f0d2249fbf Update AMDGPUUsage.rst documentation:
1. Correct description of the kernel initial state for FLAT_SCRATCH_INIT.
    2. Add link to GFX9 architecture documentation.
    3. Update product names.
    4. Rename note record from NT_AMD_AMDGPU_METADATA to NT_AMD_AMDGPU_HSA_METADATA and move description to the AMDHSA coding convention section.
    5. Minor typo corrections.

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

llvm-svn: 310954
2017-08-15 20:47:41 +00:00
Lang Hames
5af67ab313 [ORC][Kaleidoscope] Update Chapter 1 of BuildingAJIT to incorporate recent ORC
API changes.

llvm-svn: 310947
2017-08-15 19:20:10 +00:00
Steven Wu
ef0d7d04c6 [Doc] Update LangRef for new Module Flag Behavior
Summary:
Add the documentation for the new module flag behavior. The new
ModFlagBehavior is added in r303590.

Reviewers: tejohnson

Reviewed By: tejohnson

Subscribers: llvm-commits

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

llvm-svn: 310926
2017-08-15 16:16:33 +00:00
Andrew Kaylor
76e7a73bbb Add strictfp attribute to prevent unwanted optimizations of libm calls
Differential Revision: https://reviews.llvm.org/D34163

llvm-svn: 310885
2017-08-14 21:15:13 +00:00
Sean Eveson
e2fe4189b2 [llvm-cov] Add an option which maps the location of source directories on another machine to your local copies
Summary:
This patch adds the -path-equivalence option (example: llvm-cov show -path-equivalence=/origin/path,/local/path) which maps the source code path from one machine to another when using `llvm-cov show`. This is similar to the -filename-equivalence option, but doesn't require you to specify all the source files on the command line.

This allows you to generate the coverage data on one machine (e.g. in a CI system), and then use llvm-cov on another machine where you have the same code base on a different path.

Reviewers: vsk

Reviewed By: vsk

Subscribers: llvm-commits

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

llvm-svn: 310827
2017-08-14 10:20:12 +00:00
Sylvestre Ledru
cf9dd4dfe6 Fix some minor typos in the llvm XRay exemple
llvm-svn: 310777
2017-08-12 15:08:11 +00:00
Kostya Serebryany
95f9246136 [libFuzzer] recommend Clang Coverage for coverage visualization
llvm-svn: 310751
2017-08-11 20:32:47 +00:00
Zachary Turner
b24836fd63 Add documentation for llvm-pdbutil.
llvm-svn: 310744
2017-08-11 19:00:22 +00:00
George Karpenkov
4e0f1c7821 Update libFuzzer documentation for -fsanitize=fuzzer-no-link flag
Differential Revision: https://reviews.llvm.org/D36602

llvm-svn: 310734
2017-08-11 17:23:45 +00:00
Craig Topper
2d53908029 [DebugCounter] Move the semicolon out of the DEBUG_COUNTER macro and require it to be placed at the end of each use.
This make it consistent with STATISTIC which it will often appears near.

While there move one DEBUG_COUNTER instance out of an anonymous namespace. It's already declaring a static variable so the namespace is unnecessary.

llvm-svn: 310637
2017-08-10 17:48:11 +00:00
Matthias Braun
6b7fa15898 LangRef: Fix/improve cmpxchg wording
llvm-svn: 310533
2017-08-09 22:22:04 +00:00
Craig Topper
a67e2568a1 [Docs] Remove a stray period from a code example in the Programmer's Manual.
llvm-svn: 310520
2017-08-09 20:55:33 +00:00
Quentin Colombet
3f63039f98 Revert "[GlobalISel] Remove the GISelAccessor API."
This reverts commit r310115.

It causes a linker failure for the one of the unittests of AArch64 on one
of the linux bot:
http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/3429

: && /home/fedora/gcc/install/gcc-7.1.0/bin/g++   -fPIC
-fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
-ffunction-sections -fdata-sections -O2
-L/home/fedora/gcc/install/gcc-7.1.0/lib64 -Wl,-allow-shlib-undefined
-Wl,-O3 -Wl,--gc-sections
unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/InstSizes.cpp.o  -o
unittests/Target/AArch64/AArch64Tests
lib/libLLVMAArch64CodeGen.so.6.0.0svn lib/libLLVMAArch64Desc.so.6.0.0svn
lib/libLLVMAArch64Info.so.6.0.0svn lib/libLLVMCodeGen.so.6.0.0svn
lib/libLLVMCore.so.6.0.0svn lib/libLLVMMC.so.6.0.0svn
lib/libLLVMMIRParser.so.6.0.0svn lib/libLLVMSelectionDAG.so.6.0.0svn
lib/libLLVMTarget.so.6.0.0svn lib/libLLVMSupport.so.6.0.0svn -lpthread
lib/libgtest_main.so.6.0.0svn lib/libgtest.so.6.0.0svn -lpthread
-Wl,-rpath,/home/buildbots/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib
&& :
unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/InstSizes.cpp.o:(.toc+0x0):
undefined reference to `vtable for llvm::LegalizerInfo'
unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/InstSizes.cpp.o:(.toc+0x8):
undefined reference to `vtable for llvm::RegisterBankInfo'

The particularity of this bot is that it is built with
BUILD_SHARED_LIBS=ON

However, I was not able to reproduce the problem so far.
Reverting to unblock the bot.

llvm-svn: 310425
2017-08-08 22:22:30 +00:00
Konstantin Zhuravlyov
d11811f3e7 AMDGPU: Also remove SI from docs
Differential Revision: https://reviews.llvm.org/D36424

llvm-svn: 310335
2017-08-08 04:28:31 +00:00
Quentin Colombet
0a7c56803e [GlobalISel] Remove the GISelAccessor API.
Its sole purpose was to avoid spreading around ifdefs related to
building global-isel. Since r309990, GlobalISel is not optional anymore,
thus, we can get rid of this mechanism all together.

NFC.

llvm-svn: 310115
2017-08-04 20:15:46 +00:00
George Karpenkov
fc2861a8a6 [libFuzzer tests] Only enable libFuzzer tests if
-DLIBFUZZER_ENABLE_TESTS=ON is set.

llvm-svn: 310100
2017-08-04 19:29:16 +00:00
George Karpenkov
3dd8ddb890 Port libFuzzer tests to LIT. Do not require two-stage build for check-fuzzer.
This revision ports all libFuzzer tests apart from the unittest to LIT.
The advantages of doing so include:

 - Tests being self-contained
 - Much easier debugging of a single test
 - No need for using a two-stage compilation

The unit-test is still compiled using CMake, but it does not need a
freshly built compiler.

NOTE: The previous two-stage bot configuration will NOT work, as in the
second stage build LLVM_USE_SANITIZER is set, which disables ASAN from
being built.
Thus bots will be reconfigured in the next few commits.

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

llvm-svn: 310075
2017-08-04 17:19:45 +00:00
Vedant Kumar
869b6676ef [llvm-cov] Respect the value of the -show-instantiations option
Make `-show-instantiations=false` actually skip displaying instantiation
sub-views, instead of simply ignoring the option.

llvm-svn: 309903
2017-08-02 23:35:24 +00:00
Keith Wyss
a539c3fdf8 Xray docs with description of Flight Data Recorder binary format.
Summary:
Adding a new restructuredText file to document the trace format produced with
an FDR mode handler and read by llvm-xray toolset.

Fixed two problems in the documentation from differential review. One bad table
and a missing link in the toc.

Original commit was e97c5836a77db803fe53319c53f3bf8e8b26d2b7.

Reviewers: dberris, pelikan

Subscribers: llvm-commits

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

llvm-svn: 309891
2017-08-02 21:47:27 +00:00
Keith Wyss
3bb54dfa94 Revert "Xray docs with description of Flight Data Recorder binary format."
This reverts commit 3462b8ad41a840fd54dbbd0d3f2a514c5ad6f656.

The docs-llvm-html target failed.

llvm-svn: 309842
2017-08-02 17:36:52 +00:00
Keith Wyss
96ce0e2323 Xray docs with description of Flight Data Recorder binary format.
Summary:
Adding a new restructuredText file to document the trace format produced with
an FDR mode handler and read by llvm-xray toolset.

Reviewers: dberris, pelikan

Subscribers: llvm-commits

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

llvm-svn: 309836
2017-08-02 17:27:20 +00:00
Vedant Kumar
95aaeaf3f0 [llvm-cov] Allow specifying distinct architectures for each loaded binary
The coverage tool needs to know which slice to look at when it's handed
a universal binary. Some projects need to look at aggregate coverage
reports for a variety of slices in different binaries: this patch adds
support for these kinds of projects to llvm-cov.

rdar://problem/33579007

llvm-svn: 309747
2017-08-01 21:23:26 +00:00
Sumanth Gundapaneni
02c3eccc44 Add documentation for the attribute "no-jump-tables"
llvm-svn: 309445
2017-07-28 22:26:22 +00:00
Adrian Prantl
1f559c1eb6 Reword sentence in LangRef
llvm-svn: 309431
2017-07-28 20:44:29 +00:00
Adrian Prantl
c83c29a7b7 Remove the obsolete offset parameter from @llvm.dbg.value
There is no situation where this rarely-used argument cannot be
substituted with a DIExpression and removing it allows us to simplify
the DWARF backend. Note that this patch does not yet remove any of
the newly dead code.

rdar://problem/33580047
Differential Revision: https://reviews.llvm.org/D35951

llvm-svn: 309426
2017-07-28 20:21:02 +00:00
Nuno Lopes
ab0c09f7c6 [docs] change a few code-blocks to llvm from text
llvm-svn: 309117
2017-07-26 14:11:23 +00:00
Stephen Hines
a04cd57886 [docs] Fix a typo: iteratation -> iteration
Reviewers: dgross

Reviewed By: dgross

Subscribers: dgross, llvm-commits

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

llvm-svn: 308994
2017-07-25 17:52:55 +00:00
Kostya Serebryany
a1f64823bf [libFuzzer] enable reduce_inputs=1 by default (seems to be a big win usually)
llvm-svn: 308541
2017-07-19 22:10:30 +00:00
Joel Jones
407a00e12b [docs] Document how to debug instruction scheduling model generation
Describe:

+ Exact tablegen command and how to get it
+ tablegen command debug option for subtarget generation
+ Use of schedcover.py on the debug output to determine coverage

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

llvm-svn: 308476
2017-07-19 14:10:42 +00:00
Hans Wennborg
5f3fdb3f16 Clear release notes for 6.0.0
llvm-svn: 308474
2017-07-19 14:09:16 +00:00
Hans Wennborg
e845d29c41 Update trunk version to 6.0.0svn
llvm-svn: 308442
2017-07-19 12:19:01 +00:00
Hiroshi Inoue
7c30291c1b fix typos in a document; NFC
llvm-svn: 308331
2017-07-18 17:52:47 +00:00
Nuno Lopes
2f890dd021 [docs] AliasAnalysis: clarify that PartialAlias doesn't enforce
objects to start at the same address

As discussed on the ML, there's consensus that this is what the implementations
do and it seems sensible.

llvm-svn: 308090
2017-07-15 09:09:24 +00:00
George Karpenkov
800a42cc58 [lit] add a -vv option to echo all executed commands.
Debugging LIT scripts can be rather painful, as LIT directly does not
specify which line has failed.
Rather, FileCheck is expected to report the failing location, but it can
be often ambiguous if multiple commands are tested against the same
prefix.  This change adds a -vv option, which echoes all output.
Then detecting the error becomes straightforward: last printed line is
the failing one.

Of course, it could be desired to try to get failing line number
directly from bash, but it involves excessive hacks on older bash
versions (cf.
https://stackoverflow.com/questions/24398691/how-to-get-the-real-line-number-of-a-failing-bash-command)

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

llvm-svn: 307938
2017-07-13 19:26:27 +00:00
Daniel Neilson
84653da20b Add element atomic memset intrinsic
Summary: Continuing the work from https://reviews.llvm.org/D33240, this change introduces an element unordered-atomic memset intrinsic. This intrinsic is essentially memset with the implementation requirement that all stores used for the assignment are done with unordered-atomic stores of a given element size.

Reviewers: eli.friedman, reames, mkazantsev, skatkov

Reviewed By: reames

Subscribers: jfb, dschuff, sbc100, jgravelle-google, aheejin, efriedma, llvm-commits

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

llvm-svn: 307854
2017-07-12 21:57:23 +00:00
Daniel Neilson
5294f8b585 Add element atomic memmove intrinsic
Summary: Continuing the work from https://reviews.llvm.org/D33240, this change introduces an element unordered-atomic memmove intrinsic. This intrinsic is essentially memmove with the implementation requirement that all loads/stores used for the copy are done with unordered-atomic loads/stores of a given element size.

Reviewers: eli.friedman, reames, mkazantsev, skatkov

Reviewed By: reames

Subscribers: llvm-commits

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

llvm-svn: 307796
2017-07-12 15:25:26 +00:00
Hiroshi Inoue
ea517d8a54 fix typo in document; NFC
llvm-svn: 307775
2017-07-12 12:16:22 +00:00
Konstantin Zhuravlyov
d382d6f3fc Enhance synchscope representation
OpenCL 2.0 introduces the notion of memory scopes in atomic operations to
  global and local memory. These scopes restrict how synchronization is
  achieved, which can result in improved performance.

  This change extends existing notion of synchronization scopes in LLVM to
  support arbitrary scopes expressed as target-specific strings, in addition to
  the already defined scopes (single thread, system).

  The LLVM IR and MIR syntax for expressing synchronization scopes has changed
  to use *syncscope("<scope>")*, where <scope> can be "singlethread" (this
  replaces *singlethread* keyword), or a target-specific name. As before, if
  the scope is not specified, it defaults to CrossThread/System scope.

  Implementation details:
    - Mapping from synchronization scope name/string to synchronization scope id
      is stored in LLVM context;
    - CrossThread/System and SingleThread scopes are pre-defined to efficiently
      check for known scopes without comparing strings;
    - Synchronization scope names are stored in SYNC_SCOPE_NAMES_BLOCK in
      the bitcode.

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

llvm-svn: 307722
2017-07-11 22:23:00 +00:00
Xinliang David Li
db38bdb5c8 [ProfileData] Add new option to dump topn hottest functions
Differential Revision: http://reviews.llvm.org/D35155

llvm-svn: 307702
2017-07-11 20:30:43 +00:00
Vedant Kumar
5521d918cc [llvm-cov] Add a cl::opt to control the number of threads
When an output directory is specified, llvm-cov spawns some threads to
speed up the process of writing out file reports. Add an option which
allows users to control how many threads llvm-cov uses.

A CommandGuide.rst update + test is included.

llvm-svn: 307609
2017-07-11 01:23:29 +00:00
George Karpenkov
e195617dcf [docs] Remove obsolete section in CMake documentation.
Differential Revision: https://reviews.llvm.org/D35023

llvm-svn: 307568
2017-07-10 18:56:51 +00:00
Mandeep Singh Grang
a55cfd9a66 [Docs] Updating CMake docs to include LLVM_REVERSE_ITERATION
Reviewers: beanz, mehdi_amini

Reviewed By: beanz

Subscribers: mgorny, llvm-commits

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

llvm-svn: 307560
2017-07-10 17:37:36 +00:00
Kirill Bobyrev
69173e21c2 [docs] NFC: Fix links in the tutorial
r274441 introduced Chapter 10 of "Implementing a Language with LLVM" tutorial,
which caused all files in the tutorial to start using two digit numbering. But
many links were not changed and therefore appear to be broken. This patch
addresses described issue.

As a result, following command does not produce any output anymore:

$ grep -nR '<LangImpl[0-9].html>' ./docs/tutorial/

llvm-svn: 307525
2017-07-10 09:07:23 +00:00
Tony Tye
2e2fda4b55 Correct GFX9 processor names.
Differential Revision: https://reviews.llvm.org/D33736

llvm-svn: 307353
2017-07-07 03:10:01 +00:00
George Karpenkov
e55b0ad210 [lit] Modify LIT to accept environment variable LIT_FILTER to select tests.
This is especially useful when lit is invoked indirectly by the build
system, and additional arguments can not be easily specified.

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

llvm-svn: 307339
2017-07-07 00:22:11 +00:00
Chris Lattner
13abdf71eb remove an unused empty file.
llvm-svn: 307299
2017-07-06 19:06:13 +00:00
Ilya Biryukov
839d6a9724 Made a script to build docker images easier to use.
Summary:
- Removed double indirection via command-line args (i.e. two `--`
  options of `build_docker_image.sh`).
- Added a comment on how to build 2-stage clang install into the
  `build_docker_image.sh`, it used to be only in the `docs/Docker.rst`.

Reviewers: klimek, mehdi_amini

Reviewed By: klimek

Subscribers: llvm-commits

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

llvm-svn: 307256
2017-07-06 12:46:51 +00:00
Galina Kistanova
4951065701 Added more info on silent master to the doc.
llvm-svn: 307200
2017-07-05 20:45:44 +00:00
Hiroshi Inoue
1032df3c54 fix trivial typos in documents; NFC
llvm-svn: 306975
2017-07-02 12:44:27 +00:00
Rafael Espindola
444f6a8d61 Completely disable git/svn version checking if not needed.
Working with git on a branch I find it really annoying that committing
a change causes ninja to think that stuff needs to be rebuilt.

With this change at least nothing in llvm needs to be rebuild when
something is committed.

llvm-svn: 306858
2017-06-30 18:48:33 +00:00
Ilya Biryukov
803ac1b1d6 Fixed misplaced table border in the docs.
llvm-svn: 306811
2017-06-30 09:47:17 +00:00
Ilya Biryukov
dd70425800 Added Dockerfiles to build clang from sources.
Reviewers: klimek, chandlerc, mehdi_amini

Reviewed By: klimek, mehdi_amini

Subscribers: mehdi_amini, jlebar, llvm-commits

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

llvm-svn: 306810
2017-06-30 09:46:45 +00:00
Chandler Carruth
cd49bfab29 Remove the BBVectorize pass.
It served us well, helped kick-start much of the vectorization efforts
in LLVM, etc. Its time has come and past. Back in 2014:
http://lists.llvm.org/pipermail/llvm-dev/2014-November/079091.html

Time to actually let go and move forward. =]

I've updated the release notes both about the removal and the
deprecation of the corresponding C API.

llvm-svn: 306797
2017-06-30 07:09:08 +00:00
Eric Christopher
1e0ffcd548 Add a C API section to the release notes.
llvm-svn: 306777
2017-06-30 01:17:45 +00:00
Sam Clegg
8c3cc297fe llvm-nm: Add support for symbol demangling (-C/--demangle)
Differential Revision: https://reviews.llvm.org/D34668

llvm-svn: 306718
2017-06-29 18:29:05 +00:00
Sylvestre Ledru
ae4d64b957 fix various typos
llvm-svn: 306262
2017-06-26 02:45:39 +00:00
Tanya Lattner
5dedc65949 Remove test commit change.
llvm-svn: 306223
2017-06-24 20:13:32 +00:00
Tanya Lattner
4a41ac67f5 test commit
llvm-svn: 306222
2017-06-24 20:08:28 +00:00
Ekaterina Vaartis
5420f7d5f2 [docs] As of binutils 2.21.51.0.2, ld.bfd supports plugins too, represent this in docs
PR#32760

llvm-svn: 306102
2017-06-23 13:54:10 +00:00
whitequark
539780b2eb Define behavior of "stack-probe-size" attribute when inlining.
Also document the attribute, since "probe-stack" already is.

Reviewed By: majnemer

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

llvm-svn: 306069
2017-06-22 23:22:36 +00:00
whitequark
478afe00d6 Add a "probe-stack" attribute
This attribute is used to ensure the guard page is triggered on stack
overflow. Stack frames larger than the guard page size will generate
a call to __probestack to touch each page so the guard page won't
be skipped.

Reviewed By: majnemer

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

llvm-svn: 305939
2017-06-21 18:46:50 +00:00
David Blaikie
8c5d5d74a3 [Doc] Fix getelementptr description about arguments
Section "Arguments" of `getelementptr` [1] says the first argument is a
type, the second argument is a pointer or a vector of pointers, and is
the base address to start from. Update `getelementptr` FAQ [2]
accordingly, based on discussion with David on the mailing list [3].

[1] http://llvm.org/docs/LangRef.html#getelementptr-instruction
[2] http://llvm.org/docs/GetElementPtr.html
[3] http://lists.llvm.org/pipermail/llvm-dev/2017-June/114294.html

Patch by Wei-Ren Chen!

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

llvm-svn: 305662
2017-06-19 05:34:21 +00:00
Daniel Neilson
88ff739fcf [Atomics] Rename and change prototype for atomic memcpy intrinsic
Summary:

Background: http://lists.llvm.org/pipermail/llvm-dev/2017-May/112779.html

This change is to alter the prototype for the atomic memcpy intrinsic. The prototype itself is being changed to more closely resemble the semantics and parameters of the llvm.memcpy intrinsic -- to ease later combination of the llvm.memcpy and atomic memcpy intrinsics. Furthermore, the name of the atomic memcpy intrinsic is being changed to make it clear that it is not a generic atomic memcpy, but specifically a memcpy is unordered atomic.

Reviewers: reames, sanjoy, efriedma

Reviewed By: reames

Subscribers: mzolotukhin, anna, llvm-commits, skatkov

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

llvm-svn: 305558
2017-06-16 14:43:59 +00:00
Matthias Braun
3177034f73 docs/Phabricator: Better git examples to produce full context patches
llvm-svn: 305515
2017-06-15 22:09:30 +00:00
Teresa Johnson
1eecb8a116 [Doc] Document prof metadata in LangRef
Summary:
Points to existing documentation for branch_weights and
function_entry_count, and adds an example for VP value profile metadata.

Reviewers: davidxl, reames

Subscribers: llvm-commits

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

llvm-svn: 305475
2017-06-15 15:57:12 +00:00
Florian Hahn
1f9320a4cd Align definition of DW_OP_plus with DWARF spec [3/3]
Summary:
This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things.
 
The way that LLVM interprets DW_OP_plus in DIExpression nodes is basically that of the DW_OP_plus_uconst operator since LLVM expects an unsigned constant operand. This unnecessarily restricts the DW_OP_plus operator, preventing it from being used to describe the evaluation of runtime values on the expression stack. These patches try to align the semantics of DW_OP_plus and DW_OP_minus with that of the DWARF definition, which pops two elements off the expression stack, performs the operation and pushes the result back on the stack.
 
This is done in three stages:
• The first patch (LLVM) adds support for DW_OP_plus_uconst.
• The second patch (Clang) contains changes all its uses from DW_OP_plus to DW_OP_plus_uconst.
• The third patch (LLVM) changes the semantics of DW_OP_plus and DW_OP_minus to be in line with its DWARF meaning. This patch includes the bitcode upgrade from legacy DIExpressions.

Patch by Sander de Smalen.

Reviewers: echristo, pcc, aprantl

Reviewed By: aprantl

Subscribers: fhahn, javed.absar, aprantl, llvm-commits

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

llvm-svn: 305386
2017-06-14 13:14:38 +00:00
Florian Hahn
c9381ce2b9 Align definition of DW_OP_plus with DWARF spec [1/3]
Summary:
This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things.
 
The way that LLVM interprets DW_OP_plus in DIExpression nodes is basically that of the DW_OP_plus_uconst operator since LLVM expects an unsigned constant operand. This unnecessarily restricts the DW_OP_plus operator, preventing it from being used to describe the evaluation of runtime values on the expression stack. These patches try to align the semantics of DW_OP_plus and DW_OP_minus with that of the DWARF definition, which pops two elements off the expression stack, performs the operation and pushes the result back on the stack.
 
This is done in three stages:
• The first patch (LLVM) adds support for DW_OP_plus_uconst.
• The second patch (Clang) contains changes all its uses from DW_OP_plus to DW_OP_plus_uconst.
• The third patch (LLVM) changes the semantics of DW_OP_plus and DW_OP_minus to be in line with its DWARF meaning. This patch includes the bitcode upgrade from legacy DIExpressions.

Patch by Sander de Smalen.

Reviewers: pcc, echristo, aprantl

Reviewed By: aprantl

Subscribers: fhahn, aprantl, javed.absar, llvm-commits

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

llvm-svn: 305304
2017-06-13 16:54:44 +00:00
Brian Gesiak
aa9f37889f [Lexicon] Add GVN
Summary: Add a lexicon entry for global value numbering.

Reviewers: davide, majnemer

Reviewed By: davide

Subscribers: llvm-commits, inouehrs

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

llvm-svn: 305270
2017-06-13 03:06:16 +00:00
Adrian Prantl
cd9f983fb4 Update LangRef for PR27284.
And reverse the ownership between DICompileUnit and DISubprogram.

llvm-svn: 305254
2017-06-12 23:59:43 +00:00
Peter Collingbourne
54103de7c1 IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata.
The new metadata is easier to manipulate than module flags.

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

llvm-svn: 305227
2017-06-12 20:10:48 +00:00
Zachary Turner
78a946eabb Rename llvm-pdbdump -> llvm-pdbutil.
This is to reflect the evolving nature of the tool as being
useful for more than just dumping PDBs, as it can do many other
things.

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

llvm-svn: 305106
2017-06-09 20:46:17 +00:00
Zachary Turner
48c406dce8 Update release notes for BinaryFormat library.
Differential Revision: https://reviews.llvm.org/D34001

llvm-svn: 304995
2017-06-08 17:47:22 +00:00
Tony Tye
450e450b48 Correct AMDGPU Hawaii and Kabini target names
The FirePro and Radeon versions of Hawaii have different 64 bit floating point configurations so use distinct target names for them. Rename the target name for Kabini to accommodate.

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

llvm-svn: 304959
2017-06-08 01:47:25 +00:00
Tony Tye
724bf48200 Try to work around possible bugs in version of Shpinx on buildserver.
Builds sucessfully with Sphinx v1.5.5

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

llvm-svn: 304853
2017-06-07 00:46:08 +00:00
Tony Tye
e196baa8c0 Add documentation for various aspects of the AMDGPU backend.
Remove extra tabs.
Builds sucessfully with Sphinx v1.5.5

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

llvm-svn: 304848
2017-06-07 00:08:35 +00:00
Tony Tye
44bb2c5151 Add documentation for various aspects of the AMDGPU backend.
Differential Revision: https://reviews.llvm.org/D33736

llvm-svn: 304831
2017-06-06 20:31:59 +00:00
Nuno Lopes
77b6a5876a [docs] Make it clear shifts yield poison when shift amount >= bitwidth
Some InstCombine optimizations already rely on the result being poison
rather than undef.

For example, the following rewrite is wrong if undef is used:
; (1 << Y) * X  ->  X << Y
%Op0 = shl 1, %Y
%r = mul %Op0, %Op1
  =>
%r = shl %Op1, %Y

ERROR: Mismatch in values for i4 %r

Example:
i4 %Y = 0x8 (8, -8)
i4 %Op0 = 0x0 (0)
i4 %Op1 = 0x0 (0)
source: 0x0 (0)
target: 0x1 (1)

The optimization is correct if poison is returned instead:
http://rise4fun.com/Alive/ygX


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

llvm-svn: 304780
2017-06-06 08:28:17 +00:00
Eli Friedman
06e7a73dd8 [docs] Update name of vectorization interleave flag.
llvm-svn: 304370
2017-05-31 23:02:55 +00:00
Ayal Zaks
1bc5629c63 [Docs] Add VectorizationPlan to docs/Proposals.
Following the request made in https://reviews.llvm.org/D32871, the
general documentation of the Vectorization Plan is hereby placed
under docs/Proposals.

llvm-svn: 304161
2017-05-29 15:36:23 +00:00
Andrew Kaylor
6f9f9c2fbe Add constrained intrinsics for some libm-equivalent operations
Differential revision: https://reviews.llvm.org/D32319

llvm-svn: 303922
2017-05-25 21:31:00 +00:00
Aaron Ballman
9614394657 Update the documentation and CMake file for Visual Studio generators.
By default, CMake uses a 32-bit toolchain, even when on a 64-bit platform targeting a 64-bit build. However, due to the size of the binaries involved, this can cause linker instabilities (such as the linker running out of memory). Guide people to the correct solution to get CMake to use the native toolchain.

llvm-svn: 303912
2017-05-25 21:01:30 +00:00
Adrian Prantl
39ff0a614a Delete an obsolete paragraph in LangRef.
llvm-svn: 303896
2017-05-25 18:54:06 +00:00
Rafael Espindola
3a54931075 Add some tips on benchmarking.
llvm-svn: 303769
2017-05-24 16:39:12 +00:00
Ayal Zaks
08b77c4665 [LV] Report multiple reasons for not vectorizing under allowExtraAnalysis
The default behavior of -Rpass-analysis=loop-vectorizer is to report only the
first reason encountered for not vectorizing, if one is found, at which time the
vectorizer aborts its handling of the loop. This patch allows multiple reasons
for not vectorizing to be identified and reported, at the potential expense of
additional compile-time, under allowExtraAnalysis which can currently be turned
on by Clang's -fsave-optimization-record and opt's -pass-remarks-missed.

Removed from LoopVectorizationLegality::canVectorize() the redundant checking
and reporting if we CantComputeNumberOfIterations, as LAI::canAnalyzeLoop() also
does that. This redundancy is caught by a lit test once multiple reasons are
reported.

Patch initially developed by Dror Barak.

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

llvm-svn: 303613
2017-05-23 07:08:02 +00:00
George Burgess IV
800e8c5421 [Docs] Fix LangRef links referred in GetElementPtr.rst
Patch by chenwj!

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

llvm-svn: 303499
2017-05-21 05:31:29 +00:00
Duncan P. N. Exon Smith
9f80cb84a8 Docs: Fix pluralization in CMake docs
Fixed "most platform" to read "most platforms", and changed "are not
using the same" to "use different" as a drive-by.

llvm-svn: 303487
2017-05-20 05:25:19 +00:00
George Burgess IV
050da78788 [docs] Small style nits.
llvm-svn: 303486
2017-05-20 04:52:29 +00:00
Rui Ueyama
93bd489654 Fix git command line in the Getting Started guide.
By default, git creates "llvm-project-20170507" directory,
but we want to create "llvm-project" directory.

llvm-svn: 303124
2017-05-15 22:32:34 +00:00
Sanjay Patel
7e803bdfd1 [Doc] Document "Splat" in the lexicon
Patch by Wei-Ren Chen (陳韋任)!

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

llvm-svn: 302950
2017-05-12 21:30:31 +00:00
James Y Knight
9afced58c2 [SPARC] Support 'f' and 'e' inline asm constraints.
Based on patch by Patrick Boettcher and Chris Dewhurst.

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

llvm-svn: 302911
2017-05-12 15:59:10 +00:00
Javed Absar
a6a50d93e8 [IR] Allow attributes with global variables
This patch extends llvm-ir to allow attributes to be set on global variables.
An RFC was sent out earlier by my colleague James Molloy: http://lists.llvm.org/pipermail/cfe-dev/2017-March/053100.html
A key part of that proposal was to extend LLVM-IR to carry attributes on global variables.
This generic feature could be useful for multiple purposes.
In our present context, it would be useful to carry user specified sections for bss/rodata/data.

Reviewed by: Jonathan Roelofs, Reid Kleckner
Differential Revision: https://reviews.llvm.org/D32009

llvm-svn: 302794
2017-05-11 12:28:08 +00:00
Amara Emerson
59ff6c8c60 Introduce experimental generic intrinsics for horizontal vector reductions.
- This change allows targets to opt-in to using them instead of the log2
  shufflevector algorithm.
- The SLP and Loop vectorizers have the common code to do shuffle reductions
  factored out into LoopUtils, and now have a unified interface for generating
  reductions regardless of the preference of the target. LoopUtils now uses TTI
  to determine what kind of reductions the target wants to handle.
- For CodeGen, basic legalization support is added.

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

llvm-svn: 302514
2017-05-09 10:43:25 +00:00
Tom Stellard
59a98b05ce Revert "Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake""
This reverts commit r302054.

Re-commit now that I have fixes for clang/lld.

llvm-svn: 302499
2017-05-09 01:41:28 +00:00
Kostya Serebryany
945ac266a3 [libFuzzer] update docs on -print_coverage/-dump_coverage
llvm-svn: 302498
2017-05-09 01:34:27 +00:00
Reid Kleckner
09aa8a59fc Update instructions for using the experimental monorepo
llvm-svn: 302459
2017-05-08 19:45:57 +00:00
Sanjoy Das
336c798846 Add a blurb to the release notes about the WeakVH -> WeakTrackingVH transition
llvm-svn: 302456
2017-05-08 19:15:06 +00:00
Matthias Braun
46d58287e3 MIParser/MIRPrinter: Compute block successors if not explicitely specified
- MIParser: If the successor list is not specified successors will be
  added based on basic block operands in the block and possible
  fallthrough.

- MIRPrinter: Adds a new `simplify-mir` option, with that option set:
  Skip printing of block successor lists in cases where the
  parser is guaranteed to reconstruct it. This means we still print the
  list if some successor cannot be determined (happens for example for
  jump tables), if the successor order changes or branch probabilities
  being unequal.

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

llvm-svn: 302289
2017-05-05 21:09:30 +00:00
Brian Gesiak
23bdd90743 [Lexicon] Add BDCE
Summary: Add an entry to the Lexicon for "BDCE."

Reviewers: jmolloy, hfinkel

Reviewed By: jmolloy

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

llvm-svn: 302169
2017-05-04 16:50:37 +00:00
Tom Stellard
e15d6e93f5 Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake"
This reverts commit r302025.

clang and lld need to be updated too so they don't break with this patch.

llvm-svn: 302054
2017-05-03 17:22:23 +00:00
Tom Stellard
bc274a8acb CMake: Move sphinx detection into AddSphinxTarget.cmake
Reviewers: chandlerc, beanz, mgorny

Reviewed By: beanz

Subscribers: llvm-commits

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

llvm-svn: 302025
2017-05-03 14:29:56 +00:00
Elad Cohen
3908e15a8b Support arbitrary address space pointers in masked gather/scatter intrinsics.
Fixes PR31789 - When loop-vectorize tries to use these intrinsics for a
non-default address space pointer we fail with a "Calling a function with a
bad singature!" assertion. This patch solves this by adding the 'vector of
pointers' argument as an overloaded type which will determine the address
space.

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

llvm-svn: 302018
2017-05-03 12:28:54 +00:00
Xin Tong
b271a4e6e0 Typo in LangRef.rst. NFC
llvm-svn: 301985
2017-05-02 23:24:12 +00:00
Alex Bradbury
f467dc969c Improvements to TableGen/LangIntro.rst
Document the 'code' data type, and that value{15-17} is different to 
value{17-15}.

Patch by @chenwj (Wei-Ren Chen).

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

llvm-svn: 301920
2017-05-02 13:47:10 +00:00
Lang Hames
6372ad3026 [docs] Simplify some language for Error/cantFail in the programmer's manual.
llvm-svn: 301773
2017-04-30 17:24:52 +00:00
Matt Arsenault
c9972a05d5 Add speculatable function attribute
This attribute tells the optimizer that the function may be speculated.

Patch by Tom Stellard

llvm-svn: 301680
2017-04-28 20:25:27 +00:00
Sanjoy Das
b9faf7c64f [StackMaps] Increase the size of the "location size" field
Summary:
In some cases LLVM (especially the SLP vectorizer) will create vectors
that are 256 bytes (or larger).  Given that this is intentional[0] is
likely to get more common, this patch updates the StackMap binary
format to deal with the spill locations for said vectors.

This change also bumps the stack map version from 2 to 3.

[0]: https://reviews.llvm.org/D32533#738350

Reviewers: reames, kavon, skatkov, javed.absar

Subscribers: mcrosier, nemanjai, llvm-commits

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

llvm-svn: 301615
2017-04-28 04:48:42 +00:00
Sanjoy Das
65e397ded3 Specify something that's true in practice
llvm-svn: 301591
2017-04-27 20:55:07 +00:00
Vassil Vassilev
6c948826b1 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)!

llvm-svn: 301569
2017-04-27 17:23:53 +00:00
Aaron Ballman
9bba36cdac Fixing a malformed RST table to get the documentation bot back to green.
llvm-svn: 301545
2017-04-27 14:33:01 +00:00
Sanjoy Das
732f091d68 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.

llvm-svn: 301429
2017-04-26 16:37:05 +00:00
Sanjoy Das
e226969b1c 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

llvm-svn: 301424
2017-04-26 16:20:52 +00:00
Galina Kistanova
56ad7325c7 Cosmetic change.
llvm-svn: 301253
2017-04-24 21:06:29 +00:00
Galina Kistanova
95881bb3a2 Small addition on how to add a builder.
llvm-svn: 301248
2017-04-24 20:48:40 +00:00
George Karpenkov
6b674c6862 Updates documentation for a syntax sugar libfuzzer flag,
as implemented in https://reviews.llvm.org/D32193

llvm-svn: 301217
2017-04-24 18:39:52 +00:00
Matt Arsenault
237f3db4bd 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.

llvm-svn: 301206
2017-04-24 17:49:13 +00:00
George Karpenkov
d68f696c7b Testing commit credentials
llvm-svn: 301200
2017-04-24 17:28:32 +00:00
Kamil Rytarowski
584ad0f8bb Update documentation for the NetBSD target
LLVM is known to work on NetBSD x86 32-bit and 64-bit.

llvm-svn: 301081
2017-04-22 16:11:23 +00:00
Andrew Kaylor
e4dc4aa661 Fix formatting of constrained FP intrinsic documentation
llvm-svn: 300865
2017-04-20 18:18:36 +00:00
Sanjoy Das
be72f786ee Statepoint Docs: fix incorrect uses of it's
llvm-svn: 300797
2017-04-19 23:55:03 +00:00
Philip Reames
974046b2d9 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.

llvm-svn: 300782
2017-04-19 23:16:13 +00:00
Adrian Prantl
f625c157a1 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

llvm-svn: 300522
2017-04-18 01:21:53 +00:00
Peter Collingbourne
2d3eb26eeb 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

llvm-svn: 300464
2017-04-17 17:51:36 +00:00
Kostya Serebryany
d5742c5e2f [libFuzzer] more trophies
llvm-svn: 300366
2017-04-14 20:11:16 +00:00
Matthias Braun
2271480dbe MIRLangRef: Add a section on simplifying .mir tests
Differential Revision: http://reviews.llvm.org/D32058

llvm-svn: 300282
2017-04-13 23:45:14 +00:00
Matthias Braun
d15fd4fdd6 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).

llvm-svn: 300268
2017-04-13 22:14:45 +00:00
George Burgess IV
c7cbe3ab30 Remove more lies from the LangRef.
Same change as in r300168, but for invoke instead of call.

llvm-svn: 300172
2017-04-13 05:00:31 +00:00
George Burgess IV
06a64bc421 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.

llvm-svn: 300168
2017-04-13 04:01:55 +00:00
Sanjay Patel
013822ac22 [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

llvm-svn: 300092
2017-04-12 18:39:53 +00:00
Piotr Padlewski
77d217e3dc [LangRef] fix documentation
llvm-svn: 300050
2017-04-12 11:18:19 +00:00
Piotr Padlewski
a2a28143a5 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

llvm-svn: 300033
2017-04-12 07:59:35 +00:00
Andrew Kaylor
936496606e Minor updates to floating point intrinsic documentation
llvm-svn: 299991
2017-04-11 21:52:40 +00:00
Matt Arsenault
204d4c1d7b 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.

llvm-svn: 299888
2017-04-10 22:27:50 +00:00
Dean Michael Berris
6e06198232 [XRay][docs] Fix hyperlink to XRay doc
llvm-svn: 299624
2017-04-06 04:26:26 +00:00
Gor Nishanov
0c6ab1f70b [coroutines] Add syntax coloring to examples in Coroutines.rst
Subscribers: EricWF

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

llvm-svn: 299517
2017-04-05 05:26:26 +00:00
Evgeniy Stepanov
bbceead2ad 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.

llvm-svn: 299479
2017-04-04 22:35:08 +00:00
Tim Northover
352fe52e6d Update stale doxygen links in ProgrammersManual.rst
Patch by Wei-Ren Chen.

llvm-svn: 299395
2017-04-03 22:24:32 +00:00
Joel Jones
2ced3176e1 Fix LLVMBuild.txt typo. NFC
llvm-svn: 299373
2017-04-03 18:21:50 +00:00
Peter Collingbourne
0c4012c570 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

llvm-svn: 299370
2017-04-03 17:58:48 +00:00
Dean Michael Berris
1b22de9dfd [XRay][docs] Add XRayExample to docindex.
llvm-svn: 299172
2017-03-31 02:51:19 +00:00
Dean Michael Berris
a241a1b1f2 [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

llvm-svn: 299133
2017-03-30 23:46:36 +00:00
Matt Arsenault
44792f1282 LangRef: Don't refer to a 'generic' address space.
Consistently call this the default address space.

llvm-svn: 299131
2017-03-30 23:36:47 +00:00
Rafael Espindola
1be3f21c7b Fix GettingStarted.rst statement.
Patch by Wei-Ren Chen!

llvm-svn: 298995
2017-03-29 14:27:38 +00:00
Adam Nemet
2cc291ac33 [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

llvm-svn: 298939
2017-03-28 20:11:52 +00:00
Reid Kleckner
c3c9e91422 Document how to fetch monorepo SVN revision notes
llvm-svn: 298733
2017-03-24 20:47:41 +00:00
Adrian Prantl
a67a378092 Document the status quo of DIExpression semantics in LangRef.rst
llvm-svn: 298528
2017-03-22 18:01:01 +00:00
George Burgess IV
40c3d6a6b6 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

llvm-svn: 298430
2017-03-21 20:08:59 +00:00
Reid Kleckner
b0f6f191a9 Fix RST docs AttributeList heading underline
llvm-svn: 298398
2017-03-21 17:05:00 +00:00
Reid Kleckner
27d17d1713 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

llvm-svn: 298393
2017-03-21 16:57:19 +00:00
Jonathan Roelofs
f0b9e63af6 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.

llvm-svn: 298277
2017-03-20 17:49:36 +00:00
Evgeniy Stepanov
17b421be46 Fix docs-llvm-html build.
llvm-svn: 298163
2017-03-17 22:31:13 +00:00