Commit Graph

7368 Commits

Author SHA1 Message Date
Paul Robinson
d2261415d6 Document how to comment an actual parameter.
Differential Revision: https://reviews.llvm.org/D54446

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346861 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-14 13:43:19 +00:00
Fedor Sergeev
9bfa082a97 [FileCheck] fixing docs buildbot - use proper code-block type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346740 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 05:47:01 +00:00
Lang Hames
30b44ffb4c [BuildingAJIT] Clang-format chapters 1 and 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346727 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 01:26:25 +00:00
Lang Hames
94419b4f02 [BuildingAJIT] Update chapter 2 to use the ORCv2 APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346726 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 01:25:34 +00:00
Fedor Sergeev
7230fe433c [FileCheck] fixing small formatting error in docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346725 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 01:12:19 +00:00
Fedor Sergeev
162ad1bb2a [FileCheck] introduce CHECK-COUNT-<num> repetition directive
In some cases it is desirable to match the same pattern repeatedly
many times. Currently the only way to do it is to copy the same
check pattern as many times as needed. And that gets pretty unwieldy
when its more than count is big.

Introducing CHECK-COUNT-<num> directive which acts like a plain CHECK
directive yet matches the same pattern exactly <num> times.

Extended FileCheckType to a struct to add Count there.
Changed some parsing routines to handle non-fixed length of directive
(all currently existing directives were fixed-length).

The code is generic enough to allow future support for COUNT in more
than just PlainCheck directives.

See motivating example for this feature in reviews.llvm.org/D54223.

Reviewed By: chandlerc, dblaikie
Differential Revision: https://reviews.llvm.org/D54336

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346722 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 00:46:13 +00:00
Philip Reames
cede812940 [GC docs] Update the gcroot documentation to reflect recent simplifcations to GCStrategy configurability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346702 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-12 20:30:50 +00:00
Philip Reames
d32f7814bc [docs][statepoints] Reformulate open issues list
Some have been partially resolved, so update that.  And restructure to make it easie to find and search.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346518 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 17:09:16 +00:00
Philip Reames
55d210a76b [docs][statepoint] Expand a bit on problems with mixing references and raw pointers since it keeps coming up in discussions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346513 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 16:40:34 +00:00
Philip Reames
9887d2b015 [docs][statepoint] tweak a title
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346509 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 16:27:04 +00:00
Max Moroz
fcdc267f22 [llvm-cov] Add lcov tracefile export format.
Summary:
lcov tracefiles are used by various coverage reporting tools and build
systems (e.g., Bazel). It is a simple text-based format to parse and
more convenient to use than the JSON export format, which needs
additional processing to map regions/segments back to line numbers.

It's a little unfortunate that "text" format is now overloaded to refer
specifically to JSON for export, but I wanted to avoid making any
breaking changes to the UI of the llvm-cov tool at this time.

Patch by Tony Allevato (@allevato).

Reviewers: Dor1s, vsk

Reviewed By: Dor1s, vsk

Subscribers: mgorny, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346506 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 16:10:44 +00:00
Philip Reames
0429e0bda4 [docs][statepoint] Document explicitly provided stack slots
Functionality for this was added a while ago, though never documented or extensively tested.  Document it with an explicit warning.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346448 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 23:20:40 +00:00
Philip Reames
bdb320aee7 [docs][statepoints] add a section spelling out simplifications for non-relocating GCs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346447 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 23:07:04 +00:00
Philip Reames
e482060310 [docs] Add some subsections to make it possible to find portions of the statepoint overview
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346446 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 22:56:41 +00:00
Philip Reames
0cdc04df2e [docs] Clarify ELF section naming for StackMaps and fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346416 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 17:20:35 +00:00
Philip Reames
af1ff1aef5 [docs] Clarify expectations for stack map sections and AOT compilers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346405 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 15:17:10 +00:00
Konstantin Zhuravlyov
ba9a1e1d78 AMDGPU/Docs: Add product names for Vega20
Differential Revision: https://reviews.llvm.org/D54178


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346354 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-07 20:54:16 +00:00
James Y Knight
3125e35140 Add support for llvm.is.constant intrinsic (PR4898)
This adds the llvm-side support for post-inlining evaluation of the
__builtin_constant_p GCC intrinsic.

Also fixed SCCPSolver::visitCallSite to not blow up when seeing a call
to a function where canConstantFoldTo returns true, and one of the
arguments is a struct.

Updated from patch initially by Janusz Sobczak.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346322 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-07 15:24:12 +00:00
Kristof Beyls
1f633af49e Introduce bug life cycle documentation.
Document what is expected during:
* triaging
* actively working on a bug
* closing/resolving

Also document how we maintain:
* product/component breakdown
* default-cc lists per component

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346299 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-07 08:49:36 +00:00
Joel E. Denny
e861874109 [FileCheck] Parse command-line options from FILECHECK_OPTS
This feature makes it easy to tune FileCheck diagnostic output when
running the test suite via ninja, a bot, or an IDE.  For example:

```
$ FILECHECK_OPTS='-color -v -dump-input-on-failure' \
  LIT_FILTER='OpenMP/for_codegen.cpp' ninja check-clang \
  | less -R
```

Reviewed By: probinson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346272 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-06 22:07:03 +00:00
Konstantin Zhuravlyov
ffb90c4641 AMDGPU/Docs: Fix the processor table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346263 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-06 20:23:53 +00:00
Konstantin Zhuravlyov
7829a6dfd5 AMDGPU: Add sram-ecc feature
Differential Revision: https://reviews.llvm.org/D53222


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346177 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-05 22:44:19 +00:00
Cameron McInally
7c442634fa [FPEnv] Add constrained CEIL/FLOOR/ROUND/TRUNC intrinsics
Differential Revision: https://reviews.llvm.org/D53411



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346141 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-05 15:59:49 +00:00
Cameron McInally
1b82386f5e [NFC] Remove some extra characters from docs/LangRef.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345987 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-02 15:51:43 +00:00
Mandeep Singh Grang
08238b7fa9 [COFF, ARM64] Implement Intrinsic.sponentry for AArch64
Summary: This patch adds Intrinsic.sponentry. This intrinsic is required to correctly support setjmp for AArch64 Windows platform.

Patch by: Yin Ma (yinma@codeaurora.org)

Reviewers: mgrang, ssijaric, eli.friedman, TomTan, mstorsjo, rnk, compnerd, efriedma

Reviewed By: efriedma

Subscribers: efriedma, javed.absar, kristof.beyls, chrib, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345909 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-01 23:22:25 +00:00
Mandeep Singh Grang
3516febde5 [COFF, ARM64] Implement llvm.addressofreturnaddress intrinsic
Reviewers: rnk, mstorsjo, efriedma, TomTan

Reviewed By: efriedma

Subscribers: javed.absar, kristof.beyls, chrib, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345892 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-01 21:23:47 +00:00
Mandeep Singh Grang
fb61af32fa Revert "[COFF, ARM64] Implement Intrinsic.sponentry for AArch64"
This reverts commit 585b6667b4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345863 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-01 17:53:57 +00:00
Mandeep Singh Grang
585b6667b4 [COFF, ARM64] Implement Intrinsic.sponentry for AArch64
Summary: This patch adds Intrinsic.sponentry. This intrinsic is required to correctly support setjmp for AArch64 Windows platform.

Reviewers: mgrang, TomTan, rnk, compnerd, mstorsjo, efriedma

Reviewed By: efriedma

Subscribers: majnemer, chrib, javed.absar, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345791 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-31 23:16:20 +00:00
Cameron McInally
3277e77bfd [FPEnv] [FPEnv] Add constrained intrinsics for MAXNUM and MINNUM
Differential Revision: https://reviews.llvm.org/D53216



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345650 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-30 21:01:29 +00:00
George Burgess IV
1517625543 Add docs+a script for building clang/LLVM with PGO
Depending on who you ask, PGO grants a 15%-25% improvement in build
times when using clang. Sadly, hooking everything up properly to
generate a profile and apply it to clang isn't always straightforward.
This script (and the accompanying docs) aim to make this process easier;
ideally, a single invocation of the given script.

In terms of testing, I've got a cronjob on my Debian box that's meant to
run this a few times per week, and I tried manually running it on a puny
Gentoo box I have (four whole Atom cores!). Nothing obviously broke.
¯\_(ツ)_/¯

I don't know if we have a Python style guide, so I just shoved this
through yapf with all the defaults on.

Finally, though the focus is clang at the moment, the hope is that this
is easily applicable to other LLVM-y tools with minimal effort (e.g.
lld, opt, ...). Hence, this lives in llvm/utils and tries to be somewhat
ambiguous about naming.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345427 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-26 20:56:03 +00:00
Clement Courbet
f4fb61b34b [MCSched] Bind PFM Counters to the CPUs instead of the SchedModel.
Summary:
The pfm counters are now in the ExegesisTarget rather than the
MCSchedModel (PR39165).

This also compresses the pfm counter tables (PR37068).

Reviewers: RKSimon, gchatelet

Subscribers: mgrang, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345243 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-25 07:44:01 +00:00
Joel E. Denny
718a779582 [SourceMgr][FileCheck] Obey -color by extending WithColor
(Relands r344930, reverted in r344935, and now hopefully fixed for
Windows.)

While this change specifically targets FileCheck, it affects any tool
using the same SourceMgr facilities.

Previously, -color was documented in FileCheck's -help output, but
-color had no effect.  Now, -color obeys its documentation: it forces
colors to be used in FileCheck diagnostics even when stderr is not a
terminal.

-color is especially helpful when combined with FileCheck's -v, which
can produce a long series of diagnostics that you might wish to pipe
to a pager, such as less -R.  The WithColor extensions here will also
help to clean up color usage in FileCheck's annotated dump of input,
which is proposed in D52999.

Reviewed By: JDevlieghere, zturner

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345202 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-24 21:46:42 +00:00
Michael Kruse
048958afe0 [docs] Add rawspeed to test-suite proposals.
rawspeed was suggested by Simon Pilgrim and Roman Lebedev in
llvm.org/PR34216 and reviews.llvm.org/D46714.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345166 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-24 17:35:35 +00:00
Tim Renouf
7d5e5c2747 [AMDGPU] Defined gfx909 Raven Ridge 2
Differential Revision: https://reviews.llvm.org/D53418

Change-Id: Ie3d054f2e956c2768988c0f4c0ffd29a47294eef

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345120 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-24 08:14:07 +00:00
Michael Kruse
39f6fac74b [test-suite/doc] Add list of programs we might add.
Add a list of benchmarks, applications and algorithms which are under
discussion to be added to the test-suite.

The initial list includes the the benchmarks mentioned at
https://llvm.org/PR34216, missing SPEC benchmarks, some image processing
algorithms and a few others. The bug tracker only allows adding to the
discussion, not removing, commenting, adding details to individual
benchmarks.

The first proposal was to add these benchmark into the test-suite
repository, but after a discussion, adding it to llvm/docs/Proposals
seem more appropriate. One advantage is that llvm.org will have a
browsable web page with these suggestions.

Suggested-by: Hal Finkel

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345074 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-23 19:46:29 +00:00
Aaron Ballman
30353731ce Revert r344930 as it broke some of the bots on Windows.
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/739

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344935 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-22 18:51:29 +00:00
Joel E. Denny
1aa867a439 [SourceMgr][FileCheck] Obey -color by extending WithColor
While this change specifically targets FileCheck, it affects any tool
using the same SourceMgr facilities.

Previously, -color was documented in FileCheck's -help output, but
-color had no effect.  Now, -color obeys its documentation: it forces
colors to be used in FileCheck diagnostics even when stderr is not a
terminal.

-color is especially helpful when combined with FileCheck's -v, which
can produce a long series of diagnostics that you might wish to pipe
to a pager, such as less -R.  The WithColor extensions here will also
help to clean up color usage in FileCheck's annotated dump of input,
which is proposed in D52999.

Reviewed By: JDevlieghere

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344930 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-22 18:00:49 +00:00
Chandler Carruth
d95ef31baa [TI removal] Remove discussion of TerminatorInst from the LLVM
documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344727 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-18 07:40:24 +00:00
Kristina Brooks
e97176ffba [X86] Support for the mno-tls-direct-seg-refs flag
Allows to disable direct TLS segment access (%fs or %gs). GCC supports
a similar flag, it can be useful in some circumstances, e.g. when a thread
context block needs to be updated directly from user space. More info
and specific use cases: https://bugs.llvm.org/show_bug.cgi?id=16145

There is another revision for clang as well.
Related: D53102

All X86 CodeGen tests appear to pass:
```
[46/47] Running lit suite /SourceCache/llvm-trunk-8.0/test/CodeGen
Testing Time: 23.17s
  Expected Passes    : 3801
  Expected Failures  : 15
  Unsupported Tests  : 8021
```

Reviewed by: Craig Topper.

Patch by nruslan (Ruslan Nikolaev).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344723 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-18 03:14:37 +00:00
Lang Hames
009a7621a3 [BuildingAJIT] Update the Ch1 KaleidoscopeJIT class to expose errors to clients.
Returning the error to clients provides an opportunity to introduce readers to
the Expected and Error APIs and makes the tutorial more useful as a starting
point for a real JIT class, while only slightly complicating the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344720 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-18 00:51:38 +00:00
Lang Hames
986e22dd7d [BuildingAJIT] Simplify a tutorial example and fix a syntax error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344712 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-17 22:27:09 +00:00
Lang Hames
8728549da3 [BuildingAJIT] Fix a function signature in the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344705 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-17 19:35:38 +00:00
Clement Courbet
0a1aef0095 [llvm-exegesis] Allow measuring several instructions in a single run.
Summary:
We try to recover gracefully on instructions that would crash the
program.

This includes some refactoring of runMeasurement() implementations.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344695 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-17 15:04:15 +00:00
Sylvestre Ledru
5090f032e2 Document the behavior of option passing when using -DCLANG_ENABLE_BOOTSTRAP=On
Also document -DCLANG_BOOTSTRAP_PASSTHROUGH

Reviewers: ecbeckmann

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344669 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-17 06:35:10 +00:00
Lang Hames
73405ef163 [BuildingAJIT] Update chapter 1 to use the ORCv2 APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344667 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-17 03:34:09 +00:00
Chris Lattner
6d4ce2a09e fix an out of date paragraph noticed by Bryce Lelbach
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344621 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-16 16:54:10 +00:00
Thomas Lively
6e3463c0eb [Intrinsic] Add llvm.minimum and llvm.maximum instrinsic functions
Summary:
These new intrinsics have the semantics of the `minimum` and `maximum`
operations specified by the latest draft of IEEE 754-2018. Unlike
llvm.minnum and llvm.maxnum, these new intrinsics propagate NaNs and
always treat -0.0 as less than 0.0. `minimum` and `maximum` lower
directly to the existing `fminnan` and `fmaxnan` ISel DAG nodes. It is
safe to reuse these DAG nodes because before this patch were only
emitted in situations where there were known to be no NaN arguments or
where NaN propagation was correct and there were known to be no zero
arguments. I know of only four backends that lower fminnan and
fmaxnan: WebAssembly, ARM, AArch64, and SystemZ, and each of these
lowers fminnan and fmaxnan to instructions that are compatible with
the IEEE 754-2018 semantics.

Reviewers: aheejin, dschuff, sunfish, javed.absar

Subscribers: kristof.beyls, dexonsmith, kristina, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344437 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-13 07:21:44 +00:00
Kristof Umann
0ee905200b [doc] Update the programmer's manual about SmallSet's iterator
Since rL337818, you can now iterate the SmallSet.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343770 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-04 12:33:33 +00:00
Simon Pilgrim
8a1edcb227 The llvm-exegesis output file is a html file not a txt file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343215 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-27 13:49:52 +00:00
Fangrui Song
a0148b8997 [docs] Remove reference to makellvm which was removed in rL329041
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343165 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-27 03:48:04 +00:00
Clement Courbet
ac26717e83 [llvm-exegesis] Fix doc in r342947.
llvm-exegesis.rst was using invalid indentation for bullet points.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342948 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-25 07:48:38 +00:00
Clement Courbet
956d5f3258 [llvm-exegesis] Allow benchmarking arbitrary code snippets.
Summary:

This is a step towards fixing PR38048.

Note that right now the measurements are given per instruction. We'll
need to give measurements a per code snippet and update the analysis (PR38731).

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342947 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-25 07:31:44 +00:00
Kristina Brooks
da8383a9eb [Docs] [Support] Correct a missed reference and use up to date .inc examples.
In my original diff I missed #include "llvm/System/Thing.h" and forgot to update a
reference to .inc files a few lines down. This patch corrects these things as 
they were missed in revision 342500.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342705 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-21 01:53:51 +00:00
Calixte Denizet
44db1d1e24 [IR] Add a boolean field in DILocation to know if a line must covered or not
Summary:
Some lines have a hit counter where they should not have one.
For example, in C++, some cleanup is adding at the end of a scope represented by a '}'.
So such a line has a hit counter where a user expects to not have one.
The goal of the patch is to add this information in DILocation which is used to get the covered lines in GCOVProfiling.cpp.
A following patch in clang will add this information when generating IR (https://reviews.llvm.org/D49916).

Reviewers: marco-c, davidxl, vsk, javed.absar, rnk

Reviewed By: rnk

Subscribers: eraman, xur, danielcdh, aprantl, rnk, dblaikie, #debug-info, vsk, llvm-commits, sylvestre.ledru

Tags: #debug-info

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342631 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-20 08:53:06 +00:00
Sylvestre Ledru
3f24abff84 Improve the doc about the initial commit email sent to the ML
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342622 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-20 07:43:24 +00:00
Kristina Brooks
9ae6d92a56 Remove svn:executable from a documentation file.
Should fix the buildbot failure caused by it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342502 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-18 18:37:16 +00:00
Kristina Brooks
cd4dcdaaf2 [Docs] [Support] System Library to Support Library transition along with minor corrections to reflect it.
System Library has been a long deprecated term along with the path lib/System, having been superseded/renamed
to the Support Library a long time ago. These patches reflect those changes in documentation as well as
update some outdated examples and provide context to the origin of the Support Library.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342500 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-18 18:05:38 +00:00
Teresa Johnson
28bc0ab606 [ThinLTO] Update LangRef doc for summary parsing
Summary:
Remove note about summary being ignored. Update to reflect the
fact that summary is now parsed by llvm-as.

While here, fix one summary format that changed since the initial
implementation.

Reviewers: dexonsmith

Subscribers: inglorion, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342479 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-18 13:44:13 +00:00
Richard Smith
61be1ad26c Add flag to llvm-profdata to allow symbols in profile data to be remapped, and
add a tool to generate symbol remapping files.

Summary:
The new tool llvm-cxxmap builds a symbol mapping table from a file containing
a description of partial equivalences to apply to mangled names and files
containing old and new symbol tables.

Reviewers: davidxl

Subscribers: mgorny, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342168 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-13 20:22:02 +00:00
Hans Wennborg
aa81d565a9 ReleaseNotes: update links to use https
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341785 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-10 08:50:31 +00:00
Reid Kleckner
cb88bb7c68 [benchmark] Re-enable benchmarks on all platforms including Windows
The assertion in MCCodeView.cpp was resolved in r340878.

This reverts both r340905 and r340836, making benchmarks build by
default everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341716 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 21:47:00 +00:00
Chandler Carruth
d2b1fb11d3 [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative
Load Hardening.

Wires up the existing pass to work with a proper IR attribute rather
than just a hidden/internal flag. The internal flag continues to work
for now, but I'll likely remove it soon.

Most of the churn here is adding the IR attribute. I talked about this
Kristof Beyls and he seemed at least initially OK with this direction.
The idea of using a full attribute here is that we *do* expect at least
some forms of this for other architectures. There isn't anything
*inherently* x86-specific about this technique, just that we only have
an implementation for x86 at the moment.

While we could potentially expose this as a Clang-level attribute as
well, that seems like a good question to defer for the moment as it
isn't 100% clear whether that or some other programmer interface (or
both?) would be best. We'll defer the programmer interface side of this
for now, but at least get to the point where the feature can be enabled
without relying on implementation details.

This also allows us to do something that was really hard before: we can
enable *just* the indirect call retpolines when using SLH. For x86, we
don't have any other way to mitigate indirect calls. Other architectures
may take a different approach of course, and none of this is surfaced to
user-level flags.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341363 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 12:38:00 +00:00
Chandler Carruth
2ec0ce0cc3 [x86/SLH] Teach SLH to harden against the "ret2spec" attack by
implementing the proposed mitigation technique described in the original
design document.

The idea is to check after calls that the return address used to arrive
at that location is in fact the correct address. In the event of
a mis-predicted return which reaches a *valid* return but not the
*correct* return, this will detect the mismatch much like it would
a mispredicted conditional branch.

This is the last published attack vector that I am aware of in the
Spectre v1 space which is not mitigated by SLH+retpolines. However,
don't read *too* much into that: this is an area of ongoing research
where we expect more issues to be discovered in the future, and it also
makes no attempt to mitigate Spectre v4. Still, this is an important
completeness bar for SLH.

The change here is of course delightfully simple. It was predicated on
cutting support for post-instruction symbols into LLVM which was not at
all simple. Many thanks to Hal Finkel, Reid Kleckner, and Justin Bogner
who helped me figure out how to do a bunch of the complex changes
involved there.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341358 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 10:59:10 +00:00
Matthias Braun
64a07d9117 Revamp test-suite documentation
- Remove duplication: Both TestingGuide and TestSuiteMakefileGuide
  would give a similar overview over the test-suite.
- Present cmake/lit as the default/normal way of running the test-suite:
- Move information about the cmake/lit testsuite into the new
  TestSuiteGuide.rst file. Mark the remaining information in
  TestSuiteMakefilesGuide.rst as deprecated.
- General simplification and shorting of language.
- Remove paragraphs about tests known to fail as everything should pass
  nowadays.
- Remove paragraph about zlib requirement; it's not required anymore
  since we copied a zlib source snapshot into the test-suite.
- Remove paragraph about comparison with "native compiler". Correctness is
  always checked against reference outputs nowadays.
- Change cmake/lit quickstart section to recommend `pip` for installing
  lit and use `CMAKE_C_COMPILER` and a cache file in the example as that
  is what most people will end up doing anyway. Also a section about
  compare.py to quickstart.
- Document `Bitcode` and `MicroBenchmarks` directories.
- Add section with commonly used cmake configuration options.
- Add section about showing and comparing result files via compare.py.
- Add section about using external benchmark suites.
- Add section about using custom benchmark suites.
- Add section about profile guided optimization.
- Add section about cross-compilation and running on external devices.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341260 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-31 21:47:01 +00:00
Andrea Di Biagio
f0c09e5b1e [llvm-mca] Report the number of dispatched micro opcodes in the DispatchStatistics view.
This patch introduces the following changes to the DispatchStatistics view:
 * DispatchStatistics now reports the number of dispatched opcodes instead of
   the number of dispatched instructions.
 * The "Dynamic Dispatch Stall Cycles" table now also reports the percentage of
   stall cycles against the total simulated cycles.

This change allows users to easily compare dispatch group sizes with the
processor DispatchWidth.
Before this change, it was difficult to correlate the two numbers, since
DispatchStatistics view reported numbers of instructions (instead of opcodes).
DispatchWidth defines the maximum size of a dispatch group in terms of number of
micro opcodes.

The other change introduced by this patch is related to how DispatchStage
generates "instruction dispatch" events.
In particular:
 * There can be multiple dispatch events associated with a same instruction
 * Each dispatch event now encapsulates the number of dispatched micro opcodes.

The number of micro opcodes declared by an instruction may exceed the processor
DispatchWidth. Therefore, we cannot assume that instructions are always fully
dispatched in a single cycle.
DispatchStage knows already how to handle instructions declaring a number of
opcodes bigger that DispatchWidth. However, DispatchStage always emitted a
single instruction dispatch event (during the first simulated dispatch cycle)
for instructions dispatched.

With this patch, DispatchStage now correctly notifies multiple dispatch events
for instructions that cannot be dispatched in a single cycle.

A few views had to be modified. Views can no longer assume that there can only
be one dispatch event per instruction.

Tests (and docs) have been updated.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341055 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-30 10:50:20 +00:00
Andrea Di Biagio
4dfd5dbebc [llvm-mca] Add fields "Total uOps" and "uOps Per Cycle" to the report generated by the SummaryView.
This patch adds two new fields to the perf report generated by the SummaryView.
Fields are now logically organized into two small groups; only the second group
contains throughput indicators.

Example:
```
Iterations:        100
Instructions:      300
Total Cycles:      414
Total uOps:        700

Dispatch Width:    4
uOps Per Cycle:    1.69
IPC:               0.72
Block RThroughput: 4.0
```

This patch also updates the docs for llvm-mca.
Due to the nature of this change, several tests in the tools/llvm-mca directory
were affected, and had to be updated using script `update_mca_test_checks.py`.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340946 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-29 17:56:39 +00:00
Kirill Bobyrev
0d21b88888 [benchmark] NFC: Turn benchmark ON on all non-Windows buildbots
The problems with benchmark build should be fixed now, but Windows
buildbots still run into errors seemingly because of the bug in
clang-cl. Because of that, benchmark shouldn't be built on Windows at
this point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340905 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-29 08:59:36 +00:00
Dean Michael Berris
4a2eaa1dba [XRay][docs] Chrome Trace Viewer Instructions
This patch adds an example on how to generate a Chrome Trace Viewer
loadable trace from an XRay trace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340847 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 17:36:30 +00:00
Dean Michael Berris
f525bbcf3c [XRay][docs] Update instructions
Add `xray_mode=xray-basic` to the list of options in the "further
exploration" section of the doc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340843 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 16:46:27 +00:00
Kirill Bobyrev
5a575ac79e [benchmark] Stop building benchmarks by default
Although the benchmark regex-related build issue seems to be
fixed, it appears that benchmark library triggers some stage 2 clang-cl
bugs:

http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/13495/steps/build%20stage%202/logs/stdio

The only sensible option now is to prevent benchmark library from
building in the default configuration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340836 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 15:36:50 +00:00
Kirill Bobyrev
18c6fab107 Pull google/benchmark library to the LLVM tree
This patch pulls google/benchmark v1.4.1 into the LLVM tree so that any
project could use it for benchmark generation. A dummy benchmark is
added to `llvm/benchmarks/DummyYAML.cpp` to validate the correctness of
the build process.

The current version does not utilize LLVM LNT and LLVM CMake
infrastructure, but that might be sufficient for most users. Two
introduced CMake variables:

* `LLVM_INCLUDE_BENCHMARKS` (`ON` by default) generates benchmark
  targets
* `LLVM_BUILD_BENCHMARKS` (`OFF` by default) adds generated
  benchmark targets to the list of default LLVM targets (i.e. if `ON`
  benchmarks will be built upon standard build invocation, e.g. `ninja` or
  `make` with no specific targets)

List of modifications:

* `BENCHMARK_ENABLE_TESTING` is disabled
* `BENCHMARK_ENABLE_EXCEPTIONS` is disabled
* `BENCHMARK_ENABLE_INSTALL` is disabled
* `BENCHMARK_ENABLE_GTEST_TESTS` is disabled
* `BENCHMARK_DOWNLOAD_DEPENDENCIES` is disabled

Original discussion can be found here:
http://lists.llvm.org/pipermail/llvm-dev/2018-August/125023.html

Reviewed by: dberris, lebedev.ri

Subscribers: ilya-biryukov, ioeric, EricWF, lebedev.ri, srhines,
dschuff, mgorny, krytarowski, fedor.sergeev, mgrang, jfb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340809 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 09:42:41 +00:00
Matt Arsenault
e07ed9ed4f LangRef: Clarify expected sNaN behavior for minnum/maxnum
This matches the de-facto behavior based on constant folding
and the default lowering to fmin/fmax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340762 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-27 17:40:07 +00:00
Andrea Di Biagio
0f9e36f242 [llvm-mca] Improved report generated by the SchedulerStatistics view.
Before this patch, the SchedulerStatistics only printed the maximum number of
buffer entries consumed in each scheduler's queue at a given point of the
simulation.

This patch restructures the reported table, and adds an extra field named
"Average number of used buffer entries" to it.
This patch also uses different colors to help identifying bottlenecks caused by
high scheduler's buffer pressure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340746 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-27 14:52:52 +00:00
Chandler Carruth
9179aee2c1 [IR] Replace isa<TerminatorInst> with isTerminator().
This is a bit awkward in a handful of places where we didn't even have
an instruction and now we have to see if we can build one. But on the
whole, this seems like a win and at worst a reasonable cost for removing
`TerminatorInst`.

All of this is part of the removal of `TerminatorInst` from the
`Instruction` type hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340701 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-26 09:51:22 +00:00
Kuba Mracek
d41a54540b [llvm] Document "%T" as deprecated in CommandGuide/lit.rst
Differential Revision: https://reviews.llvm.org/D48842



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340677 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-25 01:27:48 +00:00
Alexander Richardson
47ff67b78d Allow creating llvm::Function in non-zero address spaces
Most users won't have to worry about this as all of the
'getOrInsertFunction' functions on Module will default to the program
address space.

An overload has been added to Function::Create to abstract away the
details for most callers.

This is based on https://reviews.llvm.org/D37054 but without the changes to
make passing a Module to Function::Create() mandatory. I have also added
some more tests and fixed the LLParser to accept call instructions for
types in the program address space.

Reviewed By: bjope

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340519 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-23 09:25:17 +00:00
David Green
3d765ce4b7 [AArch64] Add Tiny Code Model for AArch64
This adds the plumbing for the Tiny code model for the AArch64 backend. This,
instead of loading addresses through the normal ADRP;ADD pair used in the Small
model, uses a single ADR. The 21 bit range of an ADR means that the code and
its statically defined symbols need to be within 1MB of each other.

This makes it mostly interesting for embedded applications where we want to fit
as much as we can in as small a space as possible.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340397 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-22 11:31:39 +00:00
Fangrui Song
8a21449387 [docs][gold] Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340335 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-21 21:00:54 +00:00
Alex Langford
985a082945 [docs] Fix a small typo in a debug info example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340246 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-21 01:43:03 +00:00
Aditya Kumar
a83fad8a70 Updating MergeFunctions.rst
Improving readability, removing redundant contents.

Reviewers: hiraditya
Differential Revision: https://reviews.llvm.org/D50686

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340131 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-18 20:17:19 +00:00
Chandler Carruth
e90d44039a [x86/MIR] Implement support for pre- and post-instruction symbols, as
well as MIR parsing support for `MCSymbol` `MachineOperand`s.

The only real way to test pre- and post-instruction symbol support is to
use them in operands, so I ended up implementing that within the patch
as well. I can split out the operand support if folks really want but it
doesn't really seem worth it.

The functional implementation of pre- and post-instruction symbols is
now *completely trivial*. Two tiny bits of code in the (misnamed)
AsmPrinter. It should be completely target independent as well. We emit
these exactly the same way as we emit basic block labels. Most of the
code here is to give full dumping, MIR printing, and MIR parsing support
so that we can write useful tests.

The MIR parsing of MC symbol operands still isn't 100%, as it forces the
symbols to be non-temporary and non-local symbols with names. However,
those names often can encode most (if not all) of the special semantics
desired, and unnamed symbols seem especially annoying to serialize and
de-serialize. While this isn't perfect or full support, it seems plenty
to write tests that exercise usage of these kinds of operands.

The MIR support for pre-and post-instruction symbols was quite
straightforward. I chose to print them out in an as-if-operand syntax
similar to debug locations as this seemed the cleanest way and let me
use nice introducer tokens rather than inventing more magic punctuation
like we use for memoperands.

However, supporting MIR-based parsing of these symbols caused me to
change the design of the symbol support to allow setting arbitrary
symbols. Without this, I don't see any reasonable way to test things
with MIR.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339962 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-16 23:11:05 +00:00
Justin Bogner
218ada7811 [docs] Try to clarify the FuzzingLLVM docs
Try to improve these docs based on some recent questions that were
sent to llvm-dev:

  http://lists.llvm.org/pipermail/llvm-dev/2018-August/125329.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339949 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-16 21:55:09 +00:00
Aaron Ballman
5aaa8205c7 Update the coding standards and developer policy documentation surrounding whitespace.
Clarify that you should not introduce trailing whitespace when making a commit and that you should not remove trailing whitespace that's unrelated to code you are changing or are about to change. Then clarified the developer policy around what is considered an obvious whitespace commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339455 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-10 17:26:07 +00:00
Michael Trent
c1affcdede Add a CommandGuide for llvm-objdump
Summary:
Add a CommandGuide for llvm-objdump summarizing its usage along with some
general context.

Reviewers: beanz

Reviewed By: beanz

Subscribers: Eugene.Zelenko, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339250 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 14:39:22 +00:00
Chandler Carruth
084fdcc27e [docs] Continue working around broken Sphinx parsing of LLVM code blocks
by switching to `text` in another place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339001 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 10:20:05 +00:00
Chandler Carruth
f6ba2bc74b [docs] Remove the dso_local tag from these functions.
The sphinx build bot is erroring on these examples for some unknown
reason, and really the dso_local doesn't seem to be relevant to the
example in any way so its cleaner to omit it. And now they will look
a bit more like other (successful) IR examples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338998 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 10:03:25 +00:00
Chandler Carruth
86b1509b59 [docs] Stop trying to parse the ThinLTO summary IR fragments with the
`llvm` syntax in Sphinx. This appears to just fail and create errors on
the docs buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338997 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 09:46:59 +00:00
Chandler Carruth
63c6deda4e [docs] Switch debug info metadata blocks to use text instead of llvm
highlighting syntax.

Most of them already were like this, and the Sphinx runs on the docs
build bot seems to be substantially more picky and/or not have support
for a bunch of the syntax here. Hopefully this will let it progress past
this.

My previous attempt to fix the syntax made the `opt` tool happy, but no
idea what the Sphinx stuff is really looking for, and the fact that
other blocks already just use `text` led me to this solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338983 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 03:35:36 +00:00
Chandler Carruth
512e317975 [docs] Correct the basic syntax structure of the DISubrange example.
Notably, just close two of the debug info metadata nodes early rather
than leaving them open with `...` which won't ever lex correctly. And
add the missing `:` on the count labels.

Slowly progressing through all of the warnings on the documentation
build bot. Sorry to do this one commit at a time, but despite my best
efforts I can't trigger these errors locally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338982 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 02:30:01 +00:00
Chandler Carruth
4c31db3adf [docs] Remove an example that isn't well formed LLVM IR and trips up the
Sphinx syntax highlighter.

This example also doesn't really make sense. There is no control flow or
clarification of what the `Safe:` block exists to do... If we want
examples here, we should make them much more clear in addition to making
them well formed IR sequences.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338981 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 02:02:09 +00:00
Chandler Carruth
7290db8e11 [docs] Fix an LLVM-syntax code block to actually be valid LLVM synatx.
Hopefully fixes an issue on the docs build bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338980 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 01:41:25 +00:00
Chandler Carruth
c0cb45a2cf [docs] Turn of nasm highlighting for a code block.
This appears to produce a warning on the docs build bot. It doesn't
reproduce for me, likely because I have a newer (or more full featured)
pygments install.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338978 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 01:19:43 +00:00
Chandler Carruth
d78e43427f [docs] Reinstate r337730 - Add support for Markdown documentation in
Sphinx.

We think the bot is updated now, so trying this again. I'm landing it
(with permission) as Michael is at a con at the moment.

Actual patch largely by Michael Spencer.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338977 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-06 00:38:31 +00:00
Matt Davis
dfa0460a54 [llvm-mca][docs] Move the code marker text into its own subsection. NFC.
Also fixed a few undecorated 'llvm-mca' references to be highlighted
with the 'program' emphasis.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338900 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-03 15:56:07 +00:00
Andrea Di Biagio
d6b95e9be3 [llvm-mca] Speed up the computation of the wait/ready/issued sets in the Scheduler.
This patch is a follow-up to r338702.

We don't need to use a map to model the wait/ready/issued sets. It is much more
efficient to use a vector instead.

This patch gives us an average 7.5% speedup (on top of the ~12% speedup obtained
after r338702).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338883 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-03 12:55:28 +00:00
Andrea Di Biagio
614e6127d2 [llvm-mca][docs] Improve the CommandLine documentation.
This patch replaces all the remaining occurrences of string "MCA" with
":program:`llvm-mca`".  Somehow I missed those strings when I committed r338394.

This patch also improves section "Instruction Dispatch".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338881 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-03 12:44:56 +00:00
Hans Wennborg
e17bf01776 Clear release notes and update version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338556 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01 13:58:00 +00:00
Hans Wennborg
57bb7d2d70 Bump the trunk version to 8.0.0svn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338537 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01 13:25:30 +00:00
Matt Davis
8073c6502e [llvm-mca][docs] Replace "temporary" with "physical registers". NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338415 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 18:59:46 +00:00
Andrea Di Biagio
c122af5f3b [llvm-mca][docs] Improve the "How LLVM-MCA works" section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338410 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 18:19:15 +00:00
Andrea Di Biagio
c49e38382f [llvm-mca][docs] Always use llvm-mca in place of MCA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338394 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 15:29:10 +00:00
Matt Davis
d08e6c74a6 [llvm-mca][docs] Add instruction flow documentation. NFC.
Summary:
This patch mostly copies the existing Instruction Flow, and stage descriptions
from the mca README.  I made a few text tweaks, but no semantic changes,
and made reference to the "default pipeline."  I also removed the internals
references (e.g., reference to class names and header files).  I did leave the
LSUnit name around, but only as an abbreviated word for the load-store unit.


Reviewers: andreadb, courbet, RKSimon, gbedwell, filcab

Reviewed By: andreadb

Subscribers: tschuett, jfb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338319 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 22:30:14 +00:00
Joel Galenson
aee71c080d [doc] Fix Getting Started typo.
This makes it easier for someone to copy-paste this line, change the path, and run the command.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338254 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 15:14:24 +00:00
Vedant Kumar
1731345785 [docs] Clarify role of DIExpressions within debug intrinsics
This should make the semantics of DIExpressions within llvm.dbg.{addr,
declare, value} easier to understand.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338182 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-28 00:33:47 +00:00
Dmitry Preobrazhensky
e2d5b7575f [AMDGPU][MC][DOC] Updated AMD GPU assembler description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338125 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 14:17:15 +00:00
Craig Topper
07cbe1baa3 [Docs] Remove hard tab character from code block in optbisect documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338105 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 06:54:13 +00:00
Duncan P. N. Exon Smith
235b4df870 ADT: Document advantages of SmallVector<T,0> over std::vector
In light of the recent changes to SmallVector in r335421, r337514, and
r337820, document its advantages over std::vector (see r175906 and
r266909).

Also add a release note.

https://reviews.llvm.org/D49748

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338071 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 21:29:54 +00:00
David Carlier
00c4d032c8 [Docs] Update of Xray page
Update of supported oses.

Reviewers: dberris

Reviewed By: dberris

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338003 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26 04:44:31 +00:00
Eli Friedman
25eb40c014 [LangRef] Clarify undefined behavior for function attributes.
Violating the invariants specified by attributes is undefined behavior.
Maybe we could use poison instead for some of the parameter attributes,
but I don't think it's worthwhile.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337947 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 18:26:38 +00:00
Andres Freund
c4c8d7b165 Add PerfJITEventListener for perf profiling support.
This new JIT event listener supports generating profiling data for
the linux 'perf' profiling tool, allowing it to generate function and
instruction level profiles.

Currently this functionality is not enabled by default, but must be
enabled with LLVM_USE_PERF=yes.  Given that the listener has no
dependencies, it might be sensible to enable by default once the
initial issues have been shaken out.

I followed existing precedent in registering the listener by default
in lli. Should there be a decision to enable this by default on linux,
that should probably be changed.

Please note that until https://reviews.llvm.org/D47343 is resolved,
using this functionality with mcjit rather than orcjit will not
reliably work.

Disregarding the previous comment, here's an example:

$ cat /tmp/expensive_loop.c

bool stupid_isprime(uint64_t num)
{
        if (num == 2)
                return true;
        if (num < 1 || num % 2 == 0)
                return false;
        for(uint64_t i = 3; i < num / 2; i+= 2) {
                if (num % i == 0)
                        return false;
        }
        return true;
}

int main(int argc, char **argv)
{
        int numprimes = 0;

        for (uint64_t num = argc; num < 100000; num++)
        {
                if (stupid_isprime(num))
                        numprimes++;
        }

        return numprimes;
}

$ clang -ggdb -S -c -emit-llvm /tmp/expensive_loop.c -o
/tmp/expensive_loop.ll

$ perf record -o perf.data -g -k 1 ./bin/lli -jit-kind=mcjit /tmp/expensive_loop.ll 1

$ perf inject --jit -i perf.data -o perf.jit.data

$ perf report -i perf.jit.data
-   92.59%  lli      jitted-5881-2.so                   [.] stupid_isprime
     stupid_isprime
     main
     llvm::MCJIT::runFunction
     llvm::ExecutionEngine::runFunctionAsMain
     main
     __libc_start_main
     0x4bf6258d4c544155
+    0.85%  lli      ld-2.27.so                         [.] do_lookup_x

And line-level annotations also work:
       │              for(uint64_t i = 3; i < num / 2; i+= 2) {
       │1 30:   movq   $0x3,-0x18(%rbp)
  0.03 │1 38:   mov    -0x18(%rbp),%rax
  0.03 │        mov    -0x10(%rbp),%rcx
       │        shr    $0x1,%rcx
  3.63 │     ┌──cmp    %rcx,%rax
       │     ├──jae    6f
       │     │                if (num % i == 0)
  0.03 │     │  mov    -0x10(%rbp),%rax
       │     │  xor    %edx,%edx
 89.00 │     │  divq   -0x18(%rbp)
       │     │  cmp    $0x0,%rdx
  0.22 │     │↓ jne    5f
       │     │                        return false;
       │     │  movb   $0x0,-0x1(%rbp)
       │     │↓ jmp    73
       │     │        }
  3.22 │1 5f:│↓ jmp    61
       │     │        for(uint64_t i = 3; i < num / 2; i+= 2) {

Subscribers: mgorny, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337789 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 00:54:06 +00:00
Matt Davis
e6aaf315db [llvm-mca][docs] Define IPC where it is first mentioned. NFC.
Expand the abbreviation where it is first used, and use IPC elsewhere.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337739 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 21:10:50 +00:00
Michael J. Spencer
d24baad0e0 Revert "[docs] Add support for Markdown documentation in Sphinx"
Looks like this bot hasn't been updated yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337731 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 20:00:32 +00:00
Michael J. Spencer
3acc560454 [docs] Add support for Markdown documentation in Sphinx
Differential Revision: https://reviews.llvm.org/D44910

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337730 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 19:49:34 +00:00
Jonas Devlieghere
e148741432 [Docs] Fix LLVM_YAML_IS_DOCUMENT_LIST_VECTOR
The docs incorrectly said to repeat std::vector inside
LLVM_YAML_IS_DOCUMENT_LIST_VECTOR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337695 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 14:17:43 +00:00
Matt Davis
bdf2ac006f [llvm-mca][docs] Add documentation for the statistic outputs from mca. NFC
Summary: The original text was lifted from the MCA README.  I re-ran the dot-product example and updated the output seen in the docs.  I also added a few paragraphs discussing the instruction issued and retired histograms, as well as discussing the register file stats.

Reviewers: andreadb, RKSimon, courbet, gbedwell, filcab

Reviewed By: andreadb

Subscribers: tschuett

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337648 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-21 18:32:47 +00:00
George Karpenkov
4571da68d1 [FileCheck] Provide an option for FileCheck to dump original input to stderr on failure
The option can be either set using environment variable (e.g. env
FILECHECK_DUMP_INPUT_ON_FAILURE=1 ninja check-fuzzer) or with a
FileCheck flag.

This can be extremely useful for debugging, cf.
https://groups.google.com/forum/#!topic/llvm-dev/kLrzg8OM_h8 for
discussion.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337609 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20 20:21:57 +00:00
Michael J. Spencer
40d8d2b15d Revert "[docs] Add support for Markdown documentation in Sphinx"
The buildbots have an old version of Sphinx (need at least 1.3).  Revert until they are upgraded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337513 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20 00:24:36 +00:00
Michael J. Spencer
fc13800112 [docs] Add support for Markdown documentation in Sphinx
Differential Revision: https://reviews.llvm.org/D44910

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337509 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19 23:40:58 +00:00
Matt Davis
e05bab28b6 [llvm-mca][docs] Add Timeline and How MCA works.
For the most part, these changes were from the RFC.  I made a few minor
word/structure changes, but nothing significant.  I also regenerated the
example output, and adjusted the text accordingly.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337496 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19 20:33:59 +00:00
Matt Morehouse
5b81b48075 [libFuzzer] Update documentation regarding MSan.
Summary: -fsanitize=fuzzer,memory now works out-of-the-box.

Reviewers: kcc

Reviewed By: kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337476 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19 17:59:11 +00:00
Anastasis Grammenos
629edfbb7a [Docs] Testing Debug Info Preservation in Optimizations
Differential Revision: https://reviews.llvm.org/D49053

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337457 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19 14:08:54 +00:00
David Green
91823932bd [UnJ] Document unroll and jam pass and loop metadata
Add some quick words for unroll and jam to the list of passes and add
unroll_and_jam metadata to the language ref.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337448 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19 12:37:00 +00:00
Teresa Johnson
7f233b7000 [docs] Update GoldPlugin documentation
Summary:
Updated and reorganized. Made the following additions:
1) How to see if ld.gold is installed, and whether it is the current
default.
2) How to install ld.gold as the default or alternatively use
-fuse-ld=gold.
3) Move the part about installing the newly built ld-new as the default
to the prior section and how to use --enable-gold=default to do it
automatically on install.
4) Add a note about ld.bfd supporting plugins but indicate that it is
not tested by the LLVM project and gold is the recommended linker for
use with the gold plugin.

Fixes PR32760.

Reviewers: davide

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337404 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18 17:10:17 +00:00
Chandler Carruth
f32280c8cd [x86/SLH] Add the design document for Speculative Load Hardening,
a Spectre v1 mitigation.

This was initially posted w/ the patch implementing this, got some basic
review there. Also, it is generated from a the Google doc that I shared
as part of the Speculative Load Hardening RFC and which has seen pretty
widespread review at this point.

However, as the patches are landing in LLVM, I wanted to land the docs
as well. But it seemed like a bad idea to have them in the same commit
in case of reverts or other things. So the docs are split out here.

Thanks for all the review so far, and further review and improvements to
the documentation here welcome. Please feel free to keep hammering on
the code review or Google document.

Note that this is a markdown document which Sphinx doesn't yet process.
But we can add support for that after and this should get picked up
(and I'm preparing patches for that). Also, this gets the document
itself into a nice shared place where we can iterate on it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337391 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18 14:05:14 +00:00
Peter Collingbourne
a29ff2e0f9 MC: Implement support for new .addrsig and .addrsig_sym directives.
Part of the address-significance tables proposal:
http://lists.llvm.org/pipermail/llvm-dev/2018-May/123514.html

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337328 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17 22:17:18 +00:00
Eli Friedman
48ef58e6c1 [LangRef] Clarify semantics of load metadata.
We need to explicitly state what happens when an invariant promised by
load metadata is violated at runtime, since it's come up repeatedly.

It's possible we want to specify that the result of the load is poison
in some cases, rather than undefined behavior, if the constraint is
violated. That would allow preserving the metadata when the load is
hoisted, but doesn't allow propagating metadata based on control flow.
We currently do transforms based on control flow for nonnull metadata
(in PromoteMemToReg).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337325 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17 20:38:11 +00:00
Eli Friedman
9ff02efe80 [LangRef] nnan and ninf produce poison.
Clarify that violating nnan and ninf can lead to undefined behavior.
This allows more aggressive optimizations based on those assumptions.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337323 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17 20:31:42 +00:00
Eli Friedman
1ea502b3c1 [LangRef] Clarify which fast-math flags affect fcmp.
nsz has no effect due to the way fcmp is defined; +0 and -0 compare
equal anyway. reassoc could have the obvious effect.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337322 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17 20:28:31 +00:00
Matt Davis
95e53c2889 [llvm-mca][docs] Revert mca internals docs.
We're going to work on this in a separate review focusing more on documenting
the View and probably removing some of the less-interesting/less-useful pieces.

This reverts r337219,337225



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337295 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17 16:11:54 +00:00
Matt Davis
40b80a4e12 [llvm-mca][docs] Add notes about cycle and resource callbacks. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337225 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16 23:50:53 +00:00
Sanjay Patel
bb12f48c1c [Intrinsics] define funnel shift IR intrinsics + DAG builder support
As discussed here:
http://lists.llvm.org/pipermail/llvm-dev/2018-May/123292.html
http://lists.llvm.org/pipermail/llvm-dev/2018-July/124400.html

We want to add rotate intrinsics because the IR expansion of that pattern is 4+ instructions, 
and we can lose pieces of the pattern before it gets to the backend. Generalizing the operation 
by allowing 2 different input values (plus the 3rd shift/rotate amount) gives us a "funnel shift" 
operation which may also be a single hardware instruction.

Initially, I thought we needed to define new DAG nodes for these ops, and I spent time working 
on that (much larger patch), but then I concluded that we don't need it. At least as a first 
step, we have all of the backend support necessary to match these ops...because it was required. 
And shepherding these through the IR optimizer is the primary concern, so the IR intrinsics are 
likely all that we'll ever need.

There was also a question about converting the intrinsics to the existing ROTL/ROTR DAG nodes
(along with improving the oversized shift documentation). Again, I don't think that's strictly 
necessary (as the test results here prove). That can be an efficiency improvement as a small 
follow-up patch.

So all we're left with is documentation, definition of the IR intrinsics, and DAG builder support. 

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337221 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16 22:59:31 +00:00
Matt Davis
9dce11c0cf [llvm-mca][docs] Initial description of mca internals. NFC
This patch introduces a brief description of the components of MCA.  The main
focus is on Views.   This is a work in progress, and more descriptions will be
introduced later.  I want to flesh-out the Views section more and provide a
detailed description of eventing in MCA.  Eventually a brief code example of a
View should accompany the description.

Also, we should consider moving the MCA internals guide elsewhere at some point.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337219 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16 21:42:58 +00:00
Joel Galenson
e27b1d0b0f [cfi-verify] Abort on unsupported targets
As suggested in the review for r337007, this makes cfi-verify abort on unsupported targets instead of producing incorrect results.  It also updates the design document to reflect this.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337181 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16 15:26:44 +00:00
Vedant Kumar
1c00edf2e4 [docs] Update usage directive for llvm-cov report -show-functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337062 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13 22:39:31 +00:00
Joel E. Denny
9074a87ea5 [FileCheck] Implement -v and -vv for tracing matches
-v prints all directive pattern matches.

-vv additionally prints info that might be noise to users but that can
be helpful to FileCheck developers.

To maximize code reuse and to make diagnostics more consistent, this
patch also adjusts and extends some of the existing diagnostics.
CHECK-NOT failures now report variables uses.  Many more diagnostics
now report the check prefix and kind of directive.

Reviewed By: probinson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336967 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13 03:08:23 +00:00
Joel E. Denny
0195c0bee9 [FileCheck] Don't permit overlapping CHECK-DAG
That is, make CHECK-DAG skip matches that overlap the matches of any
preceding consecutive CHECK-DAG directives.  This change makes
CHECK-DAG more consistent with other directives, and there is evidence
it makes CHECK-DAG more intuitive and less error-prone.  See the RFC
discussion starting at:

  http://lists.llvm.org/pipermail/llvm-dev/2018-May/123010.html

Moreover, this behavior enables CHECK-DAG groups for unordered,
non-unique strings or patterns.  For example, it is useful for
verifying output or logs from a parallel program, such as the OpenMP
runtime.

This patch also implements the command-line option
-allow-deprecated-dag-overlap, which reverts CHECK-DAG to the old
overlapping behavior.  This option should not be used in new tests.
It is meant only for the existing tests that are broken by this change
and that need time to update.

See the following bugzilla issue for tracking of such tests:

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

Patches to add -allow-deprecated-dag-overlap to those tests will
follow immediately.

Reviewed By: probinson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336847 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 20:27:27 +00:00
Teresa Johnson
ea13527137 Revert "[docs] As of binutils 2.21.51.0.2, ld.bfd supports plugins too, represent this in docs"
This reverts commit r306102.

This change was made without any review, and has a couple of issues.
First, AFAIK we do not test the combination of the LLVM gold plugin with
ld.bfd. Second, the change removed documentation for how to build gold
and replaced it with instructions for building ld.bfd.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336841 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 20:08:32 +00:00
Joel E. Denny
0e8a665664 Revert r336830: [FileCheck] Don't permit overlapping CHECK-DAG
Companion patches are failing to commit, and this patch alone breaks
many tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336833 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 19:03:00 +00:00
Joel E. Denny
c642c1b4d7 [FileCheck] Don't permit overlapping CHECK-DAG
That is, make CHECK-DAG skip matches that overlap the matches of any
preceding consecutive CHECK-DAG directives.  This change makes
CHECK-DAG more consistent with other directives, and there is evidence
it makes CHECK-DAG more intuitive and less error-prone.  See the RFC
discussion starting at:

  http://lists.llvm.org/pipermail/llvm-dev/2018-May/123010.html

Moreover, this behavior enables CHECK-DAG groups for unordered,
non-unique strings or patterns.  For example, it is useful for
verifying output or logs from a parallel program, such as the OpenMP
runtime.

This patch also implements the command-line option
-allow-deprecated-dag-overlap, which reverts CHECK-DAG to the old
overlapping behavior.  This option should not be used in new tests.
It is meant only for the existing tests that are broken by this change
and that need time to update.

See the following bugzilla issue for tracking of such tests:

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

Patches to add -allow-deprecated-dag-overlap to those tests will
follow immediately.

Reviewed By: probinson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336830 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 18:42:58 +00:00
Simon Tatham
9cfd4e5408 [TableGen] Add a general-purpose JSON backend.
The aim of this backend is to output everything TableGen knows about
the record set, similarly to the default -print-records backend. But
where -print-records produces output in TableGen's input syntax
(convenient for humans to read), this backend produces it as
structured JSON data, which is convenient for loading into standard
scripting languages such as Python, in order to extract information
from the data set in an automated way.

The output data contains a JSON representation of the variable
definitions in output 'def' records, and a few pieces of metadata such
as which of those definitions are tagged with the 'field' prefix and
which defs are derived from which classes. It doesn't dump out
absolutely every piece of knowledge it _could_ produce, such as type
information and complicated arithmetic operator nodes in abstract
superclasses; the main aim is to allow consumers of this JSON dump to
essentially act as new backends, and backends don't generally need to
depend on that kind of data.

The new backend is implemented as an EmitJSON() function similar to
all of llvm-tblgen's other EmitFoo functions, except that it lives in
lib/TableGen instead of utils/TableGen on the basis that I'm expecting
to add it to clang-tblgen too in a future patch.

To test it, I've written a Python script that loads the JSON output
and tests properties of it based on comments in the .td source - more
or less like FileCheck, except that the CHECK: lines have Python
expressions after them instead of textual pattern matches.

Reviewers: nhaehnle

Reviewed By: nhaehnle

Subscribers: arichardson, labath, mgorny, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336771 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 08:40:19 +00:00
Eli Friedman
ca52117265 [LangRef] Clarify alloca of zero bytes.
Let's be conservative here; it matches what we actually implemented, and
it should be rare in practice anyway.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336744 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 00:02:01 +00:00
Manoj Gupta
c6da6867a1 llvm: Add support for "-fno-delete-null-pointer-checks"
Summary:
Support for this option is needed for building Linux kernel.
This is a very frequently requested feature by kernel developers.

More details : https://lkml.org/lkml/2018/4/4/601

GCC option description for -fdelete-null-pointer-checks:
This Assume that programs cannot safely dereference null pointers,
and that no code or data element resides at address zero.

-fno-delete-null-pointer-checks is the inverse of this implying that
null pointer dereferencing is not undefined.

This feature is implemented in LLVM IR in this CL as the function attribute
"null-pointer-is-valid"="true" in IR (Under review at D47894).
The CL updates several passes that assumed null pointer dereferencing is
undefined to not optimize when the "null-pointer-is-valid"="true"
attribute is present.

Reviewers: t.p.northover, efriedma, jyknight, chandlerc, rnk, srhines, void, george.burgess.iv

Reviewed By: efriedma, george.burgess.iv

Subscribers: eraman, haicheng, george.burgess.iv, drinkcat, theraven, reames, sanjoy, xbolva00, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336613 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-09 22:27:23 +00:00
George Burgess IV
401e29e8b7 Make llvm.objectsize more conservative with null
In non-zero address spaces, we were reporting that an object at `null`
always occupies zero bytes. This is incorrect in many cases, so just
return `unknown` in those cases for now.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336611 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-09 22:21:16 +00:00
Dave Lee
629c9d30eb nm: Add -no-weak flag for hiding weak symbols
Summary:
This adds a new -no-weak flag to nm to hide weak symbols in its output.
This also adds a -W alias for this which is analogous to -U.

Patch by Keith Smiley

Reviewers: kastiglione, enderby, compnerd

Reviewed By: kastiglione

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336126 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-02 17:24:37 +00:00
Piotr Padlewski
c2f24d9ea8 Implement strip.invariant.group
Summary:
This patch introduce new intrinsic -
strip.invariant.group that was described in the
RFC: Devirtualization v2

Reviewers: rsmith, hfinkel, nlopes, sanjoy, amharc, kuhar

Subscribers: arsenm, nhaehnle, JDevlieghere, hiraditya, xbolva00, llvm-commits

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

Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336073 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-02 04:49:30 +00:00
Paul Robinson
4fc1c001a7 Document the git config for Windows to do line-endings correctly.
Differential Revision: https://reviews.llvm.org/D48494

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335775 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-27 19:58:28 +00:00
James Henderson
3e90a9b8c8 Fix doc title underlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335615 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-26 15:29:09 +00:00
James Henderson
583ccd4384 [FileCheck] Add CHECK-EMPTY directive for checking for blank lines
Prior to this change, there was no clean way of getting FileCheck to
check that a line is completely empty. The expected way of using
"CHECK: {{^$}}" does not work because the '^' matches the end of the
previous match (this behaviour may be desirable in certain instances).
For the same reason, "CHECK-NEXT: {{^$}}" will fail when the previous
match was at the end of the line, as the pattern will match there.
Using the recommended [[:space:]] to match an explicit new line could
also match a space, and thus is not always desired. Literal '\n'
matches also do not work. A workaround was suggested in the review, but
it is a little clunky.

This change adds a new directive that behaves the same as CHECK-NEXT,
except that it only matches against empty lines (nothing, not even
whitespace, is allowed). As with CHECK-NEXT, it will fail if more than
one newline occurs before the next blank line. Example usage:
; test.txt
foo

bar
; CHECK: foo
; CHECK-EMPTY:
; CHECK-NEXT: bar

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

Reviewed by: probinson


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335613 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-26 15:15:45 +00:00
Fangrui Song
5223dab9be [docs] Update doc after split of -gen-intrinsic in r335407
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335515 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-25 19:40:08 +00:00
Konstantin Zhuravlyov
d6794f0ba7 AMDHSA: Put old assembler docs back
Until we switch to code object v3 by default.
Follow up for https://reviews.llvm.org/D47736.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335378 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-22 19:23:18 +00:00
Scott Linder
43cbf8d92e [AMDGPU] Update assembler for HSA Code Object v3
Update AMDGPU assembler syntax behind the code-object-v3 feature:

* Replace/rename most AMDGPU assembler directives/symbols and document them.
* Provide more diagnostics (e.g. values out of range, missing values, repeated
  values).
* Provide path for backwards compatibility, even with underlying descriptor
  changes.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335281 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-21 19:38:56 +00:00
Konstantin Zhuravlyov
3316883bba AMDGPU/AMDHSA: Remove GridWorkGroupCountX/Y/Z
and everything that comes with it from implementation
and v3 header files.

Leave definition in v2 header files for backwards
compatibility.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335267 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-21 18:36:04 +00:00
Nicolai Haehnle
2b1cd517a0 TableGen/SearchableTables: Support more generic enums and tables
Summary:
This is essentially a rewrite of the backend which introduces TableGen
base classes GenericEnum, GenericTable, and SearchIndex. They allow
generating custom enums and tables with lookup functions using
separately defined records as the underlying database.

Also added as part of this change:

- Lookup functions may use indices composed of multiple fields.

- Instruction fields are supported similar to Intrinsic fields.

- When the lookup key has contiguous numeric values, the lookup
  function will directly index into the table instead of using a binary
  search.

The existing SearchableTable functionality is internally mapped to the
new primitives.

Change-Id: I444f3490fa1dbfb262d7286a1660a2c4308e9932

Reviewers: arsenm, tra, t.p.northover

Subscribers: wdng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335225 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-21 13:36:22 +00:00
Kuba Mracek
9808fe2d20 [llvm] Document "%T" as deprecated in TestingGuide.rst
Differential Revision: https://reviews.llvm.org/D48189



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335080 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-19 22:22:48 +00:00
Saleem Abdulrasool
b07f54afdc docs: document CodeView directives
Add documentation for assembler directives added to support CodeView
emission.

Patch by Ellis Hoag!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335058 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-19 16:47:31 +00:00
Simon Pilgrim
6cc4ab33f0 [docs] Fix indentation of llvm-exegesis command line arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334976 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-18 20:05:02 +00:00
Clement Courbet
288479f35c [llvm-exegesis] Optionally ignore instructions without a sched class.
Summary: See PR37602.

Reviewers: RKSimon

Subscribers: llvm-commits, tschuett

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334932 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-18 11:27:47 +00:00
Hiroshi Inoue
96dcb6683e [NFC] fix trivial typos in documents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334799 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 05:10:09 +00:00
Eli Friedman
caa16eabb4 Make uitofp and sitofp defined on overflow.
IEEE 754 defines the expected result on overflow. As far as I know,
hardware implementations (of f16), and compiler-rt (__floatuntisf)
correctly return +-Inf on overflow. And I can't think of any useful
transform that would take advantage of overflow being undefined here.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334777 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-14 22:58:48 +00:00
Tony Tye
978dec7518 [AMDGPU] Document the AMDGPU LLVM attributes
Differential Revision: https://reviews.llvm.org/D48101


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334733 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-14 16:40:10 +00:00
Simon Dardis
385d0da89c [docs] Update CompilerWriterInfo.rst for MIPS
Update the URL of where the documentation can be found.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334720 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-14 15:16:37 +00:00
Hans Wennborg
83f6dc20df GettingStarted.rst: Fix 'If you you' typo (PR37787)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334584 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-13 09:11:10 +00:00
Konstantin Zhuravlyov
299cf5ff6a AMDHSA: Code object v3 updates
- Do not emit following assembler directives:
  - .hsa_code_object_version
  - .hsa_code_object_isa
  - .amd_amdgpu_isa
  - .amd_amdgpu_hsa_metadata
  - .amd_amdgpu_pal_metadata
- Do not emit .note entries
- Cleanup and bring in sync kernel descriptor header file
- Emit kernel descriptor into .rodata with appropriate relocations and
  alignments



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334519 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-12 18:02:46 +00:00
Eli Friedman
c035816d76 [LangRef] fptosi and fptoui return poison on overflow.
I think we assume poison, not undef, for certain transforms we
currently do. In any case, we should clarify the language here.

(This sort of conversion is undefined behavior according to the C
and C++ standards. And in practice, hardware implementations handle
overflow inconsistently, so it would be difficult to define the
result here.)

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334326 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-08 21:33:33 +00:00
Eli Friedman
0d3cb776cc [LangRef] insertelement/extractelement return poison for out of range.
We need to clarify the language here. I think poison makes more sense
than undef, since it's an undefined operation rather than uninitialized
memory. I don't think anything depends on the difference at the moment,
though.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334325 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-08 21:23:09 +00:00
David Carlier
a8e3af5192 [docs] add various sanitisers support for FreeBSD/OpenBSD
since couple of months, supports had been enabled for FreeBSD and OpenBSD.

Reviewers: thakis, spatel, dim

Reviewed By: dim

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334207 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-07 16:33:48 +00:00
Elena Demikhovsky
ed92eef976 Added documentation for Masked Vector Expanding Load and Compressing Store Intrinsics
Differential Revision: https://reviews.llvm.org/D26743



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334075 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-06 09:11:46 +00:00
Amaury Sechet
7436bb683e Get rid of SETCCE
Summary: It has been deprecated in favor of SETCCCARRY for a year now and isn't used by any in tree backend.

Reviewers: efriedma, craig.topper, dblaikie, bkramer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333939 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-04 18:36:22 +00:00
Nicola Zaghen
d74cc3fc39 [ReleaseNotes] Formatting fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333902 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-04 14:40:34 +00:00
Nicolai Haehnle
6b71fcbf26 TableGen: some LangRef doc fixes
Summary: Change-Id: I1442e2daa09cab727a01d8c31893b50e644a5cd3

Reviewers: tra, simon_tatham, craig.topper

Subscribers: llvm-commits

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

Change-Id: I397655dd18b7ff978c1affa3174740d9c1a82594

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333901 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-04 14:26:12 +00:00
Nicolai Haehnle
26db53e38e TableGen: Streamline the semantics of NAME
Summary:
The new rules are straightforward. The main rules to keep in mind
are:

1. NAME is an implicit template argument of class and multiclass,
   and will be substituted by the name of the instantiating def/defm.

2. The name of a def/defm in a multiclass must contain a reference
   to NAME. If such a reference is not present, it is automatically
   prepended.

And for some additional subtleties, consider these:

3. defm with no name generates a unique name but has no special
   behavior otherwise.

4. def with no name generates an anonymous record, whose name is
   unique but undefined. In particular, the name won't contain a
   reference to NAME.

Keeping rules 1&2 in mind should allow a predictable behavior of
name resolution that is simple to follow.

The old "rules" were rather surprising: sometimes (but not always),
NAME would correspond to the name of the toplevel defm. They were
also plain bonkers when you pushed them to their limits, as the old
version of the TableGen test case shows.

Having NAME correspond to the name of the toplevel defm introduces
"spooky action at a distance" and breaks composability:
refactoring the upper layers of a hierarchy of nested multiclass
instantiations can cause unexpected breakage by changing the value
of NAME at a lower level of the hierarchy. The new rules don't
suffer from this problem.

Some existing .td files have to be adjusted because they ended up
depending on the details of the old implementation.

Change-Id: I694095231565b30f563e6fd0417b41ee01a12589

Reviewers: tra, simon_tatham, craig.topper, MartinO, arsenm, javed.absar

Subscribers: wdng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333900 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-04 14:26:05 +00:00
Nicola Zaghen
fa47ca7777 [ReleaseNotes] Add release note for the new LLVM_DEBUG macro.
This is to provide a way to migrate from the old DEBUG macro to the new one.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333898 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-04 13:55:09 +00:00
Michael J. Spencer
56500c79d3 [MC] Add assembler support for .cg_profile.
Object FIle Representation
At codegen time this is emitted into the ELF file a pair of symbol indices and a weight. In assembly it looks like:

.cg_profile a, b, 32
.cg_profile freq, a, 11
.cg_profile freq, b, 20

When writing an ELF file these are put into a SHT_LLVM_CALL_GRAPH_PROFILE (0x6fff4c02) section as (uint32_t, uint32_t, uint64_t) tuples as (from symbol index, to symbol index, weight).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333823 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-02 16:33:01 +00:00
Sanjay Patel
3d9d207bb2 [LangRef] fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333770 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-01 15:21:14 +00:00
Clement Courbet
1a0db44625 [llvm-exegesis] Fix off-by-one in llvm-exegesis documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333759 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-01 14:49:06 +00:00
Amaury Sechet
876db10e96 Set ADDE/ADDC/SUBE/SUBC to expand by default
Summary:
They've been deprecated in favor of UADDO/ADDCARRY or USUBO/SUBCARRY for a while.

Target that uses these opcodes are changed in order to ensure their behavior doesn't change.

Reviewers: efriedma, craig.topper, dblaikie, bkramer

Subscribers: jholewinski, arsenm, jyknight, sdardis, nemanjai, nhaehnle, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, jordy.potman.lists, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, mgrang, atanasyan, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333748 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-01 13:21:33 +00:00
Joel E. Denny
1d95844557 [lit] Report line number for failed RUN command
(Relands r333584, reverted in 333592.)

When debugging test failures with -vv (or -v in the case of the
internal shell), this makes it easier to locate the RUN line that
failed.  For example, clang's test/Driver/linux-ld.c has 892 total RUN
lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines
after concatenation for line continuations.

When reading the generated shell script, this also makes it easier to
locate the RUN line that produced each command.

To support reporting RUN line numbers in the case of the internal
shell, this patch extends the internal shell to support the null
command, ":", except pipelines are not supported.

To support reporting RUN line numbers in the case of windows cmd.exe
as the external shell, this patch extends -vv to set "echo on" instead
of "echo off" in bat files.  (Support for windows cmd.exe as a lit
external shell will likely be dropped later, but I found out too
late.)

Reviewed By: delcypher,	asmith, stella.stamenova, jmorse, lebedev.ri, rnk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333614 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-31 00:55:32 +00:00
Joel E. Denny
22634021a1 Revert r333584: [lit] Report line number for failed RUN command
It breaks test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333592 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-30 21:07:27 +00:00
Joel E. Denny
e7c7bc039f [lit] Report line number for failed RUN command
(Relands r330755 (reverted in r330848) with fix for PR37239.)

When debugging test failures with -vv (or -v in the case of the
internal shell), this makes it easier to locate the RUN line that
failed.  For example, clang's test/Driver/linux-ld.c has 892 total RUN
lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines
after concatenation for line continuations.

When reading the generated shell script, this also makes it easier to
locate the RUN line that produced each command.

To support reporting RUN line numbers in the case of the internal
shell, this patch extends the internal shell to support the null
command, ":", except pipelines are not supported.

To support reporting RUN line numbers in the case of windows cmd.exe
as the external shell, this patch extends -vv to set "echo on" instead
of "echo off" in bat files.  (Support for windows cmd.exe as a lit
external shell will likely be dropped later, but I found out too
late.)

Reviewed By: delcypher,	asmith, stella.stamenova, jmorse, lebedev.ri, rnk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333584 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-30 19:42:27 +00:00
Konstantin Zhuravlyov
840f423383 AMDGPU: Always set COMPUTE_PGM_RSRC2.ENABLE_TRAP_HANDLER to zero for AMDHSA as
it is set by CP

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333451 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-29 19:09:13 +00:00
Fangrui Song
7cdb0e22c2 [LangRef] Fix TBAA example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333389 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-29 05:38:05 +00:00
Fangrui Song
2457cfc63a [LLVM-C] [OCaml] Remove LLVMAddBBVectorizePass
Summary: It was fully replaced back in 2014, and the implementation was removed 11 months ago by r306797.

Reviewers: hfinkel, chandlerc, whitequark, deadalnix

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333378 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-28 16:58:10 +00:00
Eric Christopher
4362e9efb4 Tidy some language in the xray documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333354 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-27 09:19:03 +00:00
Teresa Johnson
a9a2147997 [ThinLTO] Print module summary index to assembly
Summary:
Implements AsmWriter support for printing the module summary index to
assembly with the format discussed in the RFC "LLVM Assembly format for
ThinLTO Summary".

Implements just enough of the parsing support to recognize and ignore
the summary entries. As agreed in the RFC thread, this will be the
behavior when assembling the IR. A follow on change will implement
parsing/assembling of the summary entries for use by tools that
currently build the summary index from bitcode.

Reviewers: dexonsmith, pcc

Subscribers: inglorion, eraman, steven_wu, dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333335 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-26 02:34:13 +00:00
Clement Courbet
7273b3f127 [llvm-exegesis] Show sched class details in analysis.
Summary: And update docs.

Reviewers: gchatelet

Subscribers: tschuett, craig.topper, RKSimon, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333169 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-24 10:47:05 +00:00
Eli Friedman
ac1173dabd [docs] Clarify usage of "vector" in Programmer's Manual.
The explanation is specifically referring to std::vector; this might
not be clear from the context.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333036 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-22 22:58:47 +00:00
Clement Courbet
1e7d8b3507 [llvm-exegesis] Update doc to mention that the output is in html.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332980 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-22 13:36:29 +00:00
Hans Wennborg
1373401fc1 LangRef.rst: the "\01" prefix applies not just to variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332967 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-22 10:14:07 +00:00
Piotr Padlewski
6ebd054bb6 Dissallow non-empty metadata for invariant.group
Summary:
This feature is not needed, but it might be usefull in the future
to use metadata to mark what which function should support it
(and strip it when not).

Reviewers: rsmith, sanjoy, amharc, kuhar

Subscribers: hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332787 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-18 23:53:46 +00:00
Kostya Kortchinsky
5a95f873c1 [docs] Scudo documentation minor update
Summary:
Minor changes to reflect changes to the code that were not documented:
- `SCUDO_DEFAULT_OPTIONS` compile time way of defining options;
- MIPS added as a supported architecture;
- clarification on how to fully disable the Quarantine;
- rewording in a few places.

Reviewers: alekseyshl, flowerhack

Reviewed By: alekseyshl

Subscribers: sdardis, arichardson, atanasyan, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332736 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-18 17:02:35 +00:00
JF Bastien
145062e42d [NFC] update coding standard links to HTTPS
Update one link which redirected, and remove an Amazon ref.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332735 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-18 16:44:13 +00:00
Clement Courbet
2652053345 [llvm-exegesis] Improve documentation.
Summary:
- Better flag names.
- Fix flag reference in doc.
- Add usage examples in doc.

Fixes PR37497.

Reviewers: gchatelet

Subscribers: llvm-commits, tschuett

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332708 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-18 12:33:57 +00:00
Simon Pilgrim
49f3003c7f Fix typo in declaring code-block snippet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332630 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-17 16:58:42 +00:00
Andrea Di Biagio
a1fecd54c5 [llvm-mca] Add an example showing how to get Intel assembly syntax
Patch by Jeff Muizelaar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332627 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-17 16:48:53 +00:00
Andrea Di Biagio
acf3f6ed48 [llvm-mca] add flag -all-views and flag -all-stats.
Flag -all-views enables all the views.
Flag -all-stats enables all the views that print hardware statistics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332602 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-17 12:27:03 +00:00
Tony Tye
b994738de7 [AMDGPU] Change llvm.debugtrap to be a debug breakpoint that can resume execution.
No longer require the queue pointer to be passed in in fixed SGPRs.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332485 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-16 16:19:34 +00:00
Nicola Zaghen
8d9ab7e57d Docs: Fix the title underline too short.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332245 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-14 13:54:39 +00:00
Nicola Zaghen
0818e789cb Rename DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
- Manual change to APInt
- Manually chage DOCS as regex doesn't match it.

In the transition period the DEBUG() macro is still present and aliased
to the LLVM_DEBUG() one.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332240 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-14 12:53:11 +00:00
Nico Weber
86a524c901 fix path to llvm-cfi-verify unittests in docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331836 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-09 01:15:06 +00:00
Stephane Sezer
d60939522e [docs] Fix a typo in KaleidoscopeJIT tutorial
Summary: Just a missing end quote.

Reviewers: lhames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331794 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-08 18:43:27 +00:00
Dean Michael Berris
de00b9f070 [XRay][compiler-rt+docs] Introduce __xray_log_init_mode(...).
Summary:
This addresses http://llvm.org/PR36790.

The change Deprecates a number of functions and types in
`include/xray/xray_log_interface.h` to recommend using string-based
configuration of XRay through the __xray_log_init_mode(...) function. In
particular, this deprecates the following:

- `__xray_set_log_impl(...)` -- users should instead use the
`__xray_log_register_mode(...)` and `__xray_log_select_mode(...)` APIs.

- `__xray_log_init(...)` -- users should instead use the
`__xray_log_init_mode(...)` function, which also requires using the
`__xray_log_register_mode(...)` and `__xray_log_select_mode(...)`
functionality.

- `__xray::FDRLoggingOptions` -- in following patches, we'll be
migrating the FDR logging implementations (and tests) to use the
string-based configuration. In later stages we'll remove the
`__xray::FDRLoggingOptions` type, and ask users to migrate to using the
string-based configuration mechanism instead.

- `__xray::BasicLoggingOptions` -- same as `__xray::FDRLoggingOptions`,
we'll be removing this type later and instead rely exclusively on the
string-based configuration API.

We also update the documentation to reflect the new advice and remove
some of the deprecated notes.

Reviewers: eizan, kpw, echristo, pelikan

Reviewed By: kpw

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331503 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-04 06:01:12 +00:00
Piotr Padlewski
9648b46325 Rename invariant.group.barrier to launder.invariant.group
Summary:
This is one of the initial commit of "RFC: Devirtualization v2" proposal:
https://docs.google.com/document/d/16GVtCpzK8sIHNc2qZz6RN8amICNBtvjWUod2SujZVEo/edit?usp=sharing

Reviewers: rsmith, amharc, kuhar, sanjoy

Subscribers: arsenm, nhaehnle, javed.absar, hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331448 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-03 11:03:01 +00:00
Adrian Prantl
0b24b74655 Remove @brief commands from doxygen comments, too.
This is a follow-up to r331272.

We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by
  for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done

https://reviews.llvm.org/D46290

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331275 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-01 16:10:38 +00:00
Nico Weber
4833be099d Stop setting LLVM_ON_WIN32 in config.h and llvm-config.h.
See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.

I replaced all uses of LLVM_ON_WIN32 with _WIN32 in r331127 (llvm),
r331069 (clang), r329697 (lldb), r329696 (lld), r329696 (clang-tools-extra).

If your out-of-tree program used LLVM_ON_WIN32, just use _WIN32 instead, which
is set at exactly the same time to exactly the same value.

https://reviews.llvm.org/D46264


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331224 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-30 20:19:48 +00:00
Matt Arsenault
ac9b3ef76a AMDGPU: Add Vega12 and Vega20
Changes by
  Matt Arsenault
  Konstantin Zhuravlyov

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331215 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-30 19:08:16 +00:00
Sanjay Patel
f95322c9b7 [DAGCombiner] rename function attribute for disabling ftrunc transform
This is the matching name change for the Clang patch at:
D46236
rL331209

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331210 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-30 18:20:33 +00:00
Gabor Buella
7c84ee231b NFC - Typo fixes lib/VMCore -> lib/IR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331166 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-30 10:18:11 +00:00
Nico Weber
63033d33c8 s/LLVM_ON_WIN32/_WIN32/, llvm
LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too.  Just use the
default macro instead of a reinvented one.

See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.
No intended behavior change.

This moves over all uses of the macro, but doesn't remove the definition
of it in (llvm-)config.h yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331127 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-29 00:45:03 +00:00
Sanjay Patel
534e40103f [docs] add fp-cast-overflow-workaround options to release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331059 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-27 16:33:35 +00:00
Sanjay Patel
5fad6ea6c2 [docs] provide the specific sanitizer option to detect junk-in-the-ftrunc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330958 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-26 17:04:07 +00:00
Reid Kleckner
8bd0ee70da Revert r330755 "[lit] Report line number for failed RUN command"
It is causing many tests to fail on Windows buildbots:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/10211

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330848 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-25 17:30:00 +00:00
Andrea Di Biagio
e508042fca [llvm-mca] Default to the native host cpu if flag -mcpu is not specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330809 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-25 10:18:25 +00:00
Mandeep Singh Grang
727ef0e543 [docs] Add a note on non-deterministic sorting order of equal elements
Reviewers: RKSimon, t.p.northover, dexonsmith

Reviewed By: RKSimon

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330773 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-24 21:25:57 +00:00
Joel E. Denny
c2a684aafa [lit] Report line number for failed RUN command
When debugging test failures with -vv (or -v in the case of the
internal shell), this makes it easier to locate the RUN line that
failed.  For example, clang's test/Driver/linux-ld.c has 892 total RUN
lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines
after concatenation for line continuations.

When reading the generated shell script, this also makes it easier to
locate the RUN line that produced each command.

To support reporting RUN line numbers in the case of the internal
shell, this patch extends the internal shell to support the null
command, ":", except pipelines are not supported.

Reviewed By: asmith, delcypher

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330755 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-24 18:43:25 +00:00
Nico Weber
70f3bbf514 Remove LLVM_INSTALL_CCTOOLS_SYMLINKS
It used to symlink dsymutil to llvm-dsymutil, but after r327790 llvm's dsymutil
binary is now called dsymutil without prefix.

r327792 then reversed the direction of the symlink if
LLVM_INSTALL_CCTOOLS_SYMLINKS was set, but that looks like a buildfix and not
like something anyone should need.

https://reviews.llvm.org/D45966


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330727 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-24 15:41:02 +00:00
Andrea Di Biagio
97ee2baf09 [llvm-mca][CommandGuide] Fix typo in example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330703 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-24 10:09:32 +00:00
Marianne Mailhot-Sarrasin
75dd90ec3a [doc] Removed obsolete -count-aa from AliasAnalysis documentation
Summary:
This patch removes references to AliasAnalysisCounter pass from the AliasAnalysis documentation. That pass have been eliminated in 2015, at revision trunk@247167.

Reviewed By: hfinkel

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330590 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 13:45:28 +00:00
Simon Tatham
0a556c8c15 Fix BNF nits in TableGen language reference.
Summary:
In the course of writing an experimental ANTLR grammar based on this
document, I found three errors in the documented BNF:

SimpleValues of dag type are allowed to have no operands at all after
the initial DagArg specifying the operator. For example, the value
(outs) is extremely common in backends; an example in the test suite
is test/TableGen/AsmVariant.td line 30. But the BNF doesn't allow
DagArgList to expand to the empty string (it must contain at least one
DagArg), and therefore the DagArgList specifying the operands in the
dag-shaped production for SimpleValue should be optional.

In the production for BodyItem with a 'let' and an optional RangeList,
the RangeList should have braces around it if it's present, matching
code such as "let E{7-0} = ..." on test/TableGen/BitsInit.td line 42.
Those braces aren't included in the RangeList nonterminal itself, so
instead they need to be part of the optional segment of the BodyItem
production.

Finally, the identifier after 'defm' should be optional. Again, this
is very common in the real back end .td files; an example in the test
suite is in test/TableGen/defmclass.td line 49.

Reviewers: rengolin, nhaehnle, stoklund

Reviewed By: nhaehnle

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330570 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 09:15:47 +00:00
Simon Tatham
1b68b2eca5 Test commit access.
Should be a harmless trimming of trailing whitespace from a
documentation file.

(There are other instances of trailing whitespace in this file alone.
I've only fixed one of them, on the basis that that way the rest are
still available for other people's commit-access tests :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330567 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 08:41:53 +00:00
Sanjay Patel
f02c6abfc7 [DAGCombine] (float)((int) f) --> ftrunc (PR36617)
This was originally committed at rL328921 and reverted at rL329920 to
investigate failures in Chrome. This time I've added to the ReleaseNotes
to warn users of the potential of exposing UB and let me repeat that
here for more exposure:

  Optimization of floating-point casts is improved. This may cause surprising
  results for code that is relying on undefined behavior. Code sanitizers can
  be used to detect affected patterns such as this:

    int main() {
      float x = 4294967296.0f;
      x = (float)((int)x);
      printf("junk in the ftrunc: %f\n", x);
      return 0;
    }

    $ clang -O1 ftrunc.c -fsanitize=undefined ; ./a.out
    ftrunc.c:5:15: runtime error: 4.29497e+09 is outside the range of 
                   representable values of type 'int'
    junk in the ftrunc: 0.000000


Original commit message:

fptosi / fptoui round towards zero, and that's the same behavior as ISD::FTRUNC,
so replace a pair of casts with the equivalent node. We don't have to account for
special cases (NaN, INF) because out-of-range casts are undefined.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330437 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-20 15:07:55 +00:00
Tony Tye
efcdcc2677 [AMDGPU] Add gfx902 product names
Differential Revision: https://reviews.llvm.org/D45609


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330081 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-14 01:58:10 +00:00
Tony Tye
f0a27cc4cc [AMDGPU] Update relocation record description
Document which relocation records are static and dynamic.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329981 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-13 01:01:27 +00:00
Hiroshi Inoue
ef1bc2d3ca [NFC] fix trivial typos in documents and comments
"is is" -> "is", "if if" -> "if", "or or" -> "or"



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329878 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-12 05:53:20 +00:00
Andrea Di Biagio
900cf755f0 [llvm-mca] Renamed BackendStatistics to RetireControlUnitStatistics.
Also, removed flag -verbose in favor of flag -retire-stats.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329794 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-11 12:12:53 +00:00
Andrea Di Biagio
2d438c016c [llvm-mca] Move the logic that prints scheduler statistics from BackendStatistics to its own view.
Added flag -scheduler-stats to print scheduler related statistics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329792 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-11 11:37:46 +00:00
Clement Courbet
a59739cda1 [llvm-exegesis] Add a flag to disable libpfm even if present.
Summary: Fixes PR37053.

Reviewers: uabelho, gchatelet

Subscribers: mgorny, tschuett, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329781 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-11 07:32:43 +00:00
Sanjay Patel
30c344c945 [llvm-mca] reorder text
On 2nd reading, putting the C example after the bit about
multiple regions makes this flow better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329732 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-10 18:10:14 +00:00
Sanjay Patel
6592e3d4b5 [llvm-mca] fix formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329729 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-10 17:56:24 +00:00
Sanjay Patel
272dbbe783 [llvm-mca] add example workflow for source code
This is copied from Andrea's text in PR36875:
https://bugs.llvm.org/show_bug.cgi?id=36875

As noted there, this is a hack...but it's a good one!
It's important to show potential workflows up-front
with examples, so customers can copy and experiment
with them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329726 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-10 17:49:45 +00:00
Andrea Di Biagio
955aba4f3b [llvm-mca] Move the logic that prints dispatch unit statistics from BackendStatistics to its own view.
This patch moves the logic that collects and analyzes dispatch events to the
DispatchStatistics view.

Added flag -dispatch-stats to print statistics related to the dispatch logic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329708 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-10 14:55:14 +00:00
Andrea Di Biagio
259800c8fc [llvm-mca] Increase the default number of iterations to 100.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329694 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-10 12:50:03 +00:00
Andrea Di Biagio
aae4cd3ca1 [llvm-mca] Add the ability to mark regions of code for analysis (PR36875)
This patch teaches llvm-mca how to parse code comments in search for special
"markers" used to select regions of code.

Example:

# LLVM-MCA-BEGIN My Code Region
  ....
# LLVM-MCA-END

The MCAsmLexer now delegates to an object of class MCACommentParser (i.e. an
AsmCommentConsumer) the parsing of code comments to search for begin/end code
region markers.

A comment starting with substring "LLVM-MCA-BEGIN" marks the beginning of a new
region of code.  A comment starting with substring "LLVM-MCA-END" marks the end
of the last region.

This implementation doesn't allow regions to overlap. Each region can have a
optional description; internally, each region is identified by a range of source
code locations (SMLoc).

MCInst objects are added to a region R only if the source location for the
MCInst is in the range of locations specified by R.

By default, the tool allocates an implicit "Default" code region which contains
every source location.  See new tests llvm-mca-marker-*.s for a few examples.

A new Backend object is created for every region. So, the analysis is conducted
on every parsed code region.  The final report is the union of the reports
generated for every code region.  Note that empty regions are skipped.

Special "[#] Code Region - ..." strings are used in the report to mark the
portion which is specific to a code region only. For example, see
llvm-mca-markers-5.s.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329590 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-09 16:39:52 +00:00
Max Moroz
06fa683388 [llvm-cov] Implement -ignore-filename-regex= option for excluding source files.
Summary:
The option is helpful for large projects where it's not feasible to specify sources which
user would like to see in the report. Instead, it allows to black-list specific sources via
regular expressions (e.g. now it's possible to skip all files that have "test" in its name).

This also partially fixes https://bugs.llvm.org/show_bug.cgi?id=34277

Reviewers: vsk, morehouse, liaoyuke

Reviewed By: vsk

Subscribers: kcc, mgorny, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329581 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-09 15:20:35 +00:00
Dean Michael Berris
0379e104e9 [XRay][llvm+clang] Consolidate attribute list files
Summary:
This change consolidates the always/never lists that may be provided to
clang to externally control which functions should be XRay instrumented
by imbuing attributes. The files follow the same format as defined in
https://clang.llvm.org/docs/SanitizerSpecialCaseList.html for the
sanitizer blacklist.

We also deprecate the existing `-fxray-instrument-always=` and
`-fxray-instrument-never=` flags, in favour of `-fxray-attr-list=`.

This fixes http://llvm.org/PR34721.

Reviewers: echristo, vlad.tsyrklevich, eugenis

Reviewed By: vlad.tsyrklevich

Subscribers: llvm-commits, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329543 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-09 04:02:09 +00:00
Piotr Padlewski
9b484d4e23 Mark invariant.group as experimental
Differential Revision: https://reviews.llvm.org/D33235

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329531 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-08 13:53:04 +00:00
Manoj Gupta
e37ea5686e [Release Notes] Add release note for "-fmerge-all-constants"
Summary:
Add note that "-fmerge-all-constants" is not applied as default
anymore.

Reviewers: rjmccall, rsmith, chandlerc

Subscribers: llvm-commits, thakis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329457 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-06 21:11:09 +00:00
Rafael Espindola
ca7fd00a11 Update method names in documentation.
They were renamed in r328848.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329368 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-06 01:21:48 +00:00
Andrea Di Biagio
14cfc65a1c [documentation][llvm-mca] Update the documentation.
Scheduling models can now describe processor register files and retire control
units. This updates the existing documentation and the README file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329311 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-05 16:42:32 +00:00
Brian Gesiak
dce7fb08a0 [Lexicon] Add "ICE", internal compiler error
Test Plan:
1. `ninja docs-llvm-html`
2. Confirm that the rendered docs HTML contains the new "ICE" entry



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329285 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-05 14:08:16 +00:00
Alexander Kornienko
3338e44592 Minor fix in docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329277 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-05 12:48:22 +00:00
Andrea Di Biagio
370e64a807 [llvm-mca] Remove flag -max-retire-per-cycle, and update the docs.
This is done in preparation for D45259.
With D45259, models can specify the size of the reorder buffer, and the retire
throughput directly via tablegen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329274 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-05 11:36:50 +00:00
Tim Corringham
c5e0b13c3b Add AMDPAL Code Conventions section to AMD docs
Summary:
This is a first version of the AMDPAL code conventions.
Further updates will undoubtably be required to fully
document AMDPAL.

Subscribers: nhaehnle, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329188 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-04 13:02:09 +00:00
Clement Courbet
fd68be2418 Re-land r329156 "Add llvm-exegesis tool."
Fixed to depend on and initialize the native target instead of X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329169 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-04 11:37:06 +00:00
Clement Courbet
fb12c072df Revert r329156 "Add llvm-exegesis tool."
Breaks a bunch of bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329157 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-04 08:22:54 +00:00
Clement Courbet
780c045964 Add llvm-exegesis tool.
Summary:
[llvm-exegesis][RFC] Automatic Measurement of Instruction Latency/Uops

This is the code corresponding to the RFC "llvm-exegesis Automatic Measurement of Instruction Latency/Uops".

The RFC is available on the LLVM mailing lists as well as the following document
for easier reading:
https://docs.google.com/document/d/1QidaJMJUyQdRrFKD66vE1_N55whe0coQ3h1GpFzz27M/edit?usp=sharing

Subscribers: mgorny, gchatelet, orwant, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329156 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-04 08:13:32 +00:00
Vlad Tsyrklevich
45013b2e67 Add the ShadowCallStack attribute
Summary:
Introduce the ShadowCallStack function attribute. It's added to
functions compiled with -fsanitize=shadow-call-stack in order to mark
functions to be instrumented by a ShadowCallStack pass to be submitted
in a separate change.

Reviewers: pcc, kcc, kubamracek

Reviewed By: pcc, kcc

Subscribers: cryptoad, mehdi_amini, javed.absar, llvm-commits, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329108 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-03 20:10:40 +00:00
Andrea Di Biagio
6ea791d917 [llvm-mca] Move the logic that prints register file statistics to its own view. NFCI
Before this patch, the "BackendStatistics" view was responsible for printing the
register file usage (as well as many other statistics).

Now users can enable register file usage statistics using the command line flag
`-register-file-stats`. By default, the tool doesn't print register file
statistics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329083 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-03 16:46:23 +00:00
Sanjay Patel
84dd0b3fad [LangRef] fix description and examples of fptrunc
As noted in PR36966:
https://bugs.llvm.org/show_bug.cgi?id=36966

The old description doesn't match what we do in code, 
so this just fixes the documentation to avoid confusion.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329065 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-03 13:05:20 +00:00
Gor Nishanov
78cbb42d45 [coroutines] Add support for llvm.coro.noop intrinsics
Summary:
A recent addition to Coroutines TS (https://wg21.link/p0913) adds a pre-defined coroutine noop_coroutine that does nothing.
To implement this feature, we implemented an llvm.coro.noop intrinsic that returns a coroutine handle to a coroutine that does nothing when resumed or destroyed.

Reviewers: EricWF, modocache, rnk, lewissbaker

Reviewed By: modocache

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328986 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-02 16:55:12 +00:00
Jonas Devlieghere
67eb8fdbb0 [dsymutil] Upstream emitting of papertrail warnings.
When running dsymutil as part of your build system, it can be desirable
for warnings to be part of the end product, rather than just being
emitted to the output stream. This patch upstreams that functionality.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328965 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-02 10:40:43 +00:00