Louis Dionne [Mon, 11 Feb 2019 17:45:15 +0000 (17:45 +0000)]
[NFC] Fix typo in PSTL test
Reviewed as https://reviews.llvm.org/D57887.
Thanks to jwakely for the patch.
llvm-svn: 353727
Nico Weber [Mon, 11 Feb 2019 17:30:25 +0000 (17:30 +0000)]
Attempt to pacify bots after r353718
llvm-svn: 353725
Roland Froese [Mon, 11 Feb 2019 17:29:14 +0000 (17:29 +0000)]
[PowerPC] Avoid scalarization of vector truncate
The PowerPC code generator currently scalarizes vector truncates that would fit in a vector register, resulting in vector extracts, scalar operations, and vector merges. This patch custom lowers a vector truncate that would fit in a register to a vector shuffle instead.
Differential Revision: https://reviews.llvm.org/D56507
llvm-svn: 353724
Jessica Paquette [Mon, 11 Feb 2019 17:22:58 +0000 (17:22 +0000)]
[GlobalISel][AArch64] Select G_FFLOOR
This teaches the legalizer about G_FFLOOR, and lets us select G_FFLOOR in
AArch64.
It updates the existing floating point tests, and adds a select-floor.mir test.
Differential Revision: https://reviews.llvm.org/D57486
llvm-svn: 353722
Jonas Devlieghere [Mon, 11 Feb 2019 17:19:26 +0000 (17:19 +0000)]
Update SymbolVendorMacOSX for new GetUUID interface
The interface changed in r353714.
llvm-svn: 353721
Jessica Paquette [Mon, 11 Feb 2019 17:16:32 +0000 (17:16 +0000)]
Recommit "[GlobalISel] Add IRTranslator support for G_FFLOOR"
After the changes introduced in r353586, this instruction doesn't cause any
issues for any backend.
Original review: https://reviews.llvm.org/D57485
llvm-svn: 353720
Matt Arsenault [Mon, 11 Feb 2019 17:05:20 +0000 (17:05 +0000)]
GlobalISel: Add G_FCANONICALIZE instruction
llvm-svn: 353719
Nico Weber [Mon, 11 Feb 2019 16:37:02 +0000 (16:37 +0000)]
Make test actually test something (colons were missing)
llvm-svn: 353718
Valery Pykhtin [Mon, 11 Feb 2019 16:28:42 +0000 (16:28 +0000)]
[AMDGPU] fix atomic_optimizations_buffer.ll test after DPP combiner was enabled by default.
Related commits: rL353691, rL353703.
llvm-svn: 353717
Simon Pilgrim [Mon, 11 Feb 2019 16:16:09 +0000 (16:16 +0000)]
[X86] Regenerate insertelement tests
Add common X86/X64 prefixes (and use X86 instead of X32)
llvm-svn: 353716
Jonas Hahnfeld [Mon, 11 Feb 2019 16:14:51 +0000 (16:14 +0000)]
[OMPT] Remove test output from source tree
%s refers to the test file in the source tree. This was accidentally added in
r351197 / 2b46d30 ("[OMPT] Second chunk of final OMPT 5.0 interface updates").
Differential Revision: https://reviews.llvm.org/D58002
llvm-svn: 353715
Pavel Labath [Mon, 11 Feb 2019 16:14:02 +0000 (16:14 +0000)]
Simplify ObjectFile::GetUUID
instead of returning the UUID through by-ref argument and a boolean
value indicating success, we can just return it directly. Since the UUID
class already has an invalid state, it can be used to denote the failure
without the additional bool.
llvm-svn: 353714
David Greene [Mon, 11 Feb 2019 15:40:02 +0000 (15:40 +0000)]
Add recipes for migrating downstream branches of git mirrors
Add some common recipes for downstream users developing on top of the
existing git mirrors. These instructions show how to migrate local
branches to the monorepo.
Differential Revision: https://reviews.llvm.org/D56550
llvm-svn: 353713
Haojian Wu [Mon, 11 Feb 2019 15:18:11 +0000 (15:18 +0000)]
Revamp the "[clangd] Format tweak's replacements"
Summary:
This patch contains two parts:
1) reverts commit r353306.
2) move the format logic out from tweaks, keep tweaks API unchanged.
Reviewers: sammccall, ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58051
llvm-svn: 353712
Alexander Kornienko [Mon, 11 Feb 2019 15:17:13 +0000 (15:17 +0000)]
Fixed header underline in docs.
+ Removed trailing whitespace.
llvm-svn: 353711
Benjamin Kramer [Mon, 11 Feb 2019 15:16:21 +0000 (15:16 +0000)]
Move some classes into anonymous namespaces. NFC.
llvm-svn: 353710
Aleksandr Urakov [Mon, 11 Feb 2019 15:13:33 +0000 (15:13 +0000)]
[build.py] Add `-fms-compatibility-version=19` to `build.py`
Summary:
`clang-cl` can't compile tests containing `char16_t` and `char32_t` types
without the MSVC compatibility option passed. This patch adds the option to the
`clang-cl` call in the `build.py` script by default.
Reviewers: zturner, labath, stella.stamenova, serge-sans-paille
Reviewed By: labath
Subscribers: lldb-commits, leonid.mashinskiy
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D57809
llvm-svn: 353709
Eric Liu [Mon, 11 Feb 2019 15:05:29 +0000 (15:05 +0000)]
[clangd] Prefer location from codegen files when merging symbols.
Summary:
For example, if an index symbol has location in a .proto file and an AST symbol
has location in a generated .proto.h file, then we prefer location in .proto
which is more meaningful to users.
Also use `mergeSymbols` to get the preferred location between AST location and index location in go-to-def.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58037
llvm-svn: 353708
Serge Guelton [Mon, 11 Feb 2019 15:03:17 +0000 (15:03 +0000)]
[tools] Fix python DeprecationWarning: invalid escape sequence
The python documentation says "it’s highly recommended that you use raw strings for all but the simplest expressions." (https://docs.python.org/3/library/re.html)
So do that with the attached patch generated by
sed -i -e "s/re.search('/re.search(r'/g" $(git grep -l 're.search(')
The warning can be seen in e.g. python3.7:
$ python3.7 -Wd
>>> import re; re.search('\s', '')
<stdin>:1: DeprecationWarning: invalid escape sequence \s
Commited on behalf of Marco Falke.
Differential Revision: https://reviews.llvm.org/D57528
llvm-svn: 353707
Andrea Di Biagio [Mon, 11 Feb 2019 14:53:04 +0000 (14:53 +0000)]
[MCA] Return a mask of busy resources from method ResourceManager::checkAvailability(). NFCI
In case of bottlenecks caused by pipeline pressure, we want to be able to
correctly report the set of problematic pipelines. This is a first step towards
adding support for bottleneck hints in llvm-mca (see PR37494). No functional
change intended.
llvm-svn: 353706
Benjamin Kramer [Mon, 11 Feb 2019 14:52:15 +0000 (14:52 +0000)]
Make some helper functions static. NFC.
llvm-svn: 353705
Benjamin Kramer [Mon, 11 Feb 2019 14:49:54 +0000 (14:49 +0000)]
[AMDGPU] Remove unused variable
llvm-svn: 353704
Neil Henning [Mon, 11 Feb 2019 14:44:14 +0000 (14:44 +0000)]
[AMDGPU] Fix DPP sequence in atomic optimizer.
This commit fixes the DPP sequence in the atomic optimizer (which was
previously missing the row_shr:3 step), and works around a read_register
exec bug by using a ballot instead.
Differential Revision: https://reviews.llvm.org/D57737
llvm-svn: 353703
Pavel Labath [Mon, 11 Feb 2019 14:11:00 +0000 (14:11 +0000)]
Breakpad: auto-detect path style of file entries
Summary:
This adds support for auto-detection of path style to SymbolFileBreakpad
(similar to how r351328 did the same for DWARF). We guess each file
entry separately, as we have no idea which file came from which compile
units (and different compile units can have different path styles). The
breakpad generates should have already converted the paths to absolute
ones, so this guess should be reasonable accurate, but as always with
these kinds of things, it is hard to give guarantees about anything.
In an attempt to bring some unity to the path guessing logic, I move the
guessing logic from inside SymbolFileDWARF into the FileSpec class and
have both symbol files use it to implent their desired behavior.
Reviewers: clayborg, lemo, JDevlieghere
Subscribers: aprantl, markmentovai, lldb-commits
Differential Revision: https://reviews.llvm.org/D57895
llvm-svn: 353702
Michal Gorny [Mon, 11 Feb 2019 14:09:48 +0000 (14:09 +0000)]
[lldb] [lit] Fix finding lld-link when it is not in 'compiler dir'
Fix the build helper to find lld-link via PATH lookup, rather than
making a fragile assumption that it will be present in the 'compiler
directory'. This fixes tests on Gentoo where clang and lld
are installed in different directories.
Differential Revision: https://reviews.llvm.org/D58001
llvm-svn: 353701
Michal Gorny [Mon, 11 Feb 2019 14:09:43 +0000 (14:09 +0000)]
[lldb] [test] Skip lldb-mi test if LLDB_DISABLE_PYTHON is used
Skip running lldb-mi tests when Python support is disabled. This causes
lldb-mi to unconditionally fail, and therefore all the relevant tests
fail as well.
Differential Revision: https://reviews.llvm.org/D58000
llvm-svn: 353700
Sam McCall [Mon, 11 Feb 2019 14:05:36 +0000 (14:05 +0000)]
Revert "[X86][SSE] Generalize X86ISD::BLENDI support to more value types"
This reverts commit r353610.
It causes a miscompile visible in macro expansion in a bootstrapped clang.
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20190211/626590.html
llvm-svn: 353699
Kristof Umann [Mon, 11 Feb 2019 13:46:43 +0000 (13:46 +0000)]
[analyzer] New checker for detecting usages of unsafe I/O functions
There are certain unsafe or deprecated (since C11) buffer handling
functions which should be avoided in safety critical code. They
could cause buffer overflows. A new checker,
'security.insecureAPI.DeprecatedOrUnsafeBufferHandling' warns for
every occurrence of such functions (unsafe or deprecated printf,
scanf family, and other buffer handling functions, which now have
a secure variant).
Patch by Dániel Kolozsvári!
Differential Revision: https://reviews.llvm.org/D35068
llvm-svn: 353698
Fangrui Song [Mon, 11 Feb 2019 13:30:04 +0000 (13:30 +0000)]
Format isInSystemMacro after D55782
llvm-svn: 353697
Kadir Cetinkaya [Mon, 11 Feb 2019 13:03:08 +0000 (13:03 +0000)]
[clangd] Index parameters in function decls
Reviewers: hokein
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57950
llvm-svn: 353696
Kadir Cetinkaya [Mon, 11 Feb 2019 13:02:21 +0000 (13:02 +0000)]
[clang][Index] Add a knob to index function parameters in declarations
Summary:
Parameters in declarations are useful for clangd, so that we can
provide symbol information for them as well. It also helps clangd to be
consistent whether a function's definition is accessible or not.
Reviewers: hokein, akyrtzi
Subscribers: ilya-biryukov, ioeric, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57949
llvm-svn: 353695
Kadir Cetinkaya [Mon, 11 Feb 2019 13:01:47 +0000 (13:01 +0000)]
[clangd] Fix broken windows build bots.
llvm-svn: 353694
Max Kazantsev [Mon, 11 Feb 2019 12:58:18 +0000 (12:58 +0000)]
[TEST] Add missing opportunity test for PR39673
llvm-svn: 353693
Sam Parker [Mon, 11 Feb 2019 11:35:42 +0000 (11:35 +0000)]
[ARM] Add v8m.base pattern for add negative imm
The v8m.base ISA contains movw, which can operate on an unsigned
16-bit value. Add the pattern that converts an add with a negative
value, that could fit into 16-bits when negated, into a sub with that
positive value.
Differential Revision: https://reviews.llvm.org/D57942
llvm-svn: 353692
Valery Pykhtin [Mon, 11 Feb 2019 11:15:03 +0000 (11:15 +0000)]
[AMDGPU] Enable DPP combiner pass by default.
Related revisions: https://reviews.llvm.org/D55444, https://reviews.llvm.org/D55314
llvm-svn: 353691
Sven van Haastregt [Mon, 11 Feb 2019 11:00:56 +0000 (11:00 +0000)]
[libclang] Add attribute support for 'convergent'.
This bumps CINDEX_VERSION_MINOR up (to 51).
Patch by Hsin-Hsiao Lin.
Differential Revision: https://reviews.llvm.org/D57946
llvm-svn: 353690
Sam Parker [Mon, 11 Feb 2019 10:52:49 +0000 (10:52 +0000)]
[NFC][ARM] Simplify loop-indexing codegen test
Remove unnecessary offset checks, CHECK-BASE checks and add some
extra -NOT checks and TODO comments.
llvm-svn: 353689
Max Kazantsev [Mon, 11 Feb 2019 10:44:57 +0000 (10:44 +0000)]
[TEST] Add failing test from PR40454
llvm-svn: 353688
Kadir Cetinkaya [Mon, 11 Feb 2019 10:31:13 +0000 (10:31 +0000)]
[clangd] Make system header mappings available for PreambleParsedCallback
Summary:
SystemHeaderMappings were added only after takeIncludes call, which
resulted in getting mapping on main file ast updates but not on preamble ast
updates.
Fixes https://github.com/clangd/clangd/issues/8
Reviewers: hokein
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58029
llvm-svn: 353687
Pavel Labath [Mon, 11 Feb 2019 10:30:24 +0000 (10:30 +0000)]
Revert "minidump: Add ability to attach (breakpad) symbol files to placeholder modules"
The commit has broken TestMiniDump.py on windows. Reverting while I
investigate.
This reverts r353677.
llvm-svn: 353686
Diana Picus [Mon, 11 Feb 2019 10:30:22 +0000 (10:30 +0000)]
test-release.sh: Add option to use ninja
Allow the use of ninja instead of make. This is useful on some
platforms where we'd like to be able to limit the number of link jobs
without slowing down the other steps of the release.
This patch adds a -use-ninja command line option, which sets the
generator to Ninja both for LLVM and the test-suite. It also deals with
some differences between make and ninja:
* DESTDIR handling - ninja doesn't like this to be listed after the
target, but both make and ninja can handle it before the command
* Verbose mode - ninja uses -v, make uses VERBOSE=1
* Keep going mode - make has a -k mode, which builds as much as possible
even when failures are encountered; for ninja we need to set a hard
limit (we use 100 since most people won't look at 100 failures anyway)
I haven't tested with gmake.
llvm-svn: 353685
Gabor Marton [Mon, 11 Feb 2019 10:27:58 +0000 (10:27 +0000)]
[ASTImporter] Add test RedeclChainShouldBeCorrectAmongstNamespaces
Summary:
We add a new test to show that redecl chains are not handled properly
amongst namespaces. We cannot pass this test now, so this is disabled.
Subsequent patches will make this test pass.
Reviewers: a_sidorin, shafik, a.sidorin
Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57901
llvm-svn: 353684
Eugene Leviant [Mon, 11 Feb 2019 10:17:17 +0000 (10:17 +0000)]
Attempt to fix buildbot after r353679 #2
llvm-svn: 353683
Carlos Alberto Enciso [Mon, 11 Feb 2019 10:16:38 +0000 (10:16 +0000)]
[DWARF] LLVM ERROR: Broken function found, while removing Debug Intrinsics.
Check that when SimplifyCFG is flattening a 'br', all their debug intrinsic instructions are removed, including any dbg.label referencing a label associated with the basic blocks being removed.
As the test case involves a CFG transformation, move it to the correct location.
Differential Revision: https://reviews.llvm.org/D57444
llvm-svn: 353682
Eugene Leviant [Mon, 11 Feb 2019 10:12:19 +0000 (10:12 +0000)]
Attempt to fix buildbot after r353679
llvm-svn: 353681
Michal Gorny [Mon, 11 Feb 2019 10:02:26 +0000 (10:02 +0000)]
[lldb] [lldb-instr] Add missing linkage to clang libraries
Fix build errors against shared clang by adding all the libraries used
in the code.
Differential Revision: https://reviews.llvm.org/D57999
llvm-svn: 353680
Eugene Leviant [Mon, 11 Feb 2019 09:49:37 +0000 (09:49 +0000)]
Small refactoring of FileError. NFC.
Differential revision: https://reviews.llvm.org/D57945
llvm-svn: 353679
Sjoerd Meijer [Mon, 11 Feb 2019 09:37:42 +0000 (09:37 +0000)]
[ARM] LoadStoreOptimizer: reoder limit
The whole design of generating LDMs/STMs is fragile and unreliable: it depends on
rescheduling here in the LoadStoreOptimizer that isn't register pressure aware
and regalloc that isn't aware of generating LDMs/STMs.
This patch adds a (hidden) option to control the total number of instructions that
can be re-ordered. I appreciate this looks only a tiny bit better than a hard-coded
constant, but at least it allows more easy experimentation with different values
for now. Ideally we calculate this reorder limit based on some heuristics, and take
register pressure into account. I might be looking into that next.
Differential Revision: https://reviews.llvm.org/D57954
llvm-svn: 353678
Pavel Labath [Mon, 11 Feb 2019 09:32:08 +0000 (09:32 +0000)]
minidump: Add ability to attach (breakpad) symbol files to placeholder modules
Summary:
The reason this wasn't working was that ProcessMinidump was creating odd
object-file-less modules, and SymbolFileBreakpad required the module to
have an associated object file because it needed to get its base
address.
This fixes that by introducing a PlaceholderObjectFile to serve as a
dummy object file. The general idea for this is taken from D55142, but
I've reworked it a bit to avoid the need for the PlaceholderModule
class. Now that we have an object file, our modules are sufficiently
similar to regular modules that we can use the regular Module class
almost out of the box -- the only thing I needed to tweak was the
Module::CreateModuleFromObjectFile functon to set the module's FileSpec
in addition to it's architecture. This wasn't needed for ObjectFileJIT
(the other user of CreateModuleFromObjectFile), but it shouldn't hurt it
either, and the change seems like a straightforward extension of this
function.
Reviewers: clayborg, lemo, amccarth
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D57751
llvm-svn: 353677
Chandler Carruth [Mon, 11 Feb 2019 09:25:41 +0000 (09:25 +0000)]
Move CFLGraph and the AA summary code over to the new `CallBase`
instruction base class rather than the `CallSite` wrapper.
llvm-svn: 353676
Michal Gorny [Mon, 11 Feb 2019 09:18:46 +0000 (09:18 +0000)]
[lldb] [MainLoop] Initialize empty sigset_t correctly
Fix MainLoop::RunImpl::get_sigmask() to correctly return empty sigset_t
when SIGNAL_POLLING_UNSUPPORTED is true. On NetBSD (and probably
on some other platforms), integers are not implicitly convertible to
sigset_t, so 'return 0' is erraneous. Instead, sigset_t should be reset
through sigemptyset().
While at it, move common parts out of the #ifdef.
Differential Revision: https://reviews.llvm.org/D57959
llvm-svn: 353675
Michal Gorny [Mon, 11 Feb 2019 09:07:07 +0000 (09:07 +0000)]
[llvm] [cmake] Use current directory in GenerateVersionFromVCS
Find dependent scripts of GenerateVersionFromVCS in current directory
rather than ../../cmake/modules. I do not see any reason why the former
would not work and The latter is incorrect when GenerateVersionFromVCS
is used from install directory (i.e. in stand-alone builds).
Differential Revision: https://reviews.llvm.org/D57996
llvm-svn: 353674
Chandler Carruth [Mon, 11 Feb 2019 09:03:32 +0000 (09:03 +0000)]
Remove `CallSite` from the CodeMetrics analysis, moving it to the new
`CallBase` and simpler APIs therein.
llvm-svn: 353673
Chandler Carruth [Mon, 11 Feb 2019 09:03:26 +0000 (09:03 +0000)]
Remove a declaration that is dead, and not even implemented any longer.
llvm-svn: 353672
Petr Hosek [Mon, 11 Feb 2019 08:48:47 +0000 (08:48 +0000)]
[libcxx] Preserve order, avoid duplicates when merging static archives
glob can return files in arbitrary order which breaks deterministic
builds. Rather, use `ar t` to list the files in each archive and
preserve the original order. Using `ar q` results in duplicate entries
in the archive, instead use `ar r` to avoid duplicates.
Differential Revision: https://reviews.llvm.org/D58024
llvm-svn: 353671
Sjoerd Meijer [Mon, 11 Feb 2019 08:47:59 +0000 (08:47 +0000)]
[ARM] LoadStoreOptimizer: just a clean-up. NFC.
Differential Revision: https://reviews.llvm.org/D57955
llvm-svn: 353670
Chandler Carruth [Mon, 11 Feb 2019 08:39:23 +0000 (08:39 +0000)]
The new file header didn't get carried over when these files were
"moved" somehow, update them to use it.
llvm-svn: 353669
Chandler Carruth [Mon, 11 Feb 2019 08:39:14 +0000 (08:39 +0000)]
Update some newly added files that mistakenly used the old file header
to the new one.
llvm-svn: 353668
Chandler Carruth [Mon, 11 Feb 2019 08:25:56 +0000 (08:25 +0000)]
Update more files added with the old header to the new one.
llvm-svn: 353667
Chandler Carruth [Mon, 11 Feb 2019 08:25:19 +0000 (08:25 +0000)]
Update new files added to llvm-objcopy to use the new file header.
llvm-svn: 353666
Chandler Carruth [Mon, 11 Feb 2019 08:07:38 +0000 (08:07 +0000)]
Update files that were mistakenly added with the old file header to the
new one.
llvm-svn: 353665
Chandler Carruth [Mon, 11 Feb 2019 08:07:32 +0000 (08:07 +0000)]
Update files that were mistakenly added with the old file header.
llvm-svn: 353664
Chandler Carruth [Mon, 11 Feb 2019 08:03:41 +0000 (08:03 +0000)]
Update files to the new header that were incorrectly landed with the old
one.
llvm-svn: 353663
Chandler Carruth [Mon, 11 Feb 2019 07:54:10 +0000 (07:54 +0000)]
[CallSite removal] Port InstSimplify over to use `CallBase` both in its
interface and implementation.
Port code with: `cast<CallBase>(CS.getInstruction())`.
llvm-svn: 353662
Chandler Carruth [Mon, 11 Feb 2019 07:51:44 +0000 (07:51 +0000)]
[CallSite removal] Migrate ConstantFolding APIs and implementation to
`CallBase`.
Users have been updated. You can see how to update any out-of-tree
usages: pass `cast<CallBase>(CS.getInstruction())`.
llvm-svn: 353661
Chandler Carruth [Mon, 11 Feb 2019 07:42:30 +0000 (07:42 +0000)]
[CallSite removal] Migrate the statepoint GC infrastructure to use the
`CallBase` class rather than `CallSite` wrappers.
I pushed this change down through most of the statepoint infrastructure,
completely removing the use of CallSite where I could reasonably do so.
I ended up making a couple of cut-points: generic call handling
(instcombine, TLI, SDAG). As soon as it hit truly generic handling with
users outside the immediate code, I simply transitioned into or out of
a `CallSite` to make this a reasonable sized chunk.
Differential Revision: https://reviews.llvm.org/D56122
llvm-svn: 353660
Craig Topper [Mon, 11 Feb 2019 07:30:48 +0000 (07:30 +0000)]
[X86] Removed unused SDTypeProfile. NFC
llvm-svn: 353659
Petr Hosek [Mon, 11 Feb 2019 05:38:01 +0000 (05:38 +0000)]
[CMake][Fuchsia] Drop libclang.so from distribution
This is no longer needed now that all users have switched to clangd.
llvm-svn: 353658
Nico Weber [Mon, 11 Feb 2019 03:09:57 +0000 (03:09 +0000)]
gn build: Fix clang-tidy dep on ClangSACheckers.
Patch by Mirko Bonadei <mbonadei@webrtc.org>!
Differential Revision: https://reviews.llvm.org/D57998
llvm-svn: 353657
Brad Smith [Mon, 11 Feb 2019 02:53:16 +0000 (02:53 +0000)]
long double is double on OpenBSD/NetBSD/PPC.
Patch by George Koehler.
llvm-svn: 353656
Simon Pilgrim [Sun, 10 Feb 2019 22:45:48 +0000 (22:45 +0000)]
[X86] EltsFromConsecutiveLoads - replace SmallBitVector with APInt (NFC).
Minor refactor to simplify some incoming patches to improve broadcast loads.
llvm-svn: 353655
Reid Kleckner [Sun, 10 Feb 2019 20:20:26 +0000 (20:20 +0000)]
Fix test to pass on LLP64 targets
llvm-svn: 353654
Reid Kleckner [Sun, 10 Feb 2019 20:17:07 +0000 (20:17 +0000)]
Fix clang tests broken by r353547 that depend on InstrProf
llvm-svn: 353653
Mandeep Singh Grang [Sun, 10 Feb 2019 19:53:43 +0000 (19:53 +0000)]
[GlobalISel] Regex the opcodes in unit test to fix non-deterministic ordering
Differential Revision: https://reviews.llvm.org/D57988
llvm-svn: 353652
Nikita Popov [Sun, 10 Feb 2019 19:06:38 +0000 (19:06 +0000)]
[CodeGen][X86] Don't scalarize vector saturating add/sub
Now that we have vector support for [US](ADD|SUB)O we no longer
need to scalarize when expanding [US](ADD|SUB)SAT.
This matches what the cost model already does.
Differential Revision: https://reviews.llvm.org/D57348
llvm-svn: 353651
Eric Fiselier [Sun, 10 Feb 2019 18:29:00 +0000 (18:29 +0000)]
fix -Wextra-semi warnings
llvm-svn: 353650
Eric Fiselier [Sun, 10 Feb 2019 18:27:55 +0000 (18:27 +0000)]
Make LIBCXX_STANDARD_VER configurable
llvm-svn: 353649
Simon Pilgrim [Sun, 10 Feb 2019 18:27:37 +0000 (18:27 +0000)]
[AArch64] Regenerate bswap tests
llvm-svn: 353648
Simon Pilgrim [Sun, 10 Feb 2019 18:07:03 +0000 (18:07 +0000)]
[X86] Add basic bitreverse/bswap combine tests
Shows missing SimplifyDemandedBits support
llvm-svn: 353647
Simon Pilgrim [Sun, 10 Feb 2019 17:42:15 +0000 (17:42 +0000)]
[DAG] Add optional AllowUndefs to isNullOrNullSplat
No change in default behaviour (AllowUndefs = false)
llvm-svn: 353646
Simon Pilgrim [Sun, 10 Feb 2019 17:04:00 +0000 (17:04 +0000)]
[DAGCombine] Simplify funnel shifts with undef/zero args to bitshifts
Now that we have SimplifyDemandedBits support for funnel shifts (rL353539), we need to simplify funnel shifts back to bitshifts in cases where either argument has been folded to undef/zero.
Differential Revision: https://reviews.llvm.org/D58009
llvm-svn: 353645
Simon Pilgrim [Sun, 10 Feb 2019 15:46:32 +0000 (15:46 +0000)]
[X86] Add masked variable tests for funnel undef/zero argument combines
I've avoided 'modulo' masks as we'll SimplifyDemandedBits those in the future, and we just need to check that the shift variable is 'in range'
llvm-svn: 353644
Raphael Isemann [Sun, 10 Feb 2019 15:41:53 +0000 (15:41 +0000)]
Fix x86 return pattern detection
Summary: Replace 0xc9 (LEAVE) with 0xcb (RETF) in ret_pattern_p(). Also put 0xc3 first, since it is the most common form and will match first.
Reviewers: jasonmolenda
Reviewed By: jasonmolenda
Subscribers: labath, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D57928
llvm-svn: 353643
Raphael Isemann [Sun, 10 Feb 2019 15:23:58 +0000 (15:23 +0000)]
lldb: Fix compilation on OpenBSD
Summary: Update the OpenBSD Host.cpp for the new SetFile() function signature. Fixes compiling lldb on OpenBSD.
Reviewers: krytarowski
Reviewed By: krytarowski
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D57907
llvm-svn: 353642
Sanjay Patel [Sun, 10 Feb 2019 15:22:06 +0000 (15:22 +0000)]
[x86] narrow 256-bit horizontal ops via demanded elements
256-bit horizontal math ops are an x86 monstrosity (and thankfully have
not been extended to 512-bit AFAIK).
The two 128-bit halves operate on separate halves of the inputs. So if we
don't demand anything in the upper half of the result, we can extract the
low halves of the inputs, do the math, and then insert that result into a
256-bit output.
All of the extract/insert is free (ymm<-->xmm), so we're left with a
narrower (cheaper) version of the original op.
In the affected tests based on:
https://bugs.llvm.org/show_bug.cgi?id=33758
https://bugs.llvm.org/show_bug.cgi?id=38971
...we see that the h-op narrowing can result in further narrowing of other
math via existing generic transforms.
I originally drafted this patch as an exact pattern match starting from
extract_vector_elt, but I thought we might see diffs starting from
extract_subvector too, so I changed it to a more general demanded elements
solution. There are no extra existing regression test improvements from
that switch though, so we could go back.
Differential Revision: https://reviews.llvm.org/D57841
llvm-svn: 353641
Simon Pilgrim [Sun, 10 Feb 2019 14:54:57 +0000 (14:54 +0000)]
[X86] Add additional tests for funnel undef/zero argument combines
As suggested on D58009
llvm-svn: 353640
Sanjay Patel [Sun, 10 Feb 2019 14:29:57 +0000 (14:29 +0000)]
[TargetLowering] refactor setcc folds to fix another miscompile (PR40657)
SimplifySetCC still has much room for improvement, but this should
fix the remaining problem examples from:
https://bugs.llvm.org/show_bug.cgi?id=40657
The initial fix for this problem was rL353615.
llvm-svn: 353639
Simon Pilgrim [Sun, 10 Feb 2019 12:55:44 +0000 (12:55 +0000)]
[X86][SSE] Add SimplifyDemandedBits test for BLENDVPD
llvm-svn: 353638
Fangrui Song [Sun, 10 Feb 2019 09:25:56 +0000 (09:25 +0000)]
[Local] Delete a redundant check. NFC
isInstructionTriviallyDead also performs the use_empty() check.
llvm-svn: 353637
George Rimar [Sun, 10 Feb 2019 08:35:38 +0000 (08:35 +0000)]
[yaml2obj] - Fix .dynamic section entries writing for 32bit targets.
This was introduced by me in r353613.
I tried to fix Big-endian bot and replaced
uintX_t -> ELFT::Xword. But ELFT::Xword is a packed<uint64_t>,
so it is always 8 bytes and that was obviously incorrect.
My intention was to use something like packed<uint> actually, which
size is target dependent.
Patch fixes this bug and adds a test case, since no bots seems reported this.
llvm-svn: 353636
Fangrui Song [Sun, 10 Feb 2019 05:54:57 +0000 (05:54 +0000)]
Use llvm::is_contained. NFC
llvm-svn: 353635
Eric Fiselier [Sun, 10 Feb 2019 04:48:54 +0000 (04:48 +0000)]
Format sym_extract.py output to minimize diff output.
Different versions of python print dictionaries in different orders.
This can mess up diffs when updating ABI lists. This patch uses
pprint.pformat to print the dicts to get a consistent ordering.
llvm-svn: 353634
Eric Fiselier [Sun, 10 Feb 2019 04:41:48 +0000 (04:41 +0000)]
Add missing symbols to Apple v2 abi list.
The itoa symbols were added and their addition is documented in the CHANGELOG.
I'm not sure why the valarray symbols were missing previously, but they're
present in the v1 ABI lists and should be here as well.
llvm-svn: 353633
Eric Fiselier [Sun, 10 Feb 2019 04:09:46 +0000 (04:09 +0000)]
Add ABI list directories for 8.0
llvm-svn: 353632
Craig Topper [Sun, 10 Feb 2019 02:34:31 +0000 (02:34 +0000)]
[X86] Move some vector InstAliases out from under unnecessary 'let Predicates'. NFCI
We don't have any assembler predicates for vector ISAs so this isn't necessary. It just adds extra lines and identation.
llvm-svn: 353631
Craig Topper [Sun, 10 Feb 2019 02:21:29 +0000 (02:21 +0000)]
[InstCombine] Fix an unused variable warning.
llvm-svn: 353630
James Y Knight [Sat, 9 Feb 2019 22:22:28 +0000 (22:22 +0000)]
[opaque pointer types] Cleanup CGBuilder's Create*GEP.
The various EltSize, Offset, DataLayout, and StructLayout arguments
are all computable from the Address's element type and the DataLayout
which the CGBuilder already has access to.
After having previously asserted that the computed values are the same
as those passed in, now remove the redundant arguments from
CGBuilder's Create*GEP functions.
Differential Revision: https://reviews.llvm.org/D57767
llvm-svn: 353629
Simon Pilgrim [Sat, 9 Feb 2019 22:21:09 +0000 (22:21 +0000)]
[X86] Add tests for funnel undef argument combines
If one of the shifted arguments is undef we should be folding to a regular shift.
llvm-svn: 353628
Vitaly Buka [Sat, 9 Feb 2019 22:08:31 +0000 (22:08 +0000)]
tsan: Implement pthread_exit() interceptor for Thread sanitizer
This change is preparation for fiber support.
Author: yuri (Yuri Per)
Reviewed in: https://reviews.llvm.org/D57876
Context: https://reviews.llvm.org/D54889
> llvm-svn: 353385
llvm-svn: 353627
Simon Pilgrim [Sat, 9 Feb 2019 20:34:59 +0000 (20:34 +0000)]
[X86] CombineOr - fold to generic funnel shifts
As discussed on D57389, this is a first step towards moving the SHLD/SHRD matching code to DAGCombiner using FSHL/FSHR instead.
There's a bit of work to do before I can do that, so this just folds to FSHL/FSHR in the existing code (handling the different SHRD/FSHR argument ordering), which fixes the issue we had with i16 shift amounts not being correctly masked.
llvm-svn: 353626