platform/upstream/llvm.git
5 years ago[Driver] Define _FILE_OFFSET_BITS=64 on Solaris
Rainer Orth [Tue, 30 Jul 2019 10:38:41 +0000 (10:38 +0000)]
[Driver] Define _FILE_OFFSET_BITS=64 on Solaris

make check-all currently fails on x86_64-pc-solaris2.11 when building with GCC 9:

  Undefined                       first referenced
   symbol                             in file
  _ZN11__sanitizer14internal_lseekEimi SANITIZER_TEST_OBJECTS.sanitizer_libc_test.cc.i386.o
  _ZN11__sanitizer23MapWritableFileToMemoryEPvmim SANITIZER_TEST_OBJECTS.sanitizer_libc_test.cc.i386.o
  ld: fatal: symbol referencing errors
  clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
  make[3]: *** [projects/compiler-rt/lib/sanitizer_common/tests/CMakeFiles/TSanitizer-i386-Test.dir/build.make:92: projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-i386-Test] Error 1

While e.g. __sanitizer::internal_lseek is defined in sanitizer_solaris.cc, g++ 9
predefines _FILE_OFFSET_BITS=64 while clang++ currently does not.

This patch resolves this inconsistency by following the gcc lead, which allows
make check-all to finish successfully.

There's one caveat: gcc defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE for C++ only, while clang has long been doing it for
all languages.  I'd like to keep it this way because those macros do is to make
declarations of fseek/ftello (_LARGEFILE_SOURCE) resp. the 64-bit versions
of largefile functions (*64 with _LARGEFILE64_SOURCE) visible additionally.
However, _FILE_OFFSET_BITS=64 changes all affected functions to be largefile-aware.
I'd like to restrict this to C++, just like gcc does.

To avoid a similar inconsistence with host compilers that don't predefine _FILE_OFFSET_BITS=64
(e.g. clang < 9, gcc < 9), this needs a compantion patch https://reviews.llvm.org/D64483.

Tested on x86_64-pc-solaris2.11.

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

llvm-svn: 367305

5 years ago[CMake] Define _FILE_OFFSET_BITS=64 on Solaris
Rainer Orth [Tue, 30 Jul 2019 10:33:20 +0000 (10:33 +0000)]
[CMake] Define _FILE_OFFSET_BITS=64 on Solaris

This is the compantion patch to https://reviews.llvm.org/D64482, needed to ensure
that builds with host compilers that don't yet predefine _FILE_OFFSET_BITS=64 on
Solaris succeed by always making the host and freshly built clang consistent.

Tested on x86_64-pc-solaris2.11.

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

llvm-svn: 367304

5 years ago[clangd] Ignore diags from builtin files
Kadir Cetinkaya [Tue, 30 Jul 2019 10:26:51 +0000 (10:26 +0000)]
[clangd] Ignore diags from builtin files

Summary:
This fixes a case where we show diagnostics on arbitrary lines, in an
internal codebase.

Open for ideas on unittesting this.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 367303

5 years ago[lldb][docs] Update documentation for monorepo and CMake caches
Stefan Granitz [Tue, 30 Jul 2019 10:21:28 +0000 (10:21 +0000)]
[lldb][docs] Update documentation for monorepo and CMake caches

Summary: The lldb build system made good progress in the last months, but documentation was still lacking behind. Here's a patch to catch up.

Reviewers: JDevlieghere, jingham, labath, stella.stamenova, teemperor, jryans, kastiglione, xiaobai, compnerd, zturner

Reviewed By: labath, stella.stamenova, jryans

Subscribers: clayborg, amccarth, friss, lldb-commits, #lldb

Tags: #lldb

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

llvm-svn: 367302

5 years ago[AArch64] Disable __ARM_FEATURE_SVE without ACLE.
Sander de Smalen [Tue, 30 Jul 2019 10:14:39 +0000 (10:14 +0000)]
[AArch64] Disable __ARM_FEATURE_SVE without ACLE.

The Arm C Language Extensions for SVE document specifies that
__ARM_FEATURE_SVE should be set when the compiler supports SVE and
implements all the extensions described in the document.

This is currently not yet the case, so the feature should be disabled
until the compiler can provide all the extensions as described.

Reviewers: c-rhodes, rengolin, rovka, ktkachov

Reviewed By: rengolin

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

llvm-svn: 367301

5 years agoPECOFF: Fix a "memset clearing an object of non-trivial type" warning
Pavel Labath [Tue, 30 Jul 2019 08:42:42 +0000 (08:42 +0000)]
PECOFF: Fix a "memset clearing an object of non-trivial type" warning

This time, the warning pointed to an actual problem, because the
coff_opt_header structure contained a std::vector. I guess this happened
to work because the all-zero state was a valid representation of an
empty vector, but its not a good idea to rely on that.

I remove the memset, and have the structure clear its members in the
constructor instead.

llvm-svn: 367299

5 years agoSymbolVendor: Move locking into the Symbol Files
Pavel Labath [Tue, 30 Jul 2019 08:20:05 +0000 (08:20 +0000)]
SymbolVendor: Move locking into the Symbol Files

Summary:
The last bit of functionality in SymbolVendor passthrough functions is
the locking the module mutex. While it may be nice doing the locking in
a central place, we weren't really succesful in doing that right now,
because some SymbolFile function could still be called without going
through the SymbolVendor. This meant in SymbolFileDWARF (the only
battle-tested symbol file implementation) roughly a half of the
functions was taking additional locks and another half was asserting
that the lock is already held. By making the SymbolFile responsible for
locking, we can at least make the situation in SymbolFileDWARF more
consistent.

Reviewers: clayborg, JDevlieghere, jingham, jdoerfert

Subscribers: aprantl, lldb-commits

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

llvm-svn: 367298

5 years ago[ARM][LowOverheadLoops] Enable by default
Sam Parker [Tue, 30 Jul 2019 08:14:28 +0000 (08:14 +0000)]
[ARM][LowOverheadLoops] Enable by default

The code is now in a good enough state to pass the bunch of tests that
I have run (after fixing the bugs), so let's enable it by default.

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

llvm-svn: 367297

5 years ago[ARM][LowOverheadLoops] Revert non-header LE target
Sam Parker [Tue, 30 Jul 2019 08:08:44 +0000 (08:08 +0000)]
[ARM][LowOverheadLoops] Revert non-header LE target

Revert the hardware loop upon finding a LoopEnd that doesn't target
the loop header, instead of asserting a failure.

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

llvm-svn: 367296

5 years ago[builtins][test] XFAIL two SPARC tests
Rainer Orth [Tue, 30 Jul 2019 08:05:14 +0000 (08:05 +0000)]
[builtins][test] XFAIL two SPARC tests

Two SPARC builtins tests are currently FAILing due to codegen bugs:

  Builtins-sparc-sunos :: divtc3_test.c
  Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c
  Builtins-sparcv9-sunos :: divtc3_test.c

I'd like to XFAIL them to reduce testsuite noise.

Done as follows, tested on sparcv9-sun-solaris2.11 and x86_64-pc-solaris2.11.

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

llvm-svn: 367295

5 years ago[NFC][X86][AArch64] Revisit test coverage for X s% C == 0 fold - add tests for negati...
Roman Lebedev [Tue, 30 Jul 2019 08:00:49 +0000 (08:00 +0000)]
[NFC][X86][AArch64] Revisit test coverage for X s% C == 0 fold - add tests for negative divisors, INT_MIN divisors

As discussed in the review, that fold is only valid for positive
divisors, so while we can negate negative divisors,
we have to special-case INT_MIN.

llvm-svn: 367294

5 years ago[ASan][test] XFAIL AddressSanitizer-*-sunos :: TestCases/intercept-rethrow-exception...
Rainer Orth [Tue, 30 Jul 2019 07:59:43 +0000 (07:59 +0000)]
[ASan][test] XFAIL AddressSanitizer-*-sunos ::  TestCases/intercept-rethrow-exception.cc on Solaris

AddressSanitizer-*-sunos :: TestCases/intercept-rethrow-exception.cc currently FAILs
on Solaris.  This happens because std::rethrow_exception cannot be intercepted, as
detailed in Bug 42703.

To account for this and reduce testsuite noise, this patch XFAILs the test.

Tested on x86_64-pc-solaris2.11.

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

llvm-svn: 367293

5 years ago[AArch64][AsmParser] Remove SVE and SVE2 from ARMTargetParser
Cullen Rhodes [Tue, 30 Jul 2019 07:47:48 +0000 (07:47 +0000)]
[AArch64][AsmParser] Remove SVE and SVE2 from ARMTargetParser

Summary:
Patch removes SVE and SVE2 features from ARMTargetParser as these
features are not supported on ARM.

Reviewed By: rengolin

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

llvm-svn: 367292

5 years ago[lldb] [test/lldb-vscode] Use realpath to match vscode behavior
Michal Gorny [Tue, 30 Jul 2019 07:47:22 +0000 (07:47 +0000)]
[lldb] [test/lldb-vscode] Use realpath to match vscode behavior

Compare the directory paths returned by lldb-vscode against realpaths
rather than apparent paths.  This matches lldb-vscode behavior
and therefore fixes test failures when one of the parent directories
of the source tree is a symlink.

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

llvm-svn: 367291

5 years ago[lldb] [test/lldb-vscode] Use os.path.dirname() [NFC]
Michal Gorny [Tue, 30 Jul 2019 07:47:16 +0000 (07:47 +0000)]
[lldb] [test/lldb-vscode] Use os.path.dirname() [NFC]

Replace os.path.split()[0] with os.path.dirname().  Suggested by Pavel
Labath in D65432.

llvm-svn: 367290

5 years agoRevert "[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)"
Roman Lebedev [Tue, 30 Jul 2019 07:44:58 +0000 (07:44 +0000)]
Revert "[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)"

test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG broke:

Only PHI nodes may reference their own value!
  %sub33 = srem i32 %sub33, %ranks_in_i

This reverts commit r367288.

llvm-svn: 367289

5 years ago[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)
Roman Lebedev [Tue, 30 Jul 2019 07:10:00 +0000 (07:10 +0000)]
[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)

Summary:
While `-div-rem-pairs` pass can decompose rem in div+rem pair when div-rem pair
is unsupported by target, nothing performs the opposite fold.
We can't do that in InstCombine or DAGCombine since neither of those has access to TTI.
So it makes most sense to teach `-div-rem-pairs` about it.

If we matched rem in expanded form, we know we will be able to place div-rem pair
next to each other so we won't regress the situation.
Also, we shouldn't decompose rem if we matched already-decomposed form.
This is surprisingly straight-forward otherwise.

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

Reviewers: spatel, RKSimon, efriedma, ZaMaZaN4iK, bogner

Reviewed By: bogner

Subscribers: bogner, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 367288

5 years ago[APInt] Introduce clearLowBits()
Roman Lebedev [Tue, 30 Jul 2019 07:09:41 +0000 (07:09 +0000)]
[APInt] Introduce clearLowBits()

Summary: Equivalent to `x & -2^K`.

Reviewers: RKSimon, craig.topper

Reviewed By: RKSimon, craig.topper

Subscribers: dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 367287

5 years agoRevert "[llvm-objdump] Add warning messages if disassembly + source for problematic...
Michael Pozulp [Tue, 30 Jul 2019 07:05:27 +0000 (07:05 +0000)]
Revert "[llvm-objdump] Add warning messages if disassembly + source for problematic inputs"

This reverts r367284 (git commit b1cbe51bdf44098c74f5c74b7bcd8c041a7c6772).
My changes to LLVMSymbolizer caused a test to fail:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29488

llvm-svn: 367286

5 years ago[lldb] [test] Mark newly running test XFAIL on NetBSD
Michal Gorny [Tue, 30 Jul 2019 06:12:03 +0000 (06:12 +0000)]
[lldb] [test] Mark newly running test XFAIL on NetBSD

The test was not previously run due to decorator bug (fixed in r366903).
It is not a regression and is probably related to the other failing
test, so just disable it.

llvm-svn: 367285

5 years ago[llvm-objdump] Add warning messages if disassembly + source for problematic inputs
Michael Pozulp [Tue, 30 Jul 2019 05:28:26 +0000 (05:28 +0000)]
[llvm-objdump] Add warning messages if disassembly + source for problematic inputs

Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905

Reviewers: jhenderson, rupprecht, grimar

Reviewed By: jhenderson, grimar

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 367284

5 years ago[NFC][PowerPC] Add test case for D65063
Zi Xuan Wu [Tue, 30 Jul 2019 05:22:03 +0000 (05:22 +0000)]
[NFC][PowerPC] Add test case for D65063

llvm-svn: 367283

5 years ago[NFC] use C++11 in AlignOf.h, remove AlignedCharArray
JF Bastien [Tue, 30 Jul 2019 04:03:33 +0000 (04:03 +0000)]
[NFC] use C++11 in AlignOf.h, remove AlignedCharArray

I removed all uses of AlignedCharArray since the minimum MSVC version can handle
alignas on char arrays correctly. We can therefore remove AlignedCharArray.

This patch also updates AlignedCharArrayUnion to use C++11.

llvm-svn: 367282

5 years ago[PowerPC] [Clang] Add platform guards to PPC vector intrinsics headers
Qiu Chaofan [Tue, 30 Jul 2019 02:18:11 +0000 (02:18 +0000)]
[PowerPC] [Clang] Add platform guards to PPC vector intrinsics headers

Move the platform check out of PPC Linux toolchain code and add platform guards
to the intrinsic headers, since they are supported currently only on 64-bit
PowerPC targets.

Reviewed By: Jinsong Ji

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

llvm-svn: 367281

5 years ago[FileCollector] test: disable the directory entry collection checks on windows
Alex Lorenz [Tue, 30 Jul 2019 00:27:33 +0000 (00:27 +0000)]
[FileCollector] test: disable the directory entry collection checks on windows

Looks like one of the entries isn't found on windows. I'm investigating why.
In the meantime, I'll disable this part of the test on windows.

llvm-svn: 367280

5 years ago[clang-doc] Fix expected output in tests
Diego Astiazaran [Tue, 30 Jul 2019 00:07:34 +0000 (00:07 +0000)]
[clang-doc] Fix expected output in tests

Removes conversion of html paths in output. These will always be in
posix-style paths.

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

llvm-svn: 367279

5 years ago[FileCollector] Add a VFS that records FS accesses using the FileCollector
Alex Lorenz [Mon, 29 Jul 2019 23:38:30 +0000 (23:38 +0000)]
[FileCollector] Add a VFS that records FS accesses using the FileCollector

This patch adds a VFS that can be overlaid on top of another VFS
to record file system accesses using the FileCollector.
This can help to gather files that are needed for reproducers.

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

llvm-svn: 367278

5 years ago[NFC] avoid AlignedCharArray in LLVM
JF Bastien [Mon, 29 Jul 2019 23:37:48 +0000 (23:37 +0000)]
[NFC] avoid AlignedCharArray in LLVM

As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.

llvm-svn: 367277

5 years agoFix Linux build
JF Bastien [Mon, 29 Jul 2019 23:28:44 +0000 (23:28 +0000)]
Fix Linux build

r367274 broke it

llvm-svn: 367276

5 years ago[NFC] avoid AlignedCharArray in lldb
JF Bastien [Mon, 29 Jul 2019 23:17:08 +0000 (23:17 +0000)]
[NFC] avoid AlignedCharArray in lldb

As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.

llvm-svn: 367275

5 years ago[NFC] avoid AlignedCharArray in clang
JF Bastien [Mon, 29 Jul 2019 23:12:48 +0000 (23:12 +0000)]
[NFC] avoid AlignedCharArray in clang

As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.

llvm-svn: 367274

5 years ago[CMake] Move project() call to main CMake file
Haibo Huang [Mon, 29 Jul 2019 23:09:31 +0000 (23:09 +0000)]
[CMake] Move project() call to main CMake file

Summary:
The main CMake file don't have a project() call. In this case, cmake will run a dummy project(Project ) at the very beginning. Even before cmake_minimum_required. And a series of compiler detections will be triggered.

This is problematic if we depends on some policy to be set. E.g. CMP0056. try_compile will fail before we have a chance to do anything.

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 367273

5 years ago[DependencyCollector] Make maybeAddDependency virtual (NFC)
Jonas Devlieghere [Mon, 29 Jul 2019 23:02:11 +0000 (23:02 +0000)]
[DependencyCollector] Make maybeAddDependency virtual (NFC)

Make DependencyCollector::maybeAddDependency, just like its other
methods, which I made virtual a while ago. The motivation for this
change is still the LLDB reproducer.

llvm-svn: 367271

5 years ago[docs] Add a note about where UBSan emits logs
Vedant Kumar [Mon, 29 Jul 2019 22:54:43 +0000 (22:54 +0000)]
[docs] Add a note about where UBSan emits logs

llvm-svn: 367270

5 years ago[DebugInfo] Don't emit incorrect descriptions of thunk params (PR42627)
Vedant Kumar [Mon, 29 Jul 2019 22:49:55 +0000 (22:49 +0000)]
[DebugInfo] Don't emit incorrect descriptions of thunk params (PR42627)

The `this` parameter of a thunk requires adjustment. Stop emitting an
incorrect dbg.declare pointing to the unadjusted pointer.

We could describe the adjusted value instead, but there may not be much
benefit in doing so as users tend not to debug thunks.

Robert O'Callahan reports that this matches gcc's behavior.

Fixes PR42627.

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

llvm-svn: 367269

5 years agoFix tests with modules enabled
Eric Fiselier [Mon, 29 Jul 2019 22:48:51 +0000 (22:48 +0000)]
Fix tests with modules enabled

llvm-svn: 367268

5 years agoEnsure __config_site definitions are passed to modules tests.
Eric Fiselier [Mon, 29 Jul 2019 22:48:34 +0000 (22:48 +0000)]
Ensure __config_site definitions are passed to modules tests.

The test configuration contained a bug where we only raised
the __config_site commands to the command line if modules were
enabled for all of the libc++ tests. However there are special
modules-only tests, and these tests weren't getting the correct
defines.

This patch corrects that issue.

llvm-svn: 367267

5 years ago[llvm-lipo] Fix test on Windows
Anusha Basana [Mon, 29 Jul 2019 22:27:27 +0000 (22:27 +0000)]
[llvm-lipo] Fix test on Windows

Error message outputs with lowercase on Windows.
Made test work on Widnows.

For example:
llvm-lipo: error: 'i386': no such file or directory

llvm-svn: 367266

5 years agoRevert "[compiler-rt] Appending COMPILER_RT_LIBCXX_PATH -isystem include for xray...
Francis Visoiu Mistrih [Mon, 29 Jul 2019 22:08:12 +0000 (22:08 +0000)]
Revert "[compiler-rt] Appending COMPILER_RT_LIBCXX_PATH -isystem include for xray (2)"

This reverts commit r367250. It's failing on green dragon:
http://lab.llvm.org:8080/green/job/clang-stage1-RA/482/console.

llvm-svn: 367265

5 years ago[clang-doc] Fix failing tests on Windows
Diego Astiazaran [Mon, 29 Jul 2019 22:03:39 +0000 (22:03 +0000)]
[clang-doc] Fix failing tests on Windows

Tests on Windows were failing due to path separator differences.
Links in HTML should use posix-style paths.

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

llvm-svn: 367264

5 years ago[clang-tidy]: Google: new check 'google-upgrade-googletest-case'
Eric Fiselier [Mon, 29 Jul 2019 21:38:56 +0000 (21:38 +0000)]
[clang-tidy]: Google: new check 'google-upgrade-googletest-case'

Introduce a new check to upgrade user code based on API changes in Googletest.

The check finds uses of old Googletest APIs with "case" in their name and replaces them with the new APIs named with "suite".

Patch by Alex Strelnikov (strel@google.com)
Reviewed as D62977.

llvm-svn: 367263

5 years ago[Symbolication] Remove some dead code. Nothing exciting.
Davide Italiano [Mon, 29 Jul 2019 21:25:51 +0000 (21:25 +0000)]
[Symbolication] Remove some dead code. Nothing exciting.

llvm-svn: 367262

5 years ago[Symbolication] Remove a duplicate assignment.
Davide Italiano [Mon, 29 Jul 2019 21:25:45 +0000 (21:25 +0000)]
[Symbolication] Remove a duplicate assignment.

llvm-svn: 367261

5 years ago[Symbolication] Fix unicode compatibility between 2 and 3.
Davide Italiano [Mon, 29 Jul 2019 21:25:37 +0000 (21:25 +0000)]
[Symbolication] Fix unicode compatibility between 2 and 3.

Triples are always ASCII for now, but we were handed out a
unicode object.

<rdar://problem/53592772>

llvm-svn: 367260

5 years agogit-llvm: Restore compatibility with git 1.8.3.
James Y Knight [Mon, 29 Jul 2019 21:01:11 +0000 (21:01 +0000)]
git-llvm: Restore compatibility with git 1.8.3.

llvm-svn: 367259

5 years ago[Reproducers] Pass FileCollector around as a shared_ptr (NFC)
Jonas Devlieghere [Mon, 29 Jul 2019 20:54:02 +0000 (20:54 +0000)]
[Reproducers] Pass FileCollector around as a shared_ptr (NFC)

Instead of passing the FileCollector around as a reference or raw
pointer, use a shared_ptr. This change's motivation is twofold. First it
adds compatibility for the newly added `FileCollectorFileSystem`.
Secondly, it addresses a lifetime issue we only see when LLDB is used
from Xcode, where a reference to the FileCollector outlives the
reproducer instance.

llvm-svn: 367258

5 years ago[IR] Consolidate fixed metadata kind definitions (NFC)
Vedant Kumar [Mon, 29 Jul 2019 20:24:20 +0000 (20:24 +0000)]
[IR] Consolidate fixed metadata kind definitions (NFC)

Put the list of fixed metadata kinds in one place.

Testing: check-llvm with+without LLVM_ENABLE_MODULES=On

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

llvm-svn: 367257

5 years ago[driver][test] Use /dev/null in as-options.s instead
Jordan Rupprecht [Mon, 29 Jul 2019 20:09:20 +0000 (20:09 +0000)]
[driver][test] Use /dev/null in as-options.s instead

llvm-svn: 367256

5 years agoGive the 'signed/unsigned wchar_t' extension a warning flag, and follow
Richard Smith [Mon, 29 Jul 2019 20:00:46 +0000 (20:00 +0000)]
Give the 'signed/unsigned wchar_t' extension a warning flag, and follow
GCC 9 in promoting it to an error by default.

llvm-svn: 367255

5 years agoWhen determining whether a lambda-expression is implicitly constexpr,
Richard Smith [Mon, 29 Jul 2019 19:59:45 +0000 (19:59 +0000)]
When determining whether a lambda-expression is implicitly constexpr,
check the formal rules rather than seeing if the normal checks produce a
diagnostic.

This fixes the handling of C++2a extensions in lambdas in C++17 mode,
as well as some corner cases in earlier language modes where we issue
diagnostics for things other than not satisfying the formal constexpr
requirements.

llvm-svn: 367254

5 years ago[driver][test] Update as-options.s to not write to a readonly tree
Jordan Rupprecht [Mon, 29 Jul 2019 19:57:31 +0000 (19:57 +0000)]
[driver][test] Update as-options.s to not write to a readonly tree

The as-options.s test writes to the build tree as of r367165. Some build systems configure this to be readonly, so this fails. Explicitly write to the output tree using `%t` to avoid this.

llvm-svn: 367253

5 years ago[PowerPC][NFC]Fix a typo in comment.
Jinsong Ji [Mon, 29 Jul 2019 19:27:54 +0000 (19:27 +0000)]
[PowerPC][NFC]Fix a typo in comment.

llvm-svn: 367252

5 years ago[X86] Fix typo in comment. We're looking at a right shift not a left shift. NFC
Craig Topper [Mon, 29 Jul 2019 19:22:51 +0000 (19:22 +0000)]
[X86] Fix typo in comment. We're looking at a right shift not a left shift. NFC

llvm-svn: 367251

5 years ago[compiler-rt] Appending COMPILER_RT_LIBCXX_PATH -isystem include for xray (2)
Puyan Lotfi [Mon, 29 Jul 2019 19:21:58 +0000 (19:21 +0000)]
[compiler-rt] Appending COMPILER_RT_LIBCXX_PATH -isystem include for xray (2)

Second attempt.

Haven't found a better way to pass the libcxx include path for building
compiler-rt with libcxx; this seems to be missing only for xray.

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

llvm-svn: 367250

5 years agoFix taint-generic.c on Windows, handle case in OS error
Reid Kleckner [Mon, 29 Jul 2019 18:48:50 +0000 (18:48 +0000)]
Fix taint-generic.c on Windows, handle case in OS error

llvm-svn: 367249

5 years ago[llvm-lipo] Implement -replace
Anusha Basana [Mon, 29 Jul 2019 18:46:34 +0000 (18:46 +0000)]
[llvm-lipo] Implement -replace

Replaces specified architecture in universal binary input file with
slice from the file_name argument passed into the replace command.

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

llvm-svn: 367248

5 years agoTest load unloading of modules with libraries-svr4
Antonio Afonso [Mon, 29 Jul 2019 18:12:55 +0000 (18:12 +0000)]
Test load unloading of modules with libraries-svr4

Summary:
This doubles the 3 tests running right now on linux by also executing each test with libraries-svr4 enabled.
Not sure if there's a better way to do this as I had to copy/paste all the decorators as well...

Reviewers: labath, clayborg, xiaobai

Reviewed By: labath

Subscribers: srhines, lldb-commits

Tags: #lldb

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

llvm-svn: 367247

5 years ago[compiler-rt] Reverting r367239 (xray include path) to fix bot build breakage.
Puyan Lotfi [Mon, 29 Jul 2019 17:50:39 +0000 (17:50 +0000)]
[compiler-rt] Reverting r367239 (xray include path) to fix bot build breakage.

llvm-svn: 367246

5 years agogn build: Merge r367071
Vitaly Buka [Mon, 29 Jul 2019 17:48:02 +0000 (17:48 +0000)]
gn build: Merge r367071

> llvm-svn: 366289

llvm-svn: 367245

5 years ago[UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) option
David Bolvansky [Mon, 29 Jul 2019 17:41:00 +0000 (17:41 +0000)]
[UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) option

Summary:
The script is silent for the following issue:
FileCheck %s -check-prefix=CHECK,POPCOUNT

FileCheck will catch it later, but I think we can warn here too.

Now it warns:
 ./update_llc_test_checks.py file.ll
WARNING: Supplied prefix 'CHECK,POPCOUNT' is invalid. Prefix must contain only alphanumeric characters, hyphens and underscores. Did you mean --check-prefixes=CHECK,POPCOUNT?

Reviewers: lebedev.ri, spatel, RKSimon, craig.topper, nikic, gbedwell

Reviewed By: RKSimon

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 367244

5 years ago[Remarks] Update error message format string
Francis Visoiu Mistrih [Mon, 29 Jul 2019 17:40:34 +0000 (17:40 +0000)]
[Remarks] Update error message format string

All the clang-cmake-armv{7,8} bots are failing this test. This is an
attempt to fix this.

llvm-svn: 367243

5 years agoThinLTOBitcodeWriter: Include globals associated with type metadata globals in the...
Peter Collingbourne [Mon, 29 Jul 2019 17:22:40 +0000 (17:22 +0000)]
ThinLTOBitcodeWriter: Include globals associated with type metadata globals in the merged module.

Globals that are associated with globals with type metadata need to appear
in the merged module because they will reference the global's section directly.

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

llvm-svn: 367242

5 years ago[lldb] Qualify includes of Properties[Enum].inc files. NFC
Jordan Rupprecht [Mon, 29 Jul 2019 17:22:10 +0000 (17:22 +0000)]
[lldb] Qualify includes of Properties[Enum].inc files. NFC

Summary:
This is a bit more explicit, and makes it possible to build LLDB without
varying the -I lines per-directory.
(The latter is useful because many build systems only allow this to be
configured per-library, and LLDB is insufficiently layered to be split into
multiple libraries on stricter build systems).

(My comment on D65185 has some more context)

Reviewers: JDevlieghere, labath, chandlerc, jdoerfert

Reviewed By: labath

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

Patch by Sam McCall!

llvm-svn: 367241

5 years ago[X86] resolveTargetShuffleInputs - add depth to limit recursion.
Simon Pilgrim [Mon, 29 Jul 2019 17:17:58 +0000 (17:17 +0000)]
[X86] resolveTargetShuffleInputs - add depth to limit recursion.

Avoids slow downs from calls to ComputeNumSignBits/computeKnownBits going too deep.

llvm-svn: 367240

5 years agoAppending COMPILER_RT_LIBCXX_PATH include path to -isystem for compiler-rt xray
Puyan Lotfi [Mon, 29 Jul 2019 16:46:35 +0000 (16:46 +0000)]
Appending COMPILER_RT_LIBCXX_PATH include path to -isystem for compiler-rt xray

Haven't found a better way to pass the libcxx include path for building
compiler-rt with libcxx; this seems to be missing only for xray.

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

llvm-svn: 367239

5 years ago[lldb] Also include the array definition in Properties.inc
Jonas Devlieghere [Mon, 29 Jul 2019 16:41:30 +0000 (16:41 +0000)]
[lldb] Also include the array definition in Properties.inc

Right now our Properties.inc only generates the initializer for the
options list but not the array declaration boilerplate around it. As the
array definition is identical for all arrays, we might as well also let
the Properties.inc generate it alongside the initializers.

Unfortunately we cannot do the same for enums, as there's this magic
ePropertyExperimental, which needs to come at the end to be interpreted
correctly. Hopefully we can get rid of this in the future and do the
same for the property enums.

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

llvm-svn: 367238

5 years agoAMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions
Tom Stellard [Mon, 29 Jul 2019 16:40:58 +0000 (16:40 +0000)]
AMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions

Summary:
The LoadStoreOptimizer was creating instructions with 2
MachineMemOperands, which meant they were assumed to alias with all other instructions,
because MachineInstr:mayAlias() returns true when an instruction has multiple
MachineMemOperands.

This was preventing these instructions from being merged again, and was
giving the scheduler less freedom to reorder them.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 367237

5 years ago[llvm-objcopy] Improve --add-section argument string parsing
Sergey Dmitriev [Mon, 29 Jul 2019 16:22:40 +0000 (16:22 +0000)]
[llvm-objcopy] Improve --add-section argument string parsing

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

llvm-svn: 367236

5 years ago[AMDGPU] Fix typo in error message
Jay Foad [Mon, 29 Jul 2019 16:17:13 +0000 (16:17 +0000)]
[AMDGPU] Fix typo in error message

llvm-svn: 367235

5 years ago[lldb] Increase testsuite packet-timeout 5secs -> 1min
Jan Kratochvil [Mon, 29 Jul 2019 16:10:16 +0000 (16:10 +0000)]
[lldb] Increase testsuite packet-timeout 5secs -> 1min

rL357954 did increase `packet-timeout` 1sec -> 5secs. Which is IMO about the
maximum timeout reasonable for regular use. But for testsuite I think the
timeout should be higher as the testsuite runs in parallel and it can be run
even on slow hosts and with other load (moreover if it runs on some slow arch).

I have chosen 60 secs, that should be enough hopefully.  Larger value could
make debugging with hanging `lldb-server` annoying.

This patch was based on this testsuite timeout:
http://lab.llvm.org:8014/builders/lldb-x86_64-fedora/builds/546/steps/test/logs/stdio
FAIL: test_connect (TestGDBRemoteClient.TestGDBRemoteClient)
   Test connecting to a remote gdb server
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py", line 13, in test_connect
    process = self.connect(target)
  File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py", line 480, in connect
    self.assertTrue(error.Success(), error.description)
AssertionError: False is not True : failed to get reply to handshake packet

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

llvm-svn: 367234

5 years ago[NFC][FPEnv] Pre-commit tests for canonicalize negated operand of fdiv.
Cameron McInally [Mon, 29 Jul 2019 16:09:56 +0000 (16:09 +0000)]
[NFC][FPEnv] Pre-commit tests for canonicalize negated operand of fdiv.

llvm-svn: 367233

5 years ago[X86] combineX86ShufflesRecursively - start recursion at depth = 0. NFCI.
Simon Pilgrim [Mon, 29 Jul 2019 15:57:06 +0000 (15:57 +0000)]
[X86] combineX86ShufflesRecursively - start recursion at depth = 0. NFCI.

As discussed on rL367171, we have a problem where the depth recursion used in combineX86ShufflesRecursively was subtly different to computeKnownBits etc. - it starts at Depth=1 instead of Depth=0 like the others and has a different maximum recursion depth.

This NFC patch fixes the recursion depth to start at 0, so we can more easily reuse depth values in calls from combineX86ShufflesRecursively and its helper functions in computeKnownBits etc.

llvm-svn: 367232

5 years agoSymbolVendor: Make SectionAddressesChanged a passthrough
Pavel Labath [Mon, 29 Jul 2019 15:53:36 +0000 (15:53 +0000)]
SymbolVendor: Make SectionAddressesChanged a passthrough

Summary:
This moves the implementation of the function into the SymbolFile class,
making it possible to excise the SymbolVendor passthrough functions in
follow-up patches.

Reviewers: clayborg, jingham, JDevlieghere

Subscribers: lldb-commits

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

llvm-svn: 367231

5 years ago[RISCV] Fix uninitialized variable after call to evaluateConstantImm
Francis Visoiu Mistrih [Mon, 29 Jul 2019 15:52:13 +0000 (15:52 +0000)]
[RISCV] Fix uninitialized variable after call to evaluateConstantImm

For llvm/test/MC/RISCV/rv64i-aliases-invalid.s, UBSan reports:

lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:371:9: runtime error:
load of value 3879186881, which is not a valid value for type
'RISCVMCExpr::VariantKind'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:371:9 in

It turns out that evaluateConstantImm does not set `VK` and it remains
unitialized when doing comparisons in `isImmXLenLI()`.

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

llvm-svn: 367230

5 years ago[OpenCL] Rename builtin definition classes
Sven van Haastregt [Mon, 29 Jul 2019 14:55:29 +0000 (14:55 +0000)]
[OpenCL] Rename builtin definition classes

Factor out some of the renames from D63434 and D63442, and generate
half type convert_ builtins.

Patch by Pierre Gondois and Sven van Haastregt.

llvm-svn: 367229

5 years ago[lldb] [test] Mark three new tests XFAIL on NetBSD
Michal Gorny [Mon, 29 Jul 2019 14:32:40 +0000 (14:32 +0000)]
[lldb] [test] Mark three new tests XFAIL on NetBSD

llvm-svn: 367228

5 years ago[InstCombine] fold fadd+fneg with fdiv/fmul betweena
Sanjay Patel [Mon, 29 Jul 2019 13:50:25 +0000 (13:50 +0000)]
[InstCombine] fold fadd+fneg with fdiv/fmul betweena

The backend already does this via isNegatibleForFree(),
but we may want to alter the fneg IR canonicalizations
that currently exist, so we need to try harder to fold
fneg in IR to avoid regressions.

llvm-svn: 367227

5 years ago[ValueTracking] Remove volatile check in isGuaranteedToTransferExecutionToSuccessor
Hideto Ueno [Mon, 29 Jul 2019 13:35:34 +0000 (13:35 +0000)]
[ValueTracking] Remove volatile check in isGuaranteedToTransferExecutionToSuccessor

Summary: As clarified in D53184, volatile load and store do not trap. Therefore, we should remove volatile checks for instructions in  `isGuaranteedToTransferExecutionToSuccessor`.

Reviewers: jdoerfert, efriedma, nikic

Reviewed By: nikic

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 367226

5 years agoclang-format clang/lib/Format
Nico Weber [Mon, 29 Jul 2019 13:26:48 +0000 (13:26 +0000)]
clang-format clang/lib/Format

llvm-svn: 367225

5 years ago[InstCombine] reduce code for fadd with fneg operand; NFC
Sanjay Patel [Mon, 29 Jul 2019 13:20:46 +0000 (13:20 +0000)]
[InstCombine] reduce code for fadd with fneg operand; NFC

llvm-svn: 367224

5 years ago[InstCombine] add tests for fadd with negated operand; NFC
Sanjay Patel [Mon, 29 Jul 2019 12:49:36 +0000 (12:49 +0000)]
[InstCombine] add tests for fadd with negated operand; NFC

llvm-svn: 367222

5 years ago[AMDGPU] Add amdgpu_kernel for consistency with other tests
Jay Foad [Mon, 29 Jul 2019 11:48:17 +0000 (11:48 +0000)]
[AMDGPU] Add amdgpu_kernel for consistency with other tests

llvm-svn: 367221

5 years ago[DAGCombine] narrowInsertExtractVectorBinOp - early out for binops that change value...
Simon Pilgrim [Mon, 29 Jul 2019 11:34:45 +0000 (11:34 +0000)]
[DAGCombine] narrowInsertExtractVectorBinOp - early out for binops that change value type. NFCI.

This is implicit in the value type checks in getSubVectorSrc - this just makes it upfront and obvious.

llvm-svn: 367220

5 years agodoc: Fix Google C++ Style Guide link.
Rafael Stahl [Mon, 29 Jul 2019 11:00:23 +0000 (11:00 +0000)]
doc: Fix Google C++ Style Guide link.

llvm-svn: 367219

5 years ago[DivergenceAnalysis] Add methods for querying divergence at use
Jay Foad [Mon, 29 Jul 2019 10:22:09 +0000 (10:22 +0000)]
[DivergenceAnalysis] Add methods for querying divergence at use

Summary:
The existing isDivergent(Value) methods query whether a value is
divergent at its definition. However even if a value is uniform at its
definition, a use of it in another basic block can be divergent because
of divergent control flow between the def and the use.

This patch adds new isDivergent(Use) methods to DivergenceAnalysis,
LegacyDivergenceAnalysis and GPUDivergenceAnalysis.

This might allow D63953 or other similar workarounds to be removed.

Reviewers: alex-t, nhaehnle, arsenm, rtaylor, rampitec, simoll, jingyue

Reviewed By: nhaehnle

Subscribers: jfb, jvesely, wdng, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 367218

5 years ago[SystemZ] Regenerate <8 x i31> store test
Simon Pilgrim [Mon, 29 Jul 2019 09:49:23 +0000 (09:49 +0000)]
[SystemZ] Regenerate <8 x i31> store test

To help show the diffs from an upcoming SimplifyDemandedBits patch.

llvm-svn: 367216

5 years agoMark test/MC/RISCV/rv{32,64}i-aliases-invalid.s unsupported also on Windows
Hans Wennborg [Mon, 29 Jul 2019 09:49:04 +0000 (09:49 +0000)]
Mark test/MC/RISCV/rv{32,64}i-aliases-invalid.s unsupported also on Windows

Because they fail there too.

FAIL: LLVM :: MC/RISCV/rv32i-aliases-invalid.s (24397 of 32659)
******************** TEST 'LLVM :: MC/RISCV/rv32i-aliases-invalid.s' FAILED ********************
Script:
--
: 'RUN: at line 2';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s -triple=riscv32 -riscv-no-aliases 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s
: 'RUN: at line 3';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s -triple=riscv32 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s
--
Exit Code: 1

Command Output (stdout):
--
$ ":" "RUN: at line 2"
$ "not" "c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s" "-triple=riscv32" "-riscv-no-aliases"
$ "c:\src\llvm.monorepo\build.release2\bin\filecheck.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s"
C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s:10:21: error: CHECK: expected string not found in input
li t4, foo # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-21474836484294967295]
                    ^
<stdin>:5:1: note: scanning from here
li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-21474836484294967295]
^
<stdin>:5:1: note: with "@LINE" equal to "10"
li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-21474836484294967295]
^
<stdin>:5:38: note: possible intended match here
li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-21474836484294967295]
                                     ^

error: command failed with exit status: 1

--

--
********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: LLVM :: MC/RISCV/rv64i-aliases-invalid.s (24416 of 32659)
******************** TEST 'LLVM :: MC/RISCV/rv64i-aliases-invalid.s' FAILED ********************
Script:
--
: 'RUN: at line 2';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s -triple=riscv64 -riscv-no-aliases 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s
: 'RUN: at line 3';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s -triple=riscv64 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s
--
Exit Code: 1

Command Output (stdout):
--
$ ":" "RUN: at line 2"
$ "not" "c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s" "-triple=riscv64" "-riscv-no-aliases"
$ "c:\src\llvm.monorepo\build.release2\bin\filecheck.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s"
C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s:6:21: error: CHECK: expected string not found in input
li t4, foo # CHECK: :[[@LINE]]:8: error: operand must be a constant 64-bit integer
                    ^
<stdin>:2:1: note: scanning from here
li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
^
<stdin>:2:1: note: with "@LINE" equal to "6"
li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
^
<stdin>:13:67: note: possible intended match here
C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s:12:13: error: immediate must be an integer in the range [0, 63]
                                                                  ^

error: command failed with exit status: 1
llvm-svn: 367215

5 years ago[ARM] Regenerate rotation tests
Simon Pilgrim [Mon, 29 Jul 2019 09:48:07 +0000 (09:48 +0000)]
[ARM] Regenerate rotation tests

llvm-svn: 367214

5 years ago[AMDGPU] Regenerate v2i16 insertelement tests.
Simon Pilgrim [Mon, 29 Jul 2019 09:47:07 +0000 (09:47 +0000)]
[AMDGPU] Regenerate v2i16 insertelement tests.

To help show the diffs from an upcoming SimplifyDemandedBits patch.

llvm-svn: 367213

5 years ago[NFC][ARM[ParallelDSP] Cleanup of BinOpChain
Sam Parker [Mon, 29 Jul 2019 08:41:51 +0000 (08:41 +0000)]
[NFC][ARM[ParallelDSP] Cleanup of BinOpChain

- Remove some unused typedefs.
- Rename BinOpChain struct to MulCandidate.
- Remove the size method of MulCandidate.
- Store only the first input of the ValueList provided to
  MulCandidate, as it's the only value we care about. This means we
  don't have to perform any ugly (and unnecessary) iterations of the
  list later on.

llvm-svn: 367208

5 years ago[lldb][NFC] Split emitting and parsing in LLDBOptionDefEmitter
Raphael Isemann [Mon, 29 Jul 2019 08:22:41 +0000 (08:22 +0000)]
[lldb][NFC] Split emitting and parsing in LLDBOptionDefEmitter

Splitting the different logic is cleaner and we it will be easier
to implement the enum emitting (which otherwise would have to
reimplement the Record parsing).

llvm-svn: 367207

5 years ago[AMDGPU] Enable v4f16 and above for v_pk_fma instructions
David Stuttard [Mon, 29 Jul 2019 08:15:10 +0000 (08:15 +0000)]
[AMDGPU] Enable v4f16 and above for v_pk_fma instructions

Summary:
If isel is presented with <2 x half> vectors then it will correctly select
v_pk_fma style instructions.
If isel is presented with e.g. <4 x half> vectors it will scalarize, unlike for
other instruction types (such as fadd, fmul etc.)

Added extra support to enable this. Updated one of the tests to include a test
for this (as well as extending the test to GFX9)

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits

Tags: #llvm

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

Change-Id: I50a4577a3f8223fb53992af3b7d26121f65b71ee
llvm-svn: 367206

5 years ago[NFC][ARM][ParallelDSP] Remove AreSymmetrical
Sam Parker [Mon, 29 Jul 2019 08:12:24 +0000 (08:12 +0000)]
[NFC][ARM][ParallelDSP] Remove AreSymmetrical

We explicitly search for a parallel mac and we only care about its
inputs, checking for symmetry doesn't add anything here.

llvm-svn: 367205

5 years ago[NFC][ARM][ParallelDSP] Remove PopulateLoads
Sam Parker [Mon, 29 Jul 2019 08:07:23 +0000 (08:07 +0000)]
[NFC][ARM][ParallelDSP] Remove PopulateLoads

We no longer have to check what loads are used, all this
is performed at the start of the transform, so it's not
doing anything now.

llvm-svn: 367204

5 years ago[obj2yaml] - Report a error when unable to resolve a sh_link reference properly.
George Rimar [Mon, 29 Jul 2019 07:58:29 +0000 (07:58 +0000)]
[obj2yaml] - Report a error when unable to resolve a sh_link reference properly.

Because of a bug we did not report a error in the case
shown in the test. With this patch we do.

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

llvm-svn: 367203

5 years ago[llvm-objcopy] - Reimplement strip-dwo-groups.test to stop using the precompiled...
George Rimar [Mon, 29 Jul 2019 07:55:39 +0000 (07:55 +0000)]
[llvm-objcopy] - Reimplement strip-dwo-groups.test to stop using the precompiled object.

When llvm-copy removes .dwo sections the index of symbol table,
the indices of the symbols and the indices of the sections which go
after the removed ones changes. That affects on SHT_GROUP sections,
which needs to be updated.

Initially this test used a precompiled object, I rewrote it to use YAML
and improved a bit.

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

llvm-svn: 367202

5 years ago[lldb][NFC] Remove DiagnosticManager::CopyDiagnostics
Raphael Isemann [Mon, 29 Jul 2019 07:37:17 +0000 (07:37 +0000)]
[lldb][NFC] Remove DiagnosticManager::CopyDiagnostics

The Diagnostic class in LLDB is suppossed to be inherited from,
so just copying the diagnostics like this is wrong. The function
is also unused, so lets just get rid of it instead of creating
some cloning facility for it.

llvm-svn: 367201

5 years agoReturn early. NFC.
Rui Ueyama [Mon, 29 Jul 2019 05:24:51 +0000 (05:24 +0000)]
Return early. NFC.

llvm-svn: 367200

5 years agoImprove MSVC visualizers for DeclSpec and TemplateName
Mike Spertus [Mon, 29 Jul 2019 03:34:40 +0000 (03:34 +0000)]
Improve MSVC visualizers for DeclSpec and TemplateName

DeclSpec now shows the TypeRep, ExprRep, or DeclRep as appropriate
TemplateName decodes and displays the StorageType
A few minor refinements to other types

llvm-svn: 367199

5 years ago[X86] Don't use PMADDWD for vector add reductions of multiplies if the mul inputs...
Craig Topper [Mon, 29 Jul 2019 01:36:58 +0000 (01:36 +0000)]
[X86] Don't use PMADDWD for vector add reductions of multiplies if the mul inputs have an additional user.

The pmaddwd inserts a truncate, if that truncate would end up
creating additional instructions instead of making a zext
narrower, then we shouldn't do it.

I've restricted this to only sse4.1 targets since on prior
targets the zext will be done in stages. So the truncate will
probably not create additional instructions. Might need some
more investigation of mul shrinking and the other pmaddwd
transform to be sure this is the right decision.

There might be a slight regression on AVX1 targets due to add
splitting. Hard to say for sure. Maybe we need to look into
using the vector reduction flag to use 2 narrow loads and a
blend instead of extracting and inserting.

llvm-svn: 367198