]> granicus.if.org Git - llvm/log
llvm
6 years agoDebugInfo: Add assembly comments for debug_addr contribution header fields
David Blaikie [Mon, 24 Dec 2018 07:09:50 +0000 (07:09 +0000)]
DebugInfo: Add assembly comments for debug_addr contribution header fields

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350047 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agollvm-dwarfdump: Skip address index info (and dump only the address, if found) when...
David Blaikie [Mon, 24 Dec 2018 06:52:31 +0000 (06:52 +0000)]
llvm-dwarfdump: Skip address index info (and dump only the address, if found) when non-verbose dumping addrx forms

There's a few bugs here still - demonstrated with FIXITs in the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350046 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoReturn "[LoopSimplifyCFG] Delete dead in-loop blocks"
Max Kazantsev [Mon, 24 Dec 2018 06:06:17 +0000 (06:06 +0000)]
Return "[LoopSimplifyCFG] Delete dead in-loop blocks"

The underlying bug that caused the revert should be fixed by rL348567.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350045 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[LoopIdioms] More LocationSize::precise annotations; NFC
George Burgess IV [Mon, 24 Dec 2018 05:55:50 +0000 (05:55 +0000)]
[LoopIdioms] More LocationSize::precise annotations; NFC

Both of these places reference memset-like loops. Memset is precise.

Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350044 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove unused variables left after r350041. NFC
Craig Topper [Mon, 24 Dec 2018 05:45:45 +0000 (05:45 +0000)]
[X86] Remove unused variables left after r350041. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350043 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SelectionDAGBuilder] Use ::precise LocationSizes; NFC
George Burgess IV [Mon, 24 Dec 2018 05:34:21 +0000 (05:34 +0000)]
[SelectionDAGBuilder] Use ::precise LocationSizes; NFC

More migration so we can disable the implicit int -> LocationSize
conversion.

All of these are either scatter/gather'ed vector instructions, or direct
loads. Hence, they're all precise.

Perhaps if we see way more getTypeStoreSize calls, we can make a
getTypeStoreLocationSize (or similar) as a wrapper that applies this
::precise. Doesn't appear that it's a good idea to make getTypeStoreSize
return a LocationSize itself, however.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350042 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Move the optimization that turns 'CMP (AND+IMM64), 0' into SRL/SHL+TEST to...
Craig Topper [Mon, 24 Dec 2018 05:27:13 +0000 (05:27 +0000)]
[X86] Move the optimization that turns 'CMP (AND+IMM64), 0' into SRL/SHL+TEST to X86ISelDAGToDAG.

This cleans more code out of EmitTest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350041 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Autogenerate complete checks. NFC
Craig Topper [Mon, 24 Dec 2018 01:59:31 +0000 (01:59 +0000)]
[X86] Autogenerate complete checks. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350039 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove the ANDN check from EmitTest.
Craig Topper [Mon, 24 Dec 2018 01:10:13 +0000 (01:10 +0000)]
[X86] Remove the ANDN check from EmitTest.

Remove the TESTmr isel patterns and add another postprocessing combine for TESTrr+ANDrm->TESTmr. We already have a postprocessing combine for TESTrr+ANDrr->TESTrr. With this we can give ANDN a chance to match first. And clean it up during post processing if we ended up with just a regular AND.

This is another step towards my plan to gut EmitTest and do more flag handling during isel matching or by using optimizeCompare.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350038 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-exegesis] Clustering: don't enqueue a point multiple times
Fangrui Song [Sun, 23 Dec 2018 20:48:52 +0000 (20:48 +0000)]
[llvm-exegesis] Clustering: don't enqueue a point multiple times

Summary:
SetVector uses both DenseSet and vector, which is time/memory inefficient. The points are represented as natural numbers so we can replace the DenseSet part by indexing into a vector<char> instead.

Don't cargo cult the pseudocode on the wikipedia DBSCAN page. This is a standard BFS style algorithm (the similar loops have been used several times in other LLVM components): every point is processed at most once, thus the queue has at most NumPoints elements. We represent it with a vector and allocate it outside of the loop to avoid allocation in the loop body.

We check `Processed[P]` to avoid enqueueing a point more than once, which also nicely saves us a `ClusterIdForPoint_[Q].isUndef()` check.

Many people hate the oneshot abstraction but some favor it, therefore we make a compromise, use a lambda to abstract away the neighbor adding process.

Delete the comment `assert(Neighbors.capacity() == (Points_.size() - 1));` as it is wrong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350035 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DAGCombiner] limit shuffle to extend transform (PR40146)
Sanjay Patel [Sun, 23 Dec 2018 20:48:31 +0000 (20:48 +0000)]
[DAGCombiner] limit shuffle to extend transform (PR40146)

It's dangerous to knowingly create an illegal vector type
no matter what stage of combining we're in.

This prevents the missed folding/scalarization seen in:
https://bugs.llvm.org/show_bug.cgi?id=40146

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350034 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86] add test for vector shuffle --> extend transform (PR40146); NFC
Sanjay Patel [Sun, 23 Dec 2018 20:36:52 +0000 (20:36 +0000)]
[x86] add test for vector shuffle --> extend transform (PR40146); NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350033 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DAGCombiner] allow hoisting vector bitwise logic ahead of extends
Sanjay Patel [Sun, 23 Dec 2018 19:58:16 +0000 (19:58 +0000)]
[DAGCombiner] allow hoisting vector bitwise logic ahead of extends

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350032 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86] add tests for vector extend + logic ops; NFC
Sanjay Patel [Sun, 23 Dec 2018 18:37:44 +0000 (18:37 +0000)]
[x86] add tests for vector extend + logic ops; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350031 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[gn build] Add build files for clang/tools/{arcmt-test,clang-check,clang-func-mapping}
Nico Weber [Sun, 23 Dec 2018 14:19:53 +0000 (14:19 +0000)]
[gn build] Add build files for clang/tools/{arcmt-test,clang-check,clang-func-mapping}

Needed for check-clang.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350026 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[gn build] Add build files for clang/tools/{clang-refactor,clang-rename}, clang/utils...
Nico Weber [Sun, 23 Dec 2018 14:17:13 +0000 (14:17 +0000)]
[gn build] Add build files for clang/tools/{clang-refactor,clang-rename}, clang/utils/hmaptool, clang/lib/Tooling/Refactoring

Needed for check-clang.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350025 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[gn build] Add build files for clang/tools/{clang-diff,clang-import-test,diagtool...
Nico Weber [Sun, 23 Dec 2018 14:15:26 +0000 (14:15 +0000)]
[gn build] Add build files for clang/tools/{clang-diff,clang-import-test,diagtool and clang/lib/Tooling, clang/lib/Tooling/ASTDiff

Needed for check-clang.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350024 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Rename register in the OrcMips64 resolver code comments. NFC
Simon Atanasyan [Sun, 23 Dec 2018 12:05:04 +0000 (12:05 +0000)]
[ORC] Rename register in the OrcMips64 resolver code comments. NFC

The `fp` and `s8` register names are synonyms. But `fp` better reflects
a purpose of the register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350023 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] clang-format OrcMips32 and OrcMips64 code. NFC
Simon Atanasyan [Sun, 23 Dec 2018 12:05:00 +0000 (12:05 +0000)]
[ORC] clang-format OrcMips32 and OrcMips64 code. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350022 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Remove redundant instruction from MIPS resolver code. NFC
Simon Atanasyan [Sun, 23 Dec 2018 12:04:55 +0000 (12:04 +0000)]
[ORC] Remove redundant instruction from MIPS resolver code. NFC

It's redundant to restore the `$a3` register twice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350021 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[MemCpyOpt] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 06:40:39 +0000 (06:40 +0000)]
[MemCpyOpt] Use LocationSize instead of ints; NFC

Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.

srcSize is derived from the size of an alloca, and we quit out if the
size of that is > the size of the thing we're copying to. Hence, we
should always copy everything over, so these sizes are precise.

Don't make srcSize itself a LocationSize, since optionality isn't
helpful, and we do some comparisons against other sizes elsewhere in
that function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350019 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Return false from hasAndNotCompare if the comparision value is a constant.
Craig Topper [Sun, 23 Dec 2018 05:52:55 +0000 (05:52 +0000)]
[X86] Return false from hasAndNotCompare if the comparision value is a constant.

We won't end up using an ANDN instruction in this case so we should generate the same code we do for pre-BMI targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350018 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[MemoryLocation] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 03:36:44 +0000 (03:36 +0000)]
[MemoryLocation] Use LocationSize instead of ints; NFC

Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.

This one sadly isn't *super* small, but all of the changes here are
either to:
- libfuncs that are passed a constant size (memcpy, memset, ...)
- instructions that store/load a constant size

So they have to be precise

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350017 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Loads] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 03:10:56 +0000 (03:10 +0000)]
[Loads] Use LocationSize instead of ints; NFC

Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.

This tries to find literal loads/stores of the given type, so this has
to be precise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350016 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Lint] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 02:50:08 +0000 (02:50 +0000)]
[Lint] Use LocationSize instead of ints; NFC

Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350015 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[AAEval] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 02:39:58 +0000 (02:39 +0000)]
[AAEval] Use LocationSize instead of ints; NFC

Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350014 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Fix an old FIXME about folding the zero constant into the OR instruction we...
Craig Topper [Sun, 23 Dec 2018 01:54:43 +0000 (01:54 +0000)]
[X86] Fix an old FIXME about folding the zero constant into the OR instruction we use for sequentially consistent fence in 32-bit mode without SSE2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350013 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Autogenerate complete checks. NFC
Craig Topper [Sun, 23 Dec 2018 01:54:41 +0000 (01:54 +0000)]
[X86] Autogenerate complete checks. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350012 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoDebugInfo: Accurately propagate the section used by a relocation when accessing range...
David Blaikie [Sat, 22 Dec 2018 22:20:40 +0000 (22:20 +0000)]
DebugInfo: Accurately propagate the section used by a relocation when accessing ranges defined by low/high_pc

This is difficult/not possible to test in LLVM, but is visible as a
crash in LLD when parsing DWARF to generate gdb-index.

This function is called by llvm-dwarfdump when parsing high_pc for
non-verbose output (to print the actual high_pc rather than the low_pc
relative value), but in that case llvm-dwarfdump doesn't print section
names (if it did, it would hit this problem).

We could add some other features to llvm-dwarfdump to expose this, but
nothing really springs to my mind. I will add a test to lld, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350010 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agollvm-dwarfdump: Dump the section name/number for addr attributes
David Blaikie [Sat, 22 Dec 2018 20:34:58 +0000 (20:34 +0000)]
llvm-dwarfdump: Dump the section name/number for addr attributes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350009 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Analysis] More LocationSize cleanup; NFC
George Burgess IV [Sat, 22 Dec 2018 18:23:21 +0000 (18:23 +0000)]
[Analysis] More LocationSize cleanup; NFC

Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350008 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Analysis] s/uint64_t/LocationSize; NFC
George Burgess IV [Sat, 22 Dec 2018 17:42:08 +0000 (17:42 +0000)]
[Analysis] s/uint64_t/LocationSize; NFC

Let the gradual cleanup from D44748 continue. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350007 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DAGCombiner] allow narrowing of add followed by truncate
Sanjay Patel [Sat, 22 Dec 2018 17:10:31 +0000 (17:10 +0000)]
[DAGCombiner] allow narrowing of add followed by truncate

trunc (add X, C ) --> add (trunc X), C'

If we're throwing away the top bits of an 'add' instruction, do it in the narrow destination type.
This makes the truncate-able opcode list identical to the sibling transform done in IR (in instcombine).

This change used to show regressions for x86, but those are gone after D55494.
This gets us closer to deleting the x86 custom function (combineTruncatedArithmetic)
that does almost the same thing.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350006 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86] add load fold patterns for movddup with vzext_load
Sanjay Patel [Sat, 22 Dec 2018 16:59:02 +0000 (16:59 +0000)]
[x86] add load fold patterns for movddup with vzext_load

The missed load folding noticed in D55898 is visible independent of that change
either with an adjusted IR pattern to start or with AVX2/AVX512 (where the build
vector becomes a broadcast first; movddup is not produced until we get into isel
via tablegen patterns).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350005 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoNFC][CodeGen][X86][AArch64] Tests for bit extract (pat. a/c/d) with trunc (PR36419)
Roman Lebedev [Sat, 22 Dec 2018 10:38:05 +0000 (10:38 +0000)]
NFC][CodeGen][X86][AArch64] Tests for bit extract (pat. a/c/d) with trunc (PR36419)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350000 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[NFC][CodeGen][X86][AArch64] Bit extract: add nounwind attr to drop .cfi noise
Roman Lebedev [Sat, 22 Dec 2018 09:58:13 +0000 (09:58 +0000)]
[NFC][CodeGen][X86][AArch64] Bit extract: add nounwind attr to drop .cfi noise

Forgot about that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349999 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[NFC][CodeGen][X86][AArch64] Tests for bit extract (pat. b) with trunc (PR36419)
Roman Lebedev [Sat, 22 Dec 2018 09:40:14 +0000 (09:40 +0000)]
[NFC][CodeGen][X86][AArch64] Tests for bit extract (pat. b) with trunc (PR36419)

@bextr64_32_b1 is extracted from hotpath of real-world code
(RawSpeed BitStream<>::peekBitsNoFill()) after `clang -O3`.

@bextr64_32_b2/@bextr64_32_b0 is the same pattern,
but with trunc done last, showing how i think it can be handled:
https://rise4fun.com/Alive/K4B
https://rise4fun.com/Alive/qC9

It is possible that middle-end should do some of this, too.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349998 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agollvm-dwarfdump: Remove extraneous space between '(' and 'indexed'
David Blaikie [Sat, 22 Dec 2018 08:43:08 +0000 (08:43 +0000)]
llvm-dwarfdump: Remove extraneous space between '(' and 'indexed'

When dumping string or address indexes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349997 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agollvm-dwarfdump: Print the section name/number for addr_index attributes
David Blaikie [Sat, 22 Dec 2018 08:33:55 +0000 (08:33 +0000)]
llvm-dwarfdump: Print the section name/number for addr_index attributes

(addr attributes coming shortly)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349996 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoDebugInfo: Refactor named section dumping into a reusable helper
David Blaikie [Sat, 22 Dec 2018 08:23:10 +0000 (08:23 +0000)]
DebugInfo: Refactor named section dumping into a reusable helper

Currently the section name (& possibly number) is only printed on
addresses in ranges - but no reason it couldn't also be displayed on
other addresses (like low/high PC).

Refactor in that direction by pulling out the section lookup and name
ambiguity dumping logic into a reusable helper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349995 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[gn build] Embed __TEXT __info_plist section into clang binary on macOS
Nico Weber [Sat, 22 Dec 2018 03:51:10 +0000 (03:51 +0000)]
[gn build] Embed __TEXT __info_plist section into clang binary on macOS

Verified by comparing the output of `otool -P bin/clang` between the GN and the
CMake build.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349992 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[gn build] Add build files for clang, clang-offload-bundler, and clang/lib/Headers
Nico Weber [Sat, 22 Dec 2018 03:49:44 +0000 (03:49 +0000)]
[gn build] Add build files for clang, clang-offload-bundler, and clang/lib/Headers

With this, the GN build can build clang!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349991 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoFix mingw build failures caused by r349839
Tom Stellard [Sat, 22 Dec 2018 03:43:08 +0000 (03:43 +0000)]
Fix mingw build failures caused by r349839

Reviewers: mstorsjo

Subscribers: mgorny, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349990 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[gn build] Add build files for llvm-cat, llvm-lto, llvm-lto2, llvm-modextract, llvm...
Nico Weber [Sat, 22 Dec 2018 03:40:35 +0000 (03:40 +0000)]
[gn build] Add build files for llvm-cat, llvm-lto, llvm-lto2, llvm-modextract, llvm-profdata, llvm-symbolizer

These are the llvm/tools needed by check-clang.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349989 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[gn build] Add build file for clang/lib/FrontendTool
Nico Weber [Sat, 22 Dec 2018 03:15:56 +0000 (03:15 +0000)]
[gn build] Add build file for clang/lib/FrontendTool

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349988 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[gn build] Add build file for clang/lib/ARCMigrate
Nico Weber [Sat, 22 Dec 2018 03:15:08 +0000 (03:15 +0000)]
[gn build] Add build file for clang/lib/ARCMigrate

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349987 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[gn build] Add build files for clang/lib/{ASTMatchers,CrossTU}, clang/lib/StaticAnaly...
Nico Weber [Sat, 22 Dec 2018 03:14:05 +0000 (03:14 +0000)]
[gn build] Add build files for clang/lib/{ASTMatchers,CrossTU}, clang/lib/StaticAnalyzer/{Checkers,Core,Frontend}

The intent is to add the build file for clang/lib/StaticAnalyzer/Frontend; everything else is pulled in by that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349986 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoDebugInfo: Remove extra attribute lookup
David Blaikie [Sat, 22 Dec 2018 02:24:13 +0000 (02:24 +0000)]
DebugInfo: Remove extra attribute lookup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349985 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] FixupLEAs, reduce number of calls to getOperand and use X86::AddrBaseReg/AddrIn...
Craig Topper [Sat, 22 Dec 2018 01:34:47 +0000 (01:34 +0000)]
[X86] FixupLEAs, reduce number of calls to getOperand and use X86::AddrBaseReg/AddrIndexReg, etc. instead of hardcoded constants.

Makes the code a little more readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349983 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[NVPTX] Reduce stack size in NVPTXAsmPrinter::doInitialization().
Justin Lebar [Sat, 22 Dec 2018 01:30:37 +0000 (01:30 +0000)]
[NVPTX] Reduce stack size in NVPTXAsmPrinter::doInitialization().

NVPTXAsmPrinter::doInitialization() was creating an NVPTXSubtarget on
the stack.  This object is huge, about 80kb.  Also it's slow to create.
And it's all redundant; we have one in NVPTXTargetMachine anyway!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349982 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agolibDebugInfo: Refactor error handling in range list parsing
David Blaikie [Sat, 22 Dec 2018 00:31:02 +0000 (00:31 +0000)]
libDebugInfo: Refactor error handling in range list parsing

Propagate the llvm::Error a little further up. This is NFC for
llvm-dwarfdump in this change, but allows ld.lld to emit more precise
error messages about which object and archive the erroneous DWARF is in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349978 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[MC] Enable .file support on COFF and diagnose it on unsupported targets
Reid Kleckner [Fri, 21 Dec 2018 23:35:48 +0000 (23:35 +0000)]
[MC] Enable .file support on COFF and diagnose it on unsupported targets

Summary:
The "single parameter" .file directive appears to be an ELF-only feature
that is intended to insert the main source filename into the string
table table.

I noticed that if you assemble an ELF .s file for COFF, typically it
will assert right away on a .file directive near the top of the file. My
first change was to make this emit a proper error in the asm parser so
that we don't assert so easily.

However, COFF actually does have some support for this directive, and if
you emit an object file, llvm-mc does not assert. When emitting a COFF
object, MC will take those file names and create "debug" symbol table
entries for them. I'm not familiar with these kinds of symbol table
entries, and I'm not aware of any users of them, but @compnerd added
them a while ago. They don't introduce absolute paths, and most main
source file paths are short enough that this extra entry shouldn't cause
any problems, so I enabled the flag in MCAsmInfoCOFF that indicates that
it's supported.

This has the side effect of adding an extra debug symbol to every object
produced by clang, which is a pretty big functional change. My question
is, should we keep the functionality or remove it in the name of symbol
table minimalism?

Reviewers: mstorsjo, compnerd

Subscribers: hiraditya, compnerd, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349976 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoSilence warning in assert introduced in rL349973.
Mircea Trofin [Fri, 21 Dec 2018 23:02:10 +0000 (23:02 +0000)]
Silence warning in assert introduced in rL349973.

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349975 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm] API for encoding/decoding DWARF discriminators.
Mircea Trofin [Fri, 21 Dec 2018 22:48:50 +0000 (22:48 +0000)]
[llvm] API for encoding/decoding DWARF discriminators.

Summary:
Added a pair of APIs for encoding/decoding the 3 components of a DWARF discriminator described in http://lists.llvm.org/pipermail/llvm-dev/2016-October/106532.html: the base discriminator, the duplication factor (useful in profile-guided optimization) and the copy index (used to identify copies of code in cases like loop unrolling)

The encoding packs 3 unsigned values in 32 bits. This CL addresses 2 issues:
- communicates overflow back to the user
- supports encoding all 3 components together. Current APIs assume a sequencing of events. For example, creating a new discriminator based on an existing one by changing the base discriminator was not supported.

Reviewers: davidxl, danielcdh, wmi, dblaikie

Reviewed By: dblaikie

Subscribers: zzheng, dmgreen, aprantl, JDevlieghere, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349973 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoReapply: DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is...
David Blaikie [Fri, 21 Dec 2018 22:25:01 +0000 (22:25 +0000)]
Reapply: DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is empty (devoid of code addresses)

Originally committed in r349333, reverted in r349353.

GCC emitted these unconditionally on/before 4.4/March 2012
Clang emitted these unconditionally on/before 3.5/March 2014

This improves performance when parsing CUs (especially those using split
DWARF) that contain no code ranges (such as the mini CUs that may be
created by ThinLTO importing - though generally they should be/are
avoided, especially for Split DWARF because it produces a lot of very
small CUs, which don't scale well in a bunch of other ways too
(including size)).

The revert was due to a (Google internal) test that had some checked in old
object files missing DW_AT_ranges. That's since been fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349968 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[IR] Add Instruction::isLifetimeStartOrEnd, NFC
Vedant Kumar [Fri, 21 Dec 2018 21:49:40 +0000 (21:49 +0000)]
[IR] Add Instruction::isLifetimeStartOrEnd, NFC

Instruction::isLifetimeStartOrEnd() checks whether an Instruction is an
llvm.lifetime.start or an llvm.lifetime.end intrinsic.

This was suggested as a cleanup in D55967.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349964 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[TextAPI][elfabi] Fix failing tests from D56020
Armando Montanez [Fri, 21 Dec 2018 21:44:09 +0000 (21:44 +0000)]
[TextAPI][elfabi] Fix failing tests from D56020

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349963 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add isel patterns to match BMI/TBMI instructions when lowering has turned the...
Craig Topper [Fri, 21 Dec 2018 21:42:43 +0000 (21:42 +0000)]
[X86] Add isel patterns to match BMI/TBMI instructions when lowering has turned the root nodes into one of the flag producing binops.

This fixes the patterns that have or/and as a root. 'and' is handled differently since thy usually have a CMP wrapped around them.

I had to look for uses of the CF flag because all these nodes have non-standard CF flag behavior. A real or/xor would always clear CF. In practice we shouldn't be using the CF flag from these nodes as far as I know.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349962 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DAGCombiner] simplify code leading to scalarizeExtractedVectorLoad; NFC
Sanjay Patel [Fri, 21 Dec 2018 21:26:30 +0000 (21:26 +0000)]
[DAGCombiner] simplify code leading to scalarizeExtractedVectorLoad; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349958 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Don't allow optimizeCompareInstr to replace a CMP with BEXTR if the sign flag...
Craig Topper [Fri, 21 Dec 2018 21:16:26 +0000 (21:16 +0000)]
[X86] Don't allow optimizeCompareInstr to replace a CMP with BEXTR if the sign flag is used.

The BEXTR instruction documents the SF bit as undefined.

The TBM BEXTR instruction has the same issue, but I'm not sure how to test it. With the control being an immediate we can determine the sign bit is 0 or the BEXTR would have been removed.

Fixes PR40060

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349956 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU: Don't peel of the offset if the resulting base could possibly be negative...
Changpeng Fang [Fri, 21 Dec 2018 20:57:34 +0000 (20:57 +0000)]
AMDGPU: Don't peel of the offset if the resulting base could possibly be negative in Indirect addressing.

Summary:
  Don't peel of the offset if the resulting base could possibly be negative in Indirect addressing.
This is because the M0 field is of unsigned.

This patch achieves the similar goal as https://reviews.llvm.org/D55241, but keeps the optimization
if the base is known unsigned.

Reviewers:
  arsemn

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349951 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[TextAPI][elfabi] Fix YAML support for weak symbols
Armando Montanez [Fri, 21 Dec 2018 20:45:58 +0000 (20:45 +0000)]
[TextAPI][elfabi] Fix YAML support for weak symbols

Weak symbols are supposed to be supported in the ELF TextAPI
implementation, but the YAML handler didn't read or write the `Weak`
member of ELFSymbol. This change adds the YAML mapping and updates tests
to ensure correct behavior.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349950 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[BasicAA] Fix AA bug on dynamic allocas and stackrestore
Reid Kleckner [Fri, 21 Dec 2018 19:59:03 +0000 (19:59 +0000)]
[BasicAA] Fix AA bug on dynamic allocas and stackrestore

Summary:
BasicAA has special logic for unescaped allocas, which normally applies
equally well to dynamic and static allocas. However, llvm.stackrestore
has the power to end the lifetime of dynamic allocas, without referring
to them directly.

stackrestore is already marked with the most conservative memory
modification attributes, but because the alloca is not escaped, the
normal logic produces incorrect results. I think BasicAA needs a special
case here to teach it about the relationship between dynamic allocas and
stackrestore.

Fixes PR40118

Reviewers: gbiv, efriedma, george.burgess.iv

Subscribers: hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349945 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[RuntimeUnrolling] NFC: Add TODO and comments in connectProlog
Anna Thomas [Fri, 21 Dec 2018 19:45:05 +0000 (19:45 +0000)]
[RuntimeUnrolling] NFC: Add TODO and comments in connectProlog

Currently, runtime unrolling does not support loops where multiple
exiting blocks exit to the latchExit. Added TODO and other code
clarifications for ConnectProlog code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349944 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86] add movddup specialization for build vector lowering (PR37502)
Sanjay Patel [Fri, 21 Dec 2018 18:48:32 +0000 (18:48 +0000)]
[x86] add movddup specialization for build vector lowering (PR37502)

This is admittedly a narrow fix for the problem:
https://bugs.llvm.org/show_bug.cgi?id=37502
...but as the XOP restriction shows, it's a maze to get this right.
In the motivating example, note that we have movddup before SSE4.1 and
again with AVX2. That's because insertps isn't available pre-SSE41 and
vbroadcast is (more generally) available with AVX2 (and the splat is
reduced to movddup via isel pattern).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349937 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ARM] Set Defs = [CPSR] for COPY_STRUCT_BYVAL, as it clobbers CPSR.
Florian Hahn [Fri, 21 Dec 2018 18:07:10 +0000 (18:07 +0000)]
[ARM] Set Defs = [CPSR] for COPY_STRUCT_BYVAL, as it clobbers CPSR.

Fixes PR35023.

Reviewers: MatzeB, t.p.northover, sunfish, qcolombet, efriedma

Reviewed By: efriedma

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349935 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SelectionDAG] Remove KnownBits output paramater version.
Simon Pilgrim [Fri, 21 Dec 2018 17:29:38 +0000 (17:29 +0000)]
[SelectionDAG] Remove KnownBits output paramater version.

Completes the work started by @bogner in rL340594.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349931 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86] remove excess check lines; NFC
Sanjay Patel [Fri, 21 Dec 2018 17:19:43 +0000 (17:19 +0000)]
[x86] remove excess check lines; NFC

Forgot that the integer variants have an extra 's'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349929 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86] move misplaced tests; NFC
Sanjay Patel [Fri, 21 Dec 2018 17:06:43 +0000 (17:06 +0000)]
[x86] move misplaced tests; NFC

Mixed up integer and FP in rL349923.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349928 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[GlobalISel][AArch64] Add support for widening G_FCEIL
Jessica Paquette [Fri, 21 Dec 2018 17:05:26 +0000 (17:05 +0000)]
[GlobalISel][AArch64] Add support for widening G_FCEIL

This adds support for widening G_FCEIL in LegalizerHelper and
AArch64LegalizerInfo. More specifically, it teaches the AArch64 legalizer to
widen G_FCEIL from a 16-bit float to a 32-bit float when the subtarget doesn't
support full FP 16.

This also updates AArch64/f16-instructions.ll to show that we perform the
correct transformation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349927 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86] add tests for possible horizontal op transform; NFC
Sanjay Patel [Fri, 21 Dec 2018 16:49:41 +0000 (16:49 +0000)]
[x86] add tests for possible horizontal op transform; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349923 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoReleaseNotes: Document removal of add_llvm_loadable_module CMake macro
Tom Stellard [Fri, 21 Dec 2018 16:20:37 +0000 (16:20 +0000)]
ReleaseNotes: Document removal of add_llvm_loadable_module CMake macro

This was removed in r349839.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349921 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86] move test for movddup; NFC
Sanjay Patel [Fri, 21 Dec 2018 16:08:27 +0000 (16:08 +0000)]
[x86] move test for movddup; NFC

This adds an AVX512 run as suggested in D55936.
The test didn't really belong with other build vector tests
because that's not the pattern here. I don't see much value
in adding 64-bit RUNs because they wouldn't exercise the
isel patterns that we're aiming to expose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349920 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[pstl] Initial integration with LLVM's CMake
Louis Dionne [Fri, 21 Dec 2018 15:59:04 +0000 (15:59 +0000)]
[pstl] Initial integration with LLVM's CMake

Summary:
This commit adds a check-pstl CMake target that will run the tests
we currently have for pstl. Those tests are not using LLVM lit yet,
but switching them over should be a transparent change. With this
change, we can start relying on the `check-pstl` target for workflows
and CI.

Note that this commit purposefully does not support the pre-monorepo
layout (with subprojects in projects/), since LLVM is moving towards
the monorepo layout anyway.

Reviewers: jfb

Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits, mclow.lists, rodgert

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349919 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[AArch64] Refactor Exynos predicate (NFC)
Evandro Menezes [Fri, 21 Dec 2018 15:51:34 +0000 (15:51 +0000)]
[AArch64] Refactor Exynos predicate (NFC)

Change order of conditions in predicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349918 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[XCore] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 15:35:32 +0000 (15:35 +0000)]
[XCore] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349915 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Sparc] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 15:32:36 +0000 (15:32 +0000)]
[Sparc] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349914 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[AMDGPU] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 15:29:47 +0000 (15:29 +0000)]
[AMDGPU] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349912 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[WebAssembly] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 15:25:37 +0000 (15:25 +0000)]
[WebAssembly] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349911 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ARM] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 15:15:38 +0000 (15:15 +0000)]
[ARM] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349909 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[AArch64] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 15:05:10 +0000 (15:05 +0000)]
[AArch64] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349908 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SelectionDAG] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 14:56:18 +0000 (14:56 +0000)]
[SelectionDAG] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349907 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SystemZ] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 14:50:54 +0000 (14:50 +0000)]
[SystemZ] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349906 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Lanai] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 14:48:35 +0000 (14:48 +0000)]
[Lanai] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349905 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[PPC] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 14:32:39 +0000 (14:32 +0000)]
[PPC] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349903 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim [Fri, 21 Dec 2018 14:25:14 +0000 (14:25 +0000)]
[X86] Always use the version of computeKnownBits that returns a value. NFCI.

Continues the work started by @bogner in rL340594 to remove uses of the old KnownBits output paramater version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349902 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[AArch64] Adding missing REQUIRES in aarch64 dwarf test
Luke Cheeseman [Fri, 21 Dec 2018 13:39:13 +0000 (13:39 +0000)]
[AArch64] Adding missing REQUIRES in aarch64 dwarf test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349900 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ADT] IntervalMap: add overlaps(a, b) method
Pavel Labath [Fri, 21 Dec 2018 13:04:34 +0000 (13:04 +0000)]
[ADT] IntervalMap: add overlaps(a, b) method

Summary:
This function checks whether the mappings in the interval map overlap
with the given range [a;b]. The motivation is to enable checking for
overlap before inserting a new interval into the map.

Reviewers: vsk, dblaikie

Subscribers: dexonsmith, kristina, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349898 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[NewPM] -print-module-scope -print-after now prints module even after invalidated...
Fedor Sergeev [Fri, 21 Dec 2018 11:49:05 +0000 (11:49 +0000)]
[NewPM] -print-module-scope -print-after now prints module even after invalidated Loop/SCC

-print-after IR printing generally can not print the IR unit (Loop or SCC)
which has just been invalidated by the pass. However, when working in -print-module-scope
mode even if Loop was invalidated there is still a valid module that we can print.

Since we can not access invalidated IR unit from AfterPassInvalidated instrumentation
point we can remember the module to be printed *before* pass. This change introduces
BeforePass instrumentation that stores all the information required for module printing
into the stack and then after pass (in AfterPassInvalidated) just print whatever
has been placed on stack.

Reviewed By: philip.pfaffe
Differential Revision: https://reviews.llvm.org/D55278

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349896 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Dwarf/AArch64] Return address signing B key dwarf support
Luke Cheeseman [Fri, 21 Dec 2018 10:45:08 +0000 (10:45 +0000)]
[Dwarf/AArch64] Return address signing B key dwarf support

- When signing return addresses with -msign-return-address=<scope>{+<key>},
  either the A key instructions or the B key instructions can be used. To
  correctly authenticate the return address, the unwinder/debugger must know
  which key was used to sign the return address.
- When and exception is thrown or a break point reached, it may be necessary to
  unwind the stack. To accomplish this, the unwinder/debugger must be able to
  first authenticate an the return address if it has been signed.
- To enable this, the augmentation string of CIEs has been extended to allow
  inclusion of a 'B' character. Functions that are signed using the B key
  variant of the instructions should have and FDE whose associated CIE has a 'B'
  in the augmentation string.
- One must also be able to preserve these semantics when first stepping from a
  high level language into assembly and then, as a second step, into an object
  file. To achieve this, I have introduced a new assembly directive
  '.cfi_b_key_frame ', that tells the assembler the current frame uses return
  address signing with the B key.
- This ensures that the FDE is associated with a CIE that has 'B' in the
  augmentation string.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349895 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic intrinsic...
Simon Pilgrim [Fri, 21 Dec 2018 09:04:14 +0000 (09:04 +0000)]
[X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic intrinsics (llvm)

This auto upgrades the signed SSE saturated math intrinsics to SADD_SAT/SSUB_SAT generic intrinsics.

Clang counterpart: https://reviews.llvm.org/D55890

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349892 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[WebAssembly] Fix invalid machine instrs in -O0, verify in tests
Thomas Lively [Fri, 21 Dec 2018 06:58:15 +0000 (06:58 +0000)]
[WebAssembly] Fix invalid machine instrs in -O0, verify in tests

Reviewers: aheejin, dschuff

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349889 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU/GlobalISel: RegBankSelect for amdgcn.wqm.vote
Matt Arsenault [Fri, 21 Dec 2018 03:20:54 +0000 (03:20 +0000)]
AMDGPU/GlobalISel: RegBankSelect for amdgcn.wqm.vote

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349882 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU/GlobalISel: RegBankSelect for some fp ops
Matt Arsenault [Fri, 21 Dec 2018 03:14:45 +0000 (03:14 +0000)]
AMDGPU/GlobalISel: RegBankSelect for some fp ops

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349880 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoGlobalISel: Correct example PartialMapping table
Matt Arsenault [Fri, 21 Dec 2018 03:03:12 +0000 (03:03 +0000)]
GlobalISel: Correct example PartialMapping table

When I try to use this, it seems like the second half needs
to start where the previous part left off.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349879 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAMDGPU/GlobalISel: Redo legality for build_vector
Matt Arsenault [Fri, 21 Dec 2018 03:03:11 +0000 (03:03 +0000)]
AMDGPU/GlobalISel: Redo legality for build_vector

It seems better to avoid using the callback if possible since
there are coverage assertions which are disabled if this is used.

Also fix missing tests. Only test the legal cases since it seems
legalization for build_vector is quite lacking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349878 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[memcpyopt] Add debug logs when forwarding memcpy src to dst
Reid Kleckner [Fri, 21 Dec 2018 01:41:20 +0000 (01:41 +0000)]
[memcpyopt] Add debug logs when forwarding memcpy src to dst

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349873 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[LoopUnroll] Don't verify domtree by default with +Asserts.
Eli Friedman [Fri, 21 Dec 2018 01:28:49 +0000 (01:28 +0000)]
[LoopUnroll] Don't verify domtree by default with +Asserts.

This verification is linear in the size of the function, so it can cause
a quadratic compile-time explosion in a function with many loops to
unroll.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349871 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Autogenerate complete checks. NFC
Craig Topper [Fri, 21 Dec 2018 01:27:33 +0000 (01:27 +0000)]
[X86] Autogenerate complete checks. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349870 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Refactor hasNoCarryFlagUses and hasNoSignFlagUses in X86ISelDAGToDAG.cpp to...
Craig Topper [Fri, 21 Dec 2018 01:14:25 +0000 (01:14 +0000)]
[X86] Refactor hasNoCarryFlagUses and hasNoSignFlagUses in X86ISelDAGToDAG.cpp to tranlate opcode to condition code using the helpers in X86InstrInfo.cpp.

This shortens the switches in X86ISelDAGToDAG.cpp to only need to check condition code instead of a list of opcodes.

This also fixes a bug where the memory forms of SETcc were missing from hasNoCarryFlagUses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349868 91177308-0d34-0410-b5e6-96231b3b80d8