Thomas Preud'homme [Sat, 13 Jul 2019 13:24:30 +0000 (13:24 +0000)]
FileCheck [7/12]: Arbitrary long numeric expressions
Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch extend numeric expression to
support an arbitrary number of operands, either variable or literals.
Copyright:
- Linaro (changes up to diff 183612 of revision D55940)
- GraphCore (changes in later versions of revision D55940 and
in new revision created off D55940)
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60387
llvm-svn: 366001
Sanjay Patel [Sat, 13 Jul 2019 13:16:46 +0000 (13:16 +0000)]
Revert "[InstCombine] add tests for umin/umax via usub.sat; NFC"
This reverts commit rL365999 /
0f6148df23edcd3081f5e761de19edd4f823f16d.
The tests already exist in this file, and the hoped-for transform
(mentioned in D62871) is invalid because of undef as discussed in
D63060.
llvm-svn: 366000
Sanjay Patel [Sat, 13 Jul 2019 12:54:48 +0000 (12:54 +0000)]
[InstCombine] add tests for umin/umax via usub.sat; NFC
llvm-svn: 365999
Sanjay Patel [Sat, 13 Jul 2019 12:04:52 +0000 (12:04 +0000)]
[x86] simplify cmov with same true/false operands
llvm-svn: 365998
Fangrui Song [Sat, 13 Jul 2019 09:28:33 +0000 (09:28 +0000)]
[Object] isNotObjectErrorInvalidFileType: simplify
llvm-svn: 365997
Fangrui Song [Sat, 13 Jul 2019 09:23:35 +0000 (09:23 +0000)]
[Object] isNotObjectErrorInvalidFileType: fix use-after-move
llvm-svn: 365996
Simon Pilgrim [Sat, 13 Jul 2019 08:08:43 +0000 (08:08 +0000)]
Fix -Wdocumentation warning. NFCI.
llvm-svn: 365995
Petr Hosek [Sat, 13 Jul 2019 08:07:10 +0000 (08:07 +0000)]
[CMake][Fuchsia] Define asan+noexcept multilib
Using noexcept multilib with -fno-exceptions can lead to significant
space savings when statically linking libc++abi because we don't need
all the unwinding and demangling code.
When compiling with ASan, we already get a lot of overhead from the
instrumentation itself, when statically linking libc++abi, that overhead
is even larger.
Having the noexcept variant for ASan can help significantly, we've seen
more than 50% size reduction in our system image, which offsets the cost
of having to build another multilib.
Differential Revision: https://reviews.llvm.org/D64140
llvm-svn: 365994
Fangrui Song [Sat, 13 Jul 2019 07:23:12 +0000 (07:23 +0000)]
Simplify with llvm::is_contained. NFC
llvm-svn: 365993
Sylvestre Ledru [Sat, 13 Jul 2019 06:27:35 +0000 (06:27 +0000)]
This reverts commit
632a36bfcfc8273c1861f04ff6758d863c47c784.
Some targets such as Python 2.7.16 still use VERSION in
their builds. Without VERSION defined, the source code
has syntax errors.
Reverting as it will probably break many other things.
Noticed by Sterling Augustine
llvm-svn: 365992
Michal Gorny [Sat, 13 Jul 2019 06:24:14 +0000 (06:24 +0000)]
[lldb] [test] Un-XFAIL TestFormattersSBAPI on NetBSD
llvm-svn: 365991
Petr Hosek [Sat, 13 Jul 2019 05:31:48 +0000 (05:31 +0000)]
Revert "[COFF] Add null check in case of symbols defined in LTO blobs"
This reverts commit r365979: COFF/undefined-symbol-lto.test is failing.
llvm-svn: 365990
Akira Hatanaka [Sat, 13 Jul 2019 03:59:55 +0000 (03:59 +0000)]
Initialize the non-trivial C union bits I added to RecordDeclBitfields
in r365985
These bits weren't being initialized in the RecordDecl's constructor,
which probably caused test/Modules/stress1.cpp to fail on a couple of
bots.
llvm-svn: 365989
Jonas Devlieghere [Sat, 13 Jul 2019 03:30:55 +0000 (03:30 +0000)]
Make Python version setting actually effective
This needs to be outside the if to actually work. Also, this adjusts the
list of versions to match LLVM.
Patch by: Christian Biesinger
Differential revision: https://reviews.llvm.org/D64578
llvm-svn: 365988
Nathan Ridge [Sat, 13 Jul 2019 03:24:54 +0000 (03:24 +0000)]
[clangd] Mark type hierarchy as a supported feature in the docs
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64614
llvm-svn: 365987
Nathan Ridge [Sat, 13 Jul 2019 03:24:48 +0000 (03:24 +0000)]
[clangd] Implement typeHierarchy/resolve for subtypes
Summary:
This allows the client to resolve subtypes one level at a time.
For supertypes, this is not necessary, because we eagerly compute
supertypes and return all levels.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64308
llvm-svn: 365986
Akira Hatanaka [Sat, 13 Jul 2019 01:47:15 +0000 (01:47 +0000)]
[Sema] Diagnose default-initialization, destruction, and copying of
non-trivial C union types
This patch diagnoses uses of non-trivial C unions and structs/unions
containing non-trivial C unions in the following contexts, which require
default-initialization, destruction, or copying of the union objects,
instead of disallowing fields of non-trivial types in C unions, which is
what we currently do:
- function parameters.
- function returns.
- assignments.
- compound literals.
- block captures except capturing of `__block` variables by non-escaping
blocks.
- local and global variable definitions.
- lvalue-to-rvalue conversions of volatile types.
See the discussion in https://reviews.llvm.org/D62988 for more background.
rdar://problem/
50679094
Differential Revision: https://reviews.llvm.org/D63753
llvm-svn: 365985
Johannes Doerfert [Sat, 13 Jul 2019 01:09:27 +0000 (01:09 +0000)]
[Attributor][NFC] Run clang-format on the attributor files (.h/.cpp)
The Attributor files are kept formatted with clang-format, we should try
to keep this state.
llvm-svn: 365984
Johannes Doerfert [Sat, 13 Jul 2019 01:09:21 +0000 (01:09 +0000)]
[Attributor] Only return attributes with a valid state
Attributor::getAAFor will now only return AbstractAttributes with a
valid AbstractState. This simplifies call sites as they only need to
check if the returned pointer is non-null. It also reduces the potential
for accidental misuse.
llvm-svn: 365983
Julian Lettner [Sat, 13 Jul 2019 00:55:06 +0000 (00:55 +0000)]
[TSan] Tiny cleanup of UnmangleLongJmpSp for Linux/x86_64
NFC.
llvm-svn: 365982
Fangrui Song [Sat, 13 Jul 2019 00:47:58 +0000 (00:47 +0000)]
clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target
The default implementation of getSupportedSanitizers isn't able to turn
on the vptr sanitizer, and thus, any platform that runs this test will
fail with the error:
clang: error: unsupported option '-fsanitize=vptr' for target '<target>'
Patch by James Nagurne!
llvm-svn: 365981
Evgeniy Stepanov [Sat, 13 Jul 2019 00:29:03 +0000 (00:29 +0000)]
Extend function attributes bitset size from 64 to 96.
Summary: We are going to add a function attribute number 64.
Reviewers: pcc, jdoerfert, lebedev.ri
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64663
llvm-svn: 365980
Reid Kleckner [Sat, 13 Jul 2019 00:20:34 +0000 (00:20 +0000)]
[COFF] Add null check in case of symbols defined in LTO blobs
The test case could probably be improved further if the failure path was
better understood.
Fixes PR42536
llvm-svn: 365979
Jonas Devlieghere [Sat, 13 Jul 2019 00:12:22 +0000 (00:12 +0000)]
[DWARFContext] Strip leading dot in section names
The LLVM context doesn't expect the leading dot in the section name.
llvm-svn: 365978
Johannes Doerfert [Sat, 13 Jul 2019 00:09:27 +0000 (00:09 +0000)]
[Attributor][FIX] Lookup of (call site) argument attributes
llvm-svn: 365977
Jan Korous [Sat, 13 Jul 2019 00:09:04 +0000 (00:09 +0000)]
[DirectoryWatcher][test][NFC] Add information to test failure reports
llvm-svn: 365976
Sam McCall [Fri, 12 Jul 2019 23:38:31 +0000 (23:38 +0000)]
Re-land [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.
Use //net/dir like other test cases for windows compatibility
llvm-svn: 365975
Nico Weber [Fri, 12 Jul 2019 23:30:55 +0000 (23:30 +0000)]
PDB HashTable: Move TraitsT from class parameter to the methods that need it
The traits object is only used by a few methods. Deserializing a hash
table and walking it is possible without the traits object, so it
shouldn't be required to build a dummy object for that use case.
The TraitsT object used to be a function template parameter before
r327647, this restores it to that state.
This makes it clear that the traits object isn't needed at all in 1 of
the current 3 uses of HashTable (and I am going to add another use that
doesn't need it), and that the default PdbHashTraits isn't used outside
of tests.
While here, also re-enable 3 checks in the test that were commented out
(which requires making HashTableInternals templated and giving FooBar
an operator==).
No intended behavior change.
Differential Revision: https://reviews.llvm.org/D64640
llvm-svn: 365974
Eric Fiselier [Fri, 12 Jul 2019 23:01:48 +0000 (23:01 +0000)]
Fix non-conformance it `std::tuple`.
Previously we implemented all one trillion tuple-like constructors using
a single generic overload. This worked fairly well, except that it
differed in behavior from the standard version because it didn't
consider both T&& and T const&. This was observable for certain
types.
This patch addresses that issue by splitting the generic constructor
in two. We now provide both T&& and T const& versions of the
tuple-like constructors (sort of).
llvm-svn: 365973
Stanislav Mekhanoshin [Fri, 12 Jul 2019 22:42:01 +0000 (22:42 +0000)]
[AMDGPU] use v32f32 for 3 mfma intrinsics
These should really use v32f32, but were defined as v32i32
due to the lack of the v32f32 type.
Differential Revision: https://reviews.llvm.org/D64667
llvm-svn: 365972
Vitaly Buka [Fri, 12 Jul 2019 22:37:55 +0000 (22:37 +0000)]
isBytewiseValue checks ConstantVector element by element
Summary: Vector of the same value with few undefs will sill be considered "Bytewise"
Reviewers: eugenis, pcc, jfb
Reviewed By: jfb
Subscribers: dexonsmith, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64031
llvm-svn: 365971
Alina Sbirlea [Fri, 12 Jul 2019 22:30:30 +0000 (22:30 +0000)]
[MemorySSA] Use SetVector to avoid nondeterminism.
Summary:
Use a SetVector for DeadBlockSet.
Resolves PR42574.
Reviewers: george.burgess.iv, uabelho, dblaikie
Subscribers: jlebar, Prazek, mgrang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64601
llvm-svn: 365970
Alex Lorenz [Fri, 12 Jul 2019 22:29:44 +0000 (22:29 +0000)]
NFC: utils/perf-training: Python 3 compatibility for lit.cfg
The output of subprocess.check_output is now bytes. We need to decode it.
llvm-svn: 365969
Jan Korous [Fri, 12 Jul 2019 22:25:17 +0000 (22:25 +0000)]
[DirectoryWatcher][NFC] Silence warnings in release build
llvm-svn: 365968
Julie Hockett [Fri, 12 Jul 2019 22:19:02 +0000 (22:19 +0000)]
[clang-doc] Fix failing tests on Windows
Tests on Windows were failing due to path separator differences.
'/' was being used as separator in the expected output, paths in expected
output are now changed to their native form before comparing them to the
actual output.
Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com).
Differential Revision: https://reviews.llvm.org/D64669
llvm-svn: 365967
Jan Korous [Fri, 12 Jul 2019 22:11:43 +0000 (22:11 +0000)]
[DirectoryWatcher][linux] Fix use of uninitialized value
llvm-svn: 365966
Wouter van Oortmerssen [Fri, 12 Jul 2019 22:08:25 +0000 (22:08 +0000)]
[WebAssembly] refactored utilities to not depend on MachineInstr
Summary:
Most of these functions can work for MachineInstr and MCInst
equally now.
Reviewers: dschuff
Subscribers: MatzeB, sbc100, jgravelle-google, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64643
llvm-svn: 365965
Alex Lorenz [Fri, 12 Jul 2019 22:06:08 +0000 (22:06 +0000)]
[macCatalyst] Use macCatalyst pretty name in .build_version darwin
assembly command
'macCatalyst' is more readable than 'maccatalyst'. I renamed the objdump output,
but the assembly should match it as well.
llvm-svn: 365964
Jonathan Peyton [Fri, 12 Jul 2019 21:45:36 +0000 (21:45 +0000)]
[OpenMP] Remove OMP spec versioning
Remove all older OMP spec versioning from the runtime and build system.
Patch by Terry Wilmarth
Differential Revision: https://reviews.llvm.org/D64534
llvm-svn: 365963
Sylvestre Ledru [Fri, 12 Jul 2019 21:45:08 +0000 (21:45 +0000)]
Remove __VERSION__
Summary:
It has been introduced in 2011 for gcc compat:
https://github.com/llvm-mirror/clang/commit/
ad1a4c6e89594e704775ddb6b036ac982fd68cad
it is probably time to remove it
Reviewers: rnk, dexonsmith
Reviewed By: rnk
Subscribers: dschuff, aheejin, fedor.sergeev, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64062
llvm-svn: 365962
Douglas Yung [Fri, 12 Jul 2019 21:39:45 +0000 (21:39 +0000)]
[test][AArch64] Relax the opcode tests for FP min/max instructions.
llvm-svn: 365961
Eric Fiselier [Fri, 12 Jul 2019 21:32:11 +0000 (21:32 +0000)]
Add option to disable variant narrowing conversion changes.
The paper P0608R3 - "A sane variant converting constructor" disallows
narrowing conversions in variant. It was meant to address this
surprising problem:
std::variant<std::string, bool> v = "abc";
assert(v.index() == 1); // constructs a bool.
However, it also disables every potentially narrowing conversion. For
example:
variant<unsigned> v = 0; // ill-formed
variant<string, double> v2 = 42; // ill-formed (int -> double narrows)
These latter changes break code. A lot of code. Within Google it broke
on the order of a hundred thousand target with thousands of root causes
responsible for the breakages.
Of the breakages related to the narrowing restrictions, none of them
exposed outstanding bugs. However, the breakages caused by boolean
conversions (~13 root causes), all but one of them were bugs.
For this reasons, I am adding a flag to disable the narrowing conversion
changes but not the boolean conversions one.
One purpose of this flag is to allow users to opt-out of breaking changes
in variant until the offending code can be cleaned up. For non-trivial
variant usages the amount of cleanup may be significant.
This flag is also required to support automated tooling, such as
clang-tidy, that can automatically fix code broken by this change.
In order for clang-tidy to know the correct alternative to construct,
it must know what alternative was being constructed previously, which
means running it over the old version of std::variant.
Because this change breaks so much code, I will be implementing the
aforementioned clang-tidy check in the very near future.
Additionally I'm plan present this new information to the committee so they can
re-consider if this is a breaking change we want to make.
I think libc++ should very seriously consider pulling this change
before the 9.0 release branch is cut. But that's a separate discussion
that I will start on the lists.
For now this is the minimal first step.
llvm-svn: 365960
David Bolvansky [Fri, 12 Jul 2019 21:14:21 +0000 (21:14 +0000)]
[InstCombine] Disable fold from D64285 for non-integer types
llvm-svn: 365959
Evgeniy Stepanov [Fri, 12 Jul 2019 21:13:55 +0000 (21:13 +0000)]
Factor out resolveFrameOffsetReference (NFC).
Split AArch64FrameLowering::resolveFrameIndexReference in two parts
* Finding frame offset for the index.
* Finding base register and offset to that register.
The second part will be used to implement a virtual frame pointer in
armv8.5 MTE stack instrumentation lowering.
Reviewers: pcc, vitalybuka, hctim, ostannard
Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64171
llvm-svn: 365958
Nikita Popov [Fri, 12 Jul 2019 20:52:02 +0000 (20:52 +0000)]
[builtins] Fix assembly in arm sync-ops.h
This assembly is part of a macro that was reformatted in D60351.
The missing space between push and { results in:
Error: bad instruction `push{r4, r5,r6,lr}'
llvm-svn: 365957
Reid Kleckner [Fri, 12 Jul 2019 20:44:57 +0000 (20:44 +0000)]
Revert driver: Don't warn about assembler flags being unused when not assembling
This reverts r365703 (git commit
101c1afdfd1c88f05da94c6fd317b489bb704f40)
and r365714.
This broke some autoconf-style assembler flags checks in the Linux
build:
https://github.com/ClangBuiltLinux/linux/issues/598
llvm-svn: 365956
Sam McCall [Fri, 12 Jul 2019 20:35:41 +0000 (20:35 +0000)]
[clangd] Fix off-by-one in CodeComplete and assertion in Dex
llvm-svn: 365955
Jan Korous [Fri, 12 Jul 2019 20:34:10 +0000 (20:34 +0000)]
Reland [clang] DirectoryWatcher
This reverts commit
f561227d133224d2d6a5a016abe4be051fa75501.
- DirectoryWatcher
- Fix the build for platforms that don't have DW implementated.
- Fix the threading dependencies (thanks to compnerd).
llvm-svn: 365954
Matt Arsenault [Fri, 12 Jul 2019 20:12:17 +0000 (20:12 +0000)]
AMDGPU: Drop remnants of byval support for shaders
Before 2018, mesa used to use byval interchangably with inreg, which
didn't really make sense. Fix tests still using it to avoid breaking
in a future commit.
llvm-svn: 365953
David Tenty [Fri, 12 Jul 2019 20:12:15 +0000 (20:12 +0000)]
Fix missing use of defined() in include guard
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64657
llvm-svn: 365952
Alex Langford [Fri, 12 Jul 2019 20:09:32 +0000 (20:09 +0000)]
[LanguageRuntime] Move CPPLanguageRuntime into a plugin
Summary: This seems better suited to be in a plugin.
Reviewers: JDevlieghere, clayborg, jingham, compnerd, labath
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D64599
llvm-svn: 365951
Jonas Devlieghere [Fri, 12 Jul 2019 20:08:41 +0000 (20:08 +0000)]
[ObjectContainerBSDArchive] Simplify a few things (NFC)
Differential revision: https://reviews.llvm.org/D64661
llvm-svn: 365950
Nikita Popov [Fri, 12 Jul 2019 20:03:34 +0000 (20:03 +0000)]
[SystemZ] Fix addcarry of addcarry of const carry (PR42606)
This fixes https://bugs.llvm.org/show_bug.cgi?id=42606 by extending
D64213. Instead of only checking if the carry comes from a matching
operation, we now check the full chain of carries. Otherwise we might
custom lower the outermost addcarry, but then generically legalize
an inner addcarry.
Differential Revision: https://reviews.llvm.org/D64658
llvm-svn: 365949
Jan Korous [Fri, 12 Jul 2019 19:54:36 +0000 (19:54 +0000)]
Revert "Reland [clang] DirectoryWatcher"
This reverts commit
fdcb7f47e783933e0af8a5fae91132269a208268.
llvm-svn: 365948
Jan Korous [Fri, 12 Jul 2019 19:47:55 +0000 (19:47 +0000)]
Reland [clang] DirectoryWatcher
This reverts commit
abce8c457dd3de6b156756e547cc0eefb7653c79.
+ Fix the build for platforms that don't have DW implementated.
llvm-svn: 365947
Craig Topper [Fri, 12 Jul 2019 19:26:35 +0000 (19:26 +0000)]
[X86] Use MachineInstr::findRegisterDefOperand to simplify some code in optimizeCompareInstr. NFCI
llvm-svn: 365946
Jonas Devlieghere [Fri, 12 Jul 2019 19:25:45 +0000 (19:25 +0000)]
[DebugInfo] Add column info for inline sites
The column field is missing for all inline sites, currently it's always
zero. This changes populates DW_AT_call_column field for inline sites.
Test case modified to cover this change.
Patch by: Wenlei He
Differential revision: https://reviews.llvm.org/D64033
llvm-svn: 365945
Petr Hosek [Fri, 12 Jul 2019 19:10:59 +0000 (19:10 +0000)]
[libcxxabi] Don't process exceptions in cxa_handlers when they're disabled
When exceptions are disabled, avoid their processing altogether.
This avoids pulling in the depenency on demangler significantly
reducing binary size when statically linking against libc++abi
built without exception support.
Differential Revision: https://reviews.llvm.org/D64191
llvm-svn: 365944
Sterling Augustine [Fri, 12 Jul 2019 18:51:08 +0000 (18:51 +0000)]
The variable "Latch" is only used in an assert, which makes builds that use "-DNDEBUG" fail with unused variable messages.
Summary: Move the logic into the assert itself.
Subscribers: hiraditya, sanjoy, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64654
llvm-svn: 365943
Ulrich Weigand [Fri, 12 Jul 2019 18:44:51 +0000 (18:44 +0000)]
[SystemZ] Fix build bot failure after r365932
Insert LLVM_FALLTHROUGH to avoid compiler warning.
llvm-svn: 365942
Sanjay Patel [Fri, 12 Jul 2019 18:38:29 +0000 (18:38 +0000)]
[x86] add test for bogus cmov (PR40483); NFC
llvm-svn: 365941
Stanislav Mekhanoshin [Fri, 12 Jul 2019 18:38:06 +0000 (18:38 +0000)]
[AMDGPU] Extend MIMG opcode to 8 bits
This is NFC, but required for future commit.
Differential Revision: https://reviews.llvm.org/D64649
llvm-svn: 365940
Alex Langford [Fri, 12 Jul 2019 18:34:37 +0000 (18:34 +0000)]
[Core] Generalize ValueObject::MaybeCalculateCompleteType
Summary:
Instead of hardcoding ClangASTContext and ObjCLanguageRuntime, we can
generalize this by creating the method GetRuntimeType in
LanguageRuntime and moving the current MaybeCalculateCompleteType
implementation into ObjCLanguageruntime::GetRuntimeType
Reviewers: jingham, clayborg, JDevlieghere
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D64159
llvm-svn: 365939
Stefan Stipanovic [Fri, 12 Jul 2019 18:34:06 +0000 (18:34 +0000)]
Addition to rL365925, removing remaining virtuals
llvm-svn: 365938
Julie Hockett [Fri, 12 Jul 2019 18:32:00 +0000 (18:32 +0000)]
[clang-doc] Add html links to references
<a> tags are added for the parents and members of records and return type and
params of functions. The link redirects to the reference's info file.
The directory path where each info file will be saved is now generated in the
serialization phase and stored as an attribute in each Info.
Bitcode writer and reader were modified to handle the new attributes.
Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com).
Differential Revision: https://reviews.llvm.org/D63663
llvm-svn: 365937
Nico Weber [Fri, 12 Jul 2019 18:24:38 +0000 (18:24 +0000)]
Slightly simplify MappedBlockStream::createIndexedStream() calls
All callers had a PDBFile object at hand, so call
Pdb.createIndexedStream() instead, which pre-populates all the arguments
(and returns nullptr for kInvalidStreamIndex).
Also change safelyCreateIndexedStream() to only take the string index,
and update callers. Make the method public and call it in two places
that manually did the bounds checking before.
No intended behavior change.
Differential Revision: https://reviews.llvm.org/D64633
llvm-svn: 365936
Thomas Lively [Fri, 12 Jul 2019 18:23:13 +0000 (18:23 +0000)]
[WebAssembly] Make pthread imply bulk-memory, mutable-globals
Summary:
This paves the way for using passive segments in pthread builds, which
will make separate memory files unnecessary. Mutable globals are also
necessary for the upcoming implementation of TLS.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, jfb, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64586
llvm-svn: 365935
Nico Weber [Fri, 12 Jul 2019 18:22:47 +0000 (18:22 +0000)]
Add explicit newline at end of `llvm-pdbutil dump`
All dump modes I checked didn't print a trailing newline, so add one.
llvm-svn: 365934
Ulrich Weigand [Fri, 12 Jul 2019 18:14:51 +0000 (18:14 +0000)]
[SystemZ] Add support for new cpu architecture - arch13
This patch series adds support for the next-generation arch13
CPU architecture to the SystemZ backend.
This includes:
- Basic support for the new processor and its features.
- Support for low-level builtins mapped to new LLVM intrinsics.
- New high-level intrinsics in vecintrin.h.
- Indicate support by defining __VEC__ == 10303.
Note: No currently available Z system supports the arch13
architecture. Once new systems become available, the
official system name will be added as supported -march name.
llvm-svn: 365933
Ulrich Weigand [Fri, 12 Jul 2019 18:13:16 +0000 (18:13 +0000)]
[SystemZ] Add support for new cpu architecture - arch13
This patch series adds support for the next-generation arch13
CPU architecture to the SystemZ backend.
This includes:
- Basic support for the new processor and its features.
- Assembler/disassembler support for new instructions.
- CodeGen for new instructions, including new LLVM intrinsics.
- Scheduler description for the new processor.
- Detection of arch13 as host processor.
Note: No currently available Z system supports the arch13
architecture. Once new systems become available, the
official system name will be added as supported -march name.
llvm-svn: 365932
Leonard Chan [Fri, 12 Jul 2019 18:09:09 +0000 (18:09 +0000)]
Remove unused methods in Sancov.
llvm-svn: 365931
Thomas Lively [Fri, 12 Jul 2019 17:55:07 +0000 (17:55 +0000)]
[WebAssembly] i32.const operands should be signed
Summary:
This was causing large addresses to be emitted as negative numbers,
which rightfully caused crashes in binaryen.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64612
llvm-svn: 365930
Craig Topper [Fri, 12 Jul 2019 17:52:17 +0000 (17:52 +0000)]
[X86] Add NEG to isUseDefConvertible.
We can use the C flag from NEG to detect that the input was zero.
Really we could probably use the Z flag too. But C matches what
we'd do for usubo 0, X.
Haven't found a test case for this due to the usubo formation
in CGP. But I verified if I comment out the CGP code this
transformation catches some of the same cases.
llvm-svn: 365929
Simon Pilgrim [Fri, 12 Jul 2019 17:42:32 +0000 (17:42 +0000)]
[X86][AVX] Add PR34359 shuffle test case.
llvm-svn: 365926
Stefan Stipanovic [Fri, 12 Jul 2019 17:42:14 +0000 (17:42 +0000)]
[Attributor] Removing unnecessary `virtual` keywords.
Some function in the Attributor framework are unnecessarily
marked virtual. This patch removes virtual keyword
Reviewers: jdoerfert
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D64637
llvm-svn: 365925
Hideto Ueno [Fri, 12 Jul 2019 17:38:51 +0000 (17:38 +0000)]
[Attributor] Deduce "nofree" function attribute
Summary: Deduce "nofree" function attribute. A more concise description of "nofree" is on D49165.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: homerdin, hfinkel, lebedev.ri, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62687
llvm-svn: 365924
Louis Dionne [Fri, 12 Jul 2019 17:30:57 +0000 (17:30 +0000)]
[libc++] Add XFAILs for CTAD tests on older compilers
llvm-svn: 365923
Shoaib Meenai [Fri, 12 Jul 2019 17:23:35 +0000 (17:23 +0000)]
Revert [clang-shlib] Fix clang-shlib for PRIVATE dependencies
This reverts r365825 (git commit
3173c60f96c3ccfc17d403a192ae58e720153c23)
This is breaking BUILD_SHARED_LIBS=ON builds. Reverting while I rethink it.
llvm-svn: 365922
Vitaly Buka [Fri, 12 Jul 2019 17:21:55 +0000 (17:21 +0000)]
CodeGet: Init 32bit pointers with 0xFFFFFFFF
Summary:
Patch makes D63967 effective for 32bit platforms and improves pattern
initialization there. It cuts size of 32bit binary compiled with
-ftrivial-auto-var-init=pattern by 2% (3% with -Os).
Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options)
```
master patch diff
Os pattern 7.915580e+05 7.698424e+05 -0.028387
O3 pattern 9.953688e+05 9.752952e+05 -0.019325
```
Zero vs Pattern on master
```
zero pattern diff
Os 7.689712e+05 7.915580e+05 0.031380
O3 9.744796e+05 9.953688e+05 0.021133
```
Zero vs Pattern with the patch
```
zero pattern diff
Os 7.689712e+05 7.698424e+05 0.000789
O3 9.744796e+05 9.752952e+05 0.000742
```
Reviewers: pcc, eugenis, glider, jfb
Reviewed By: jfb
Subscribers: hubert.reinterpretcast, dexonsmith, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64597
llvm-svn: 365921
Philip Reames [Fri, 12 Jul 2019 17:05:35 +0000 (17:05 +0000)]
[IndVars] Use exit count reasoning to discharge obviously untaken exits
Continue in the spirit of D63618, and use exit count reasoning to prove away loop exits which can not be taken since the backedge taken count of the loop as a whole is provably less than the minimal BE count required to take this particular loop exit.
As demonstrated in the newly added tests, this triggers in a number of cases where IndVars was previously unable to discharge obviously redundant exit tests. And some not so obvious ones.
Differential Revision: https://reviews.llvm.org/D63733
llvm-svn: 365920
Aaron Ballman [Fri, 12 Jul 2019 16:53:57 +0000 (16:53 +0000)]
Dump actual line numbers when dumping the AST to JSON.
The "line" attribute is now the physical line within the source file for the location. A "presumedLine" attribute is printed when the presumed line number does not match the given source line number. We continue to not print repeated line information in subsequent source locations, but we track presumed and actual lines separately.
llvm-svn: 365919
James Y Knight [Fri, 12 Jul 2019 16:41:28 +0000 (16:41 +0000)]
Fix some minor coding-style issues in git-llvm.
llvm-svn: 365918
James Y Knight [Fri, 12 Jul 2019 16:40:46 +0000 (16:40 +0000)]
Allow the 'git-llvm' tool to push to svn from the split repositories
for 'test-suite', 'lnt', 'zorg', and 'www'.
This is done by looking at the pathname of the git remote named
'origin', which is not 100% reliable, but should work in most cases.
llvm-svn: 365917
Hideto Ueno [Fri, 12 Jul 2019 16:29:14 +0000 (16:29 +0000)]
[FunctionAttrs] Add a test for "nofree" function attribute
This patch adds a test for nofree function attribute.
llvm-svn: 365916
Fangrui Song [Fri, 12 Jul 2019 16:23:25 +0000 (16:23 +0000)]
[Support] Move the static initializer install_out_memory_new_handler to InitLLVM
An application linking against LLVMSupport should not get the gratuitous
set::std_new_handler call.
Reviewed By: jfb
Differential Revision: https://reviews.llvm.org/D64505
llvm-svn: 365915
Simon Pilgrim [Fri, 12 Jul 2019 16:16:23 +0000 (16:16 +0000)]
Add missing <atomic> include to appease MSVC builds.
llvm-svn: 365914
Artem Belevich [Fri, 12 Jul 2019 16:13:29 +0000 (16:13 +0000)]
Minor cleanup.
Simplify things a bit by removing unnecessary full type qualification.
This also happens to avoid a build break with now-unsupported
Visual Studio 2015.
Differential Review: https://reviews.llvm.org/D64588
llvm-svn: 365913
Hideto Ueno [Fri, 12 Jul 2019 16:08:32 +0000 (16:08 +0000)]
Test commit
llvm-svn: 365912
Jordan Rose [Fri, 12 Jul 2019 16:05:09 +0000 (16:05 +0000)]
Support for dumping current PrettyStackTrace on SIGINFO (Ctrl-T)
Support SIGINFO (and SIGUSR1 for POSIX purposes) to tell what
long-running jobs are doing, as inspired by BSD tools (including on
macOS), by dumping the current PrettyStackTrace.
This adds a new kind of signal handler for non-fatal "info" signals,
similar to the "interrupt" handler that already exists for SIGINT
(Ctrl-C). It then uses that handler to update a "generation count"
managed by the PrettyStackTrace infrastructure, which is then checked
whenever a PrettyStackTraceEntry is pushed or popped on each
thread. If the generation has changed---i.e. if the user has pressed
Ctrl-T---the stack trace is dumped, though unfortunately it can't
include the deepest entry because that one is currently being
constructed/destructed.
https://reviews.llvm.org/D63750
llvm-svn: 365911
Jay Foad [Fri, 12 Jul 2019 15:59:40 +0000 (15:59 +0000)]
[AMDGPU] Fix DPP combiner check for exec modification
Summary:
r363675 changed the exec modification helper function, now called
execMayBeModifiedBeforeUse, so that if no UseMI is specified it checks
all instructions in the basic block, even beyond the last use. That
meant that the DPP combiner no longer worked in any basic block that
ended with a control flow instruction, and in particular it didn't work
on code sequences generated by the atomic optimizer.
Fix it by reinstating the old behaviour but in a new helper function
execMayBeModifiedBeforeAnyUse, and limiting the number of instructions
scanned.
Reviewers: arsenm, vpykhtin
Subscribers: kzhuravl, nemanjai, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kbarton, MaskRay, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64393
llvm-svn: 365910
Rafael Stahl [Fri, 12 Jul 2019 15:56:18 +0000 (15:56 +0000)]
[clang-format][tests] Explicitly specify style in some tests
Summary: This fixes broken tests when doing an out-of-source build that picks up a random .clang-format on the file system due to the default "file" style.
Reviewers: djasper, klimek, MyDeveloperDay, krasimir
Reviewed By: MyDeveloperDay
Subscribers: lebedev.ri, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61001
llvm-svn: 365909
Raphael Isemann [Fri, 12 Jul 2019 15:30:55 +0000 (15:30 +0000)]
[lldb] Let table gen create command option initializers.
Summary:
We currently have man large arrays containing initializers for our command options.
These tables are tricky maintain as we don't have any good place to check them for consistency and
it's also hard to read (`nullptr, {}, 0` is not very descriptive).
This patch fixes this by letting table gen generate those tables. This way we can have a more readable
syntax for this (especially for all the default arguments) and we can let TableCheck check them
for consistency (e.g. an option with an optional argument can't have `eArgTypeNone`, naming of flags', etc.).
Also refactoring the related data structures can now be done without changing the hundred of option initializers.
For example, this line:
```
{LLDB_OPT_SET_ALL, false, "hide-aliases", 'a', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Hide aliases in the command list."},
```
becomes this:
```
def hide_aliases : Option<"hide-aliases", "a">, Desc<"Hide aliases in the command list.">;
```
For now I just moved a few initializers to the new format to demonstrate the change. I'll slowly migrate the other
option initializers tables in separate patches.
Reviewers: JDevlieghere, davide, sgraenitz
Reviewed By: JDevlieghere
Subscribers: jingham, xiaobai, labath, mgorny, abidh, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D64365
llvm-svn: 365908
Fangrui Song [Fri, 12 Jul 2019 15:18:29 +0000 (15:18 +0000)]
[LegacyPassManager] Small ModuleCount cleanup
llvm-svn: 365907
Russell Gallop [Fri, 12 Jul 2019 15:15:56 +0000 (15:15 +0000)]
Revert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands."
New test is failing on Windows bot
This reverts commit
9c0391b36a76f8e3949588de3f44b7314c2318bf.
llvm-svn: 365906
Tom Stellard [Fri, 12 Jul 2019 15:11:28 +0000 (15:11 +0000)]
cmake: Fix install of libclang-cpp.so when LLVM_INSTALL_TOOLCHAIN_ONLY=ON
Summary:
If CLANG_LINK_CLANG_DYLIB is also enabled, then this library needs to be
installed.
Fixes PR42575.
Reviewers: beanz, smeenai
Subscribers: mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64582
Conflicts:
clang/tools/clang-shlib/CMakeLists.txt
llvm-svn: 365905
Jay Foad [Fri, 12 Jul 2019 15:02:59 +0000 (15:02 +0000)]
[AMDGPU] Restrict v_cndmask_b32 abs/neg modifiers to f32
Summary:
D64497 allowed abs/neg source modifiers on v_cndmask_b32 but it doesn't
make any sense to apply them to f16 operands; they would interpret the
bits of the value as an f32, giving nonsensical results. This patch
restricts them to f32 operands.
Reviewers: arsenm, hakzsam
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64636
llvm-svn: 365904
Fangrui Song [Fri, 12 Jul 2019 14:58:15 +0000 (14:58 +0000)]
Delete dead stores
llvm-svn: 365903
Tom Stellard [Fri, 12 Jul 2019 14:40:18 +0000 (14:40 +0000)]
cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros
Summary:
This will simplify the macros by allowing us to remove the hard-coded
list of libraries that should be installed when
LLVM_INSTALL_TOOLCHAIN_ONLY is enabled.
Reviewers: beanz, smeenai
Reviewed By: beanz
Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D64580
llvm-svn: 365902
Fangrui Song [Fri, 12 Jul 2019 14:04:34 +0000 (14:04 +0000)]
Delete dead stores
llvm-svn: 365901
Aaron Ballman [Fri, 12 Jul 2019 13:57:41 +0000 (13:57 +0000)]
Dump floating-point values as strings when dumping to JSON.
This fixes a bug where we would have an invalid JSON attribute (e.g., "value": inf). It also increases the precision of the values because they're not represented as approximate doubles with the host architecture's floating-point model.
llvm-svn: 365900