Sam Clegg [Tue, 30 Jun 2020 15:38:38 +0000 (08:38 -0700)]
[lld][WebAssembly] Give better error message on bad archive member
Include the archive name as well as the member name when an error
is encountered parsing bitcode archives.
Differential Revision: https://reviews.llvm.org/D82884
JF Bastien [Wed, 1 Jul 2020 04:32:05 +0000 (21:32 -0700)]
Fix diagnostic for missing virtual dtor
Introduced in D82673.
Arthur Eubanks [Wed, 1 Jul 2020 01:38:59 +0000 (18:38 -0700)]
[NewPM] Add explicit init value to -enable-new-pm
So it's easier to test with it on by default.
Reviewed By: ychen
Differential Revision: https://reviews.llvm.org/D82922
Xing GUO [Wed, 1 Jul 2020 01:36:18 +0000 (09:36 +0800)]
[DWARFYAML][test] Make the checker stricter. NFC.
Currently, DWARFYAML doesn't emit the 0 byte for terminating the abbrev
table for the given compilation unit. Before addressing this issue, we
have to make the test stricter.
Richard Smith [Tue, 30 Jun 2020 22:53:08 +0000 (15:53 -0700)]
[c++20] consteval functions don't get vtable slots.
For the Itanium C++ ABI, this implements the rule added in
https://github.com/itanium-cxx-abi/cxx-abi/pull/83
For the MS C++ ABI, this implements the direction that seemed most
plausible based on personal correspondence with MSVC developers, but is
subject to change as they decide their ABI rule.
Douglas Yung [Wed, 1 Jul 2020 01:10:09 +0000 (18:10 -0700)]
Fixup BDVER1 and ZNVER1 definitions that were accidentally changed in recent refactor.
- BDVER1
- Duplicate FeatureLZCNT removed
- ZNVER1
- Duplicate FeatureLZCNT removed
- Removed unsupported FeatureLWP
- Swapped FeatureMMX and FeatureMOVBE to be in alphabetical order
Shoaib Meenai [Wed, 1 Jul 2020 00:20:00 +0000 (17:20 -0700)]
[llvm-install-name-tool] Tighten some path checks
Just having --implicit-check-not=/usr breaks when the LLVM checkout path
contains '/usr', since llvm-objdump prints out the path to the input
file in the first line. Tighten the checks by adding the 'name' prefix
that's used when printing load command payloads. An alternative would be
to redirect the input file into llvm-objdump, in which case it prints
out 'a.out' as the file name, but I'm not sure how reliable that
behavior is.
Arthur Eubanks [Tue, 30 Jun 2020 22:57:45 +0000 (15:57 -0700)]
[Docs][BasicAA] Rename some more basicaa -> basic-aa
Follow up to https://reviews.llvm.org/D82607.
Gui Andrade [Tue, 30 Jun 2020 23:29:10 +0000 (23:29 +0000)]
[Sanitizers] Implement interceptors for msgsnd, msgrcv
Differential Revision: https://reviews.llvm.org/D82897
Nico Weber [Tue, 30 Jun 2020 23:29:47 +0000 (19:29 -0400)]
[gn build] (semi-manually) port
ce6153a5282
Matt Arsenault [Sun, 28 Jun 2020 14:06:58 +0000 (10:06 -0400)]
GlobalISel: Disallow undef generic virtual register uses
With an undef operand, it's possible for getVRegDef to fail and return
null. This is an edge case very little code bothered to
consider. Proper gMIR should use G_IMPLICIT_DEF instead.
I initially tried to apply this restriction to all SSA MIR, so then
getVRegDef would never fail anywhere. However, ProcessImplicitDefs
does technically run while the function is in SSA. ProcessImplicitDefs
and DetectDeadLanes would need to either move, or a new pseudo-SSA
type of function property would need to be introduced.
Matt Arsenault [Sun, 28 Jun 2020 22:41:38 +0000 (18:41 -0400)]
AMDGPU/GlobalISel: Remove some selection tests which should be invalid
These use undef generic virtual register operands, which should be
rejected by the verifier.
Richard Smith [Tue, 30 Jun 2020 22:53:08 +0000 (15:53 -0700)]
A constexpr virtual function is implicitly inline so should never be a
key function.
Arthur Eubanks [Tue, 30 Jun 2020 23:01:41 +0000 (16:01 -0700)]
Fix wrong title underline length
Reid Kleckner [Tue, 30 Jun 2020 23:00:04 +0000 (16:00 -0700)]
[gn build] Update build for new OpenMP tablegen logic
Ports
1a70077b5a64189d9c04d1a2d7ea6ff0e49744d6 to gn from cmake.
Hendrik Greving [Fri, 26 Jun 2020 18:45:18 +0000 (11:45 -0700)]
[ModuloSchedule] Make PeelingModuloScheduleExpander inheritable.
Basically a NFC, but allows subclasses access to the entire PeelingModuloScheduleExpander
class. We are doing this to allow backends, particularly one that are not necessarily
upstreamed, to inherit from PeelingModuloScheduleExpander and access its basic structures.
Renames Info into LoopInfo for consistency in PeelingModuloScheduleExpander.
Differential Revision: https://reviews.llvm.org/D82673
Arthur Eubanks [Tue, 30 Jun 2020 22:53:03 +0000 (15:53 -0700)]
[Docs][BasicAA] Rename -basicaa to -basic-aa in docs
Follow up to https://reviews.llvm.org/D82607.
River Riddle [Tue, 30 Jun 2020 22:43:03 +0000 (15:43 -0700)]
[mlir] Remove locking for dialect/operation registration.
Moving forward dialects should only be registered in a thread safe context. This matches the existing usage we have today, but it allows for removing quite a bit of expensive locking from the context.
This led to ~.5 a second compile time improvement when running one conversion pass on a very large .mlir file(hundreds of thousands of operations).
Differential Revision: https://reviews.llvm.org/D82595
River Riddle [Tue, 30 Jun 2020 22:42:52 +0000 (15:42 -0700)]
[mlir] Refactor InterfaceGen to support generating interfaces for Attributes and Types.
This revision adds support to ODS for generating interfaces for attributes and types, in addition to operations. These interfaces can be specified using `AttrInterface` and `TypeInterface` in place of `OpInterface`. All of the features of `OpInterface` are supported except for the `verify` method, which does not have a matching representation in the Attribute/Type world. Generating these interface can be done using `gen-(attr|type)-interface-(defs|decls|docs)`.
Differential Revision: https://reviews.llvm.org/D81884
River Riddle [Tue, 30 Jun 2020 22:42:39 +0000 (15:42 -0700)]
[mlir] Add support for defining Traits and Interfaces on Attributes/Types.
This revisions add mechanisms to Attribute/Type for attaching traits and interfaces. The mechanisms are modeled 1-1 after those for operations to keep the system consistent. AttrBase and TypeBase now accepts a trailing list of `Trait` types that will be attached to the object. These traits should inherit from AttributeTrait::TraitBase and TypeTrait::TraitBase respectively as necessary. A followup commit will refactor the interface gen mechanisms in ODS to support Attribute/Type interface generation and add tests for the mechanisms.
Differential Revision: https://reviews.llvm.org/D81883
Sam McCall [Fri, 26 Jun 2020 10:57:29 +0000 (12:57 +0200)]
[clangd] Run formatting operations asynchronously.
Summary:
They don't need ASTs or anything, so they should still run immediately.
These were sync for historical reasons (they predate clangd having a pervasive
threading model). This worked ok as they were "cheap".
Aside for consistency, there are a couple of reasons to make them async:
- they do IO (finding .clang-format) so aren't trivially cheap
- having TUScheduler involved in running these tasks means we can use it as
an injection point for configuration.
(TUScheduler::run will need to learn about which file is being operated on,
but that's an easy change).
- adding the config system adds more potential IO, too
Reviewers: kbobyrev
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82642
Arthur Eubanks [Tue, 30 Jun 2020 22:40:24 +0000 (15:40 -0700)]
[BasicAA] Replace -basicaa with -basic-aa in polly
Follow up to https://reviews.llvm.org/D82607.
Kit Barton [Tue, 30 Jun 2020 17:38:31 +0000 (12:38 -0500)]
[PPC][NFC] Replace TM with Subtarget->getTargetMachine() in preparation for GlobalISel.
There are two uses of TM (instance of TargetMachine) when checking options.
These will not work once we enable GlobalISel. This patch replaces those uses of
TM with Subtarget->getTargetMachine().
Alex Lorenz [Tue, 30 Jun 2020 21:49:01 +0000 (14:49 -0700)]
split darwin-version-min-load-command.s into Arm64 subtest to avoid failures
Some buildbot configurations don't build the arm64 backend, so the test-cases
that need arm64 should go into the aarch64 subdirectory.
Craig Topper [Tue, 30 Jun 2020 21:35:07 +0000 (14:35 -0700)]
[X86] Use some preprocessor macros to reduce the very similar repeated code in getVPTESTMOpc. NFCI
This function picks X86 opcode name based on type, masking,
and whether not a load or broadcast has been folded using multiple
switch statements. The contents of the switches mostly just vary in
a few characters in the instruction name. So use some macros to
build the instruction names to reduce the repetiveness.
Amy Kwan [Tue, 30 Jun 2020 20:12:58 +0000 (15:12 -0500)]
[PowerPC][Power10] Add Vector Splat Imm/Permute/Blend/Shift Double Bit Imm Definitions and MC Tests
This patch adds the td definitions and asm/disasm tests for the
following instructions:
XXSPLTIW
XXSPLTIDP
XXSPLTI32DX
XXPERMX
XXBLENDVB
XXBLENDVH
XXBLENDVW
XXBLENDVD
VSLDBI
VSRDBI
Differential Revision: https://reviews.llvm.org/D82896
Zixu Wang [Tue, 30 Jun 2020 16:28:06 +0000 (09:28 -0700)]
[clang][diagnostics] Add '-Wundef-prefix' warning option
Summary:
Add an `-Wundef-prefix=<arg1>,<arg2>...` option, which is similar to `-Wundef`, but only give warnings for undefined macros with the given prefixes.
Reviewers: ributzka, steven_wu, cishida, bruno, arphaman, rsmith
Reviewed By: ributzka, arphaman
Subscribers: riccibruno, dexonsmith, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80751
This patch was authored by Zixu Wang <zixu_wang@apple.com>
Vince Bridgers [Tue, 30 Jun 2020 15:08:35 +0000 (10:08 -0500)]
[ASTImporter] Fix AST import crash for a friend decl
Summary:
Running CTU testing, we found that VisitFriendDecl in
ASTImporterLookup.cpp was not handling a particular non-dependent case,
so we reached the llvm_unreachable case.
The FriendDecl and QualType not handled were:
(gdb) p D->dump()
FriendDecl 0x7ffff5cf1958
< <<srcfile>>, 'nlohmann::basic_json<std::map, std::vector,
std::basic_string<char>, bool, long long, unsigned long long, double,
std::allocator, adl_serializer, std::vector<unsigned char,
std::allocator<unsigned char>>>':'nlohmann::basic_json<std::map,
std::vector, std::basic_string<char>, bool, long long, unsigned long
long, double, std::allocator, adl_serializer, std::vector<unsigned char,
std::allocator<unsigned char>>>'
(gdb) p Ty->dump()
SubstTemplateTypeParmType 0x7ffff5cf0df0 'class
nlohmann::basic_json<std::map, std::vector, class
std::basic_string<char>, _Bool, long long, unsigned long long, double,
std::allocator, adl_serializer, class std::vector<unsigned char, class
std::allocator<unsigned char> > >' sugar
|-TemplateTypeParmType 0x7ffff643ea40 'BasicJsonType' dependent depth 0
index 0
| `-TemplateTypeParm 0x7ffff643e9e8 'BasicJsonType'
`-RecordType 0x1012ad20 'class nlohmann::basic_json<std::map,
std::vector, class std::basic_string<char>, _Bool, long long, unsigned
long long, double, std::allocator, adl_serializer, class
std::vector<unsigned char, class std::allocator<unsigned char> > >'
`-ClassTemplateSpecialization 0x1012ab68 'basic_json'
Reviewers: martong, a.sidorin
Reviewed By: martong
Subscribers: kristof.beyls, rnkovacs, teemperor, cfe-commits, dkrupp
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82882
Eli Friedman [Wed, 24 Jun 2020 03:01:07 +0000 (20:01 -0700)]
[SVE] Reject vector struct indexes for scalable vectors.
It's messy to pattern-match, and completely unnecessary: scalar indexes
work equally well.
See also discussion on D81620 and D82061.
Differential Revision: https://reviews.llvm.org/D82430
Louis Dionne [Tue, 30 Jun 2020 18:26:10 +0000 (14:26 -0400)]
[libc++] Translate the std Lit parameter to the DSL
Julian Lettner [Tue, 30 Jun 2020 20:19:25 +0000 (13:19 -0700)]
[Sanitizer] Remove obsolete assert for OS version checking on Darwin
macOS versions do not necessarily start with 10 anymore. Remove an
obsolete assert.
Eli Friedman [Wed, 20 May 2020 22:08:36 +0000 (15:08 -0700)]
[BitcodeReader] Fix DelayedShuffle handling for ConstantExpr shuffles.
The indexing was messed up, so the result was completely broken.
Shuffle constant exprs are rare in practice; without vscale types,
constant folding generally elminates them. So sort of hard to trip over.
Fixes regression from D72467.
(Recommitting after fix for memory leak.)
Differential Revision: https://reviews.llvm.org/D80330
Matt Arsenault [Tue, 30 Jun 2020 20:14:23 +0000 (16:14 -0400)]
Sparc: Use Register
Matt Arsenault [Tue, 30 Jun 2020 19:41:03 +0000 (15:41 -0400)]
RISCV: Don't store function in RISCVMachineFunctionInfo
Targets should not depend on the MachineFunction state during the
MachineFunctionInfo construction.
Matt Arsenault [Tue, 30 Jun 2020 19:36:19 +0000 (15:36 -0400)]
PPC: Don't store function in PPCFunctionInfo
Continue migrating targets from depending on the MachineFunction
during the initial construction.
Matt Arsenault [Thu, 18 Jun 2020 14:19:07 +0000 (10:19 -0400)]
Mips: Don't store MachineFunction in MipsFunctionInfo
It will soon be disallowed to depend on MachineFunction state on
construction.
Davide Italiano [Tue, 30 Jun 2020 19:53:20 +0000 (12:53 -0700)]
Skip arm-(fp|gp)-read.test on Darwin.
Our assembler doesn't seem to grok floating point literals.
<rdar://problem/
64951608>
Davide Italiano [Tue, 30 Jun 2020 19:47:56 +0000 (12:47 -0700)]
[TestReturnValue] Skip based on architecutre, not platform.
Jonas Devlieghere [Tue, 30 Jun 2020 19:40:25 +0000 (12:40 -0700)]
[lldb/Scalar] Fix undefined behavior
Fix UBSan error detected in TestDataFormatterObjCCF.py and
TestDataFormatterObjCNSDate.py:
Scalar.cpp:698:27: runtime error: -4.96303e+08 is outside the range of
representable values of type 'unsigned long long'.
Eli Friedman [Wed, 24 Jun 2020 22:54:21 +0000 (15:54 -0700)]
[IR] Delete llvm::Constants using the correct type.
In most cases, this doesn't have much impact: the destructors just call
the base class destructor anyway. A few subclasses of ConstantExpr
actually store non-trivial data, though. Make sure we clean up
appropriately.
This is sort of ugly, but I don't see a good alternative given the
constraints.
Issue found by asan buildbots running the testcase for D80330.
Differential Revision: https://reviews.llvm.org/D82509
Florian Hahn [Tue, 30 Jun 2020 09:39:23 +0000 (10:39 +0100)]
[AArch64] Add getCFInstrCost, treat branches as free for throughput.
D79164/
2596da31740f changed getCFInstrCost to return 1 per default.
AArch64 did not have its own implementation, hence the throughput cost
of CFI instructions is overestimated. On most cores, most branches should
be predicated and essentially free throughput wise.
This restores a 9% performance regression on a SPEC2006 benchmark on
AArch64 with -O3 LTO & PGO.
This patch effectively restores pre
2596da31740f behavior for AArch64
and undoes the AArch64 test changes of the patch.
Reviewers: samparker, dmgreen, anemet
Reviewed By: samparker
Differential Revision: https://reviews.llvm.org/D82755
Alex Zinenko [Tue, 30 Jun 2020 19:18:15 +0000 (21:18 +0200)]
[mlir] minor tweaks in standard-to-llvm lowering
Fix a typo in the documentation and simplify the condition to drop
braces. Addresses post-commit review of https://reviews.llvm.org/D82647.
Craig Topper [Tue, 30 Jun 2020 18:59:03 +0000 (11:59 -0700)]
[X86] Move frontend CPU feature initialization to a look up table based implementation. NFCI
This replaces the switch statement implementation in the clang's
X86.cpp with a lookup table in X86TargetParser.cpp.
I've used constexpr and copy of the FeatureBitset from
SubtargetFeature.h to store the features in a lookup table.
After the lookup the bitset is translated into strings for use
by the rest of the frontend code.
I had to modify the implementation of the FeatureBitset to avoid
bugs in gcc 5.5 constexpr handling. It seems to not like the
same array entry to be used on the left side and right hand side
of an assignment or &= or |=. I've also used uint32_t instead of
uint64_t and sized based on the X86::CPU_FEATURE_MAX.
I've initialized the features for different CPUs outside of the
table so that we can express inheritance in an adhoc way. This
was one of the big limitations of the switch and we had resorted
to labels and gotos.
Differential Revision: https://reviews.llvm.org/D82731
Craig Topper [Tue, 30 Jun 2020 16:58:48 +0000 (09:58 -0700)]
[X86] Some CHECK-NOTs for FMA4/TBM/XOP for znver1/znver2 in predefined-arch-macros.c
These features exist in earlier CPUs, but were deprecated on
znver1/znver2. While working on D82731 I accidentally copied
them from the earlier CPU. And nothing caught my mistake. Having
these additional checks would have helped.
David Green [Tue, 30 Jun 2020 17:40:04 +0000 (18:40 +0100)]
[InstCombine] fma x, y, 0 -> fmul x, y
If the addend of the fma is zero, common sense would suggest that we can
convert fma x, y, 0.0 to fmul x, y. This comes up with some user code
that was expecting the first fma in an unrolled loop to simplify to a
fmul.
Floating point often does not follow naive common sense though. Alive
suggests that this should be guarded by nsz (as fadd -0.0, 0.0 = 0.0).
fma x, y, -0.0 is always valid.
Differential Revision: https://reviews.llvm.org/D82778
Louis Dionne [Tue, 30 Jun 2020 18:52:31 +0000 (14:52 -0400)]
[libc++] Fix the Lit DSL test in case a substitution is empty
Valentin Clement [Tue, 30 Jun 2020 18:36:37 +0000 (14:36 -0400)]
[openmp] Move Directive and Clause helper function to tablegen
Summary:
Follow up to D81736. Move getOpenMPDirectiveKind, getOpenMPClauseKind, getOpenMPDirectiveName and
getOpenMPClauseName to the new tablegen code generation. The code is generated in a new file named OMP.cpp.inc
Reviewers: jdoerfert, jdenny, thakis
Reviewed By: jdoerfert, jdenny
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, llvm-commits, thakis
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82405
Marius Brehler [Tue, 30 Jun 2020 18:47:17 +0000 (20:47 +0200)]
[mlir] Fix case in MLIRGPUtoGPURuntimeTransforms
Summary:
This changes the casing of MLIRGPUtoGPURuntimeTransforms to be consistent
with other transform libraries.
Differential Revision: https://reviews.llvm.org/D82841
Alex Lorenz [Tue, 30 Jun 2020 04:04:25 +0000 (21:04 -0700)]
[macho] emit LC_BUILD_VERSION load command for supported OSes and platforms
This change lets LLVM use the LC_BUILD_VERSION command when building for macOS 10.14, iOS 12, tvOS 12, and watchOS 5.
Additionally, this change ensures that new platforms like Apple Silicon macOS / Mac Catalyst,
and simulators running on Apple Silicon alway use LC_BUILD_VERSION with the OS version set to the
minimum supported OS version if the deployment target version is older.
Differential Revision: https://reviews.llvm.org/D82836
Marius Brehler [Tue, 30 Jun 2020 18:44:04 +0000 (20:44 +0200)]
[mlir] Fix case in MLIRGPUtoNVVMTransforms
Summary:
This changes the casing of MLIRGPUtoNVVMTransforms to be consistent
with other transform libraries.
Reviewers: stephenneuendorffer, herhut
Reviewed By: herhut
Subscribers: jholewinski, mgorny, mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, grosul1, Kayjukh, jurahul, msifontes
Tags: #mlir
Differential Revision: https://reviews.llvm.org/D82842
Marius Brehler [Tue, 30 Jun 2020 18:39:41 +0000 (20:39 +0200)]
[mlir] Fix case in MLIRGPUtoROCDLTransforms
Summary:
This changes the casing of MLIRGPUtoROCDLTransforms to be consistent
with other transform libraries.
Differential Revision: https://reviews.llvm.org/D82843
Jonas Devlieghere [Tue, 30 Jun 2020 18:37:44 +0000 (11:37 -0700)]
[lldb/Test] Skip TestIOHandlerResizeNoEditline with reproducers
Nathan James [Tue, 30 Jun 2020 18:34:44 +0000 (19:34 +0100)]
[clang-tidy] Added option to readability-else-after-return
Added a 'RefactorConditionVariables' option to control how the check handles condition variables
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82824
Francesco Petrogalli [Thu, 25 Jun 2020 21:49:00 +0000 (21:49 +0000)]
[sve][acle] Enable feature macros for SVE ACLE extensions.
Summary:
The following feature macros have been added:
__ARM_FEATURE_SVE_BF16
__ARM_FEATURE_SVE_MATMUL_INT8
__ARM_FEATURE_SVE_MATMUL_FP32
__ARM_FEATURE_SVE_MATMUL_FP64
The driver has been updated to enable them accordingly to the value of
the target feature passed at command line.
The SVE ACLE tests using the macros have been modified to work with
the target feature instead of passing the macro at command line.
Reviewers: sdesmalen, efriedma, c-rhodes, kmclaughlin, SjoerdMeijer, rengolin
Subscribers: tschuett, kristof.beyls, rkruppe, psnobl, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82623
Sameer Arora [Tue, 30 Jun 2020 18:01:51 +0000 (11:01 -0700)]
[llvm-install-name-tool] Add -change option
Implement `-change` option for install-name-tool. The behavior exactly
matches that of cctools. Depends on D82410.
Reviewed By: jhenderson, smeenai
Differential Revision: https://reviews.llvm.org/D82613
Sameer Arora [Tue, 30 Jun 2020 18:01:45 +0000 (11:01 -0700)]
[llvm-install-name-tool] Add -id option
Implement `-id` option for install-name-tool. Differences from cctool's
behavior:
- Does **NOT** throw an error if multiple -id options are specified.
Instead, picks the last one.
- Throws an error in case empty id is specified.
Reviewed By: jhenderson, smeenai
Differential Revision: https://reviews.llvm.org/D82410
Reid Kleckner [Fri, 5 Jun 2020 01:57:24 +0000 (18:57 -0700)]
[PDB] Defer public serialization until PDB writing
This reduces peak memory on my test case from 1960.14MB to 1700.63MB
(-260MB, -13.2%) with no measurable impact on CPU time. I'm currently
working with a publics stream that is about 277MB. Before this change,
we would allocate 277MB of heap memory, serialize publics into them,
hold onto that heap memory, open the PDB, and commit into it. After
this change, we defer the serialization until commit time.
In the last change I made to public writing, I re-sorted the list of
publics multiple times in place to avoid allocating new temporary data
structures. Deferring serialization until later requires that we don't
reorder the publics. Instead of sorting the publics, I partially
construct the hash table data structures, store a publics index in them,
and then sort the hash table data structures. Later, I replace the index
with the symbol record offset.
This change also addresses a FIXME and moves the list of global and
public records from GSIHashStreamBuilder to GSIStreamBuilder. Now that
publics aren't being serialized, it makes even less sense to store them
as a list of CVSymbol records. The hash table used to deduplicate
globals is moved as well, since that is specific to globals, and not
publics.
Reviewed By: aganea, hans
Differential Revision: https://reviews.llvm.org/D81296
Sanjay Patel [Tue, 30 Jun 2020 18:20:46 +0000 (14:20 -0400)]
[PhaseOrdering][NewPM] update test that silently showed bug with SpeculativeExecutionPass; NFC
See D82735 / rG1a6cebb4d12c744699e23624f8afda5cbe216fe6
Adrian Prantl [Tue, 30 Jun 2020 17:26:25 +0000 (10:26 -0700)]
Improve the detection of iOS/tvOS/watchOS simulator binaries in
debugserver and lldb
This patch improves the heuristics for correctly identifying simulator binaries on Darwin and adds support for simulators running on Apple Silicon.
rdar://problem/
64046344
Differential Revision: https://reviews.llvm.org/D82616
Christopher Tetreault [Tue, 30 Jun 2020 18:07:24 +0000 (11:07 -0700)]
[SVE] Remove calls to VectorType::getNumElements from AArch64
Reviewers: efriedma, paquette, david-arm, kmclaughlin
Reviewed By: david-arm
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82214
Louis Dionne [Tue, 30 Jun 2020 18:16:00 +0000 (14:16 -0400)]
[libc++] Add missing include in test
Christopher Tetreault [Tue, 30 Jun 2020 17:56:36 +0000 (10:56 -0700)]
[SVE] Remove calls to VectorType::getNumElements from ExecutionEngine
Reviewers: efriedma, lhames, sdesmalen, fpetrogalli
Reviewed By: lhames, sdesmalen
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82211
Eric Christopher [Tue, 30 Jun 2020 17:52:10 +0000 (10:52 -0700)]
Update the phabricator docs to reflect the monorepo change.
Patch by Nathan Froyd!
Differential Revision: https://reviews.llvm.org/D82389
Louis Dionne [Tue, 30 Jun 2020 16:42:44 +0000 (12:42 -0400)]
[libc++] Split dylib instantiations for deprecated std::random_shuffle into a separate source file
That makes it easier to exclude from the build if one wants to build libc++
without support for the deprecated std::random_shuffle.
Tim Keith [Tue, 30 Jun 2020 17:15:10 +0000 (10:15 -0700)]
[flang] Silence some warnings from clang-tidy
Disable some of the warnings from clang-tidy, in particular,
`readability-identifier-naming`. They add clutter to reviews.
Differential Revision: https://reviews.llvm.org/D82795
Hsiangkai Wang [Fri, 12 Jun 2020 09:02:34 +0000 (17:02 +0800)]
[MVT] Add new MVT types for RISC-V vector.
In RISC-V vector extension, users could group multiple vector registers
as one pseudo register. In mixed width operations, users could use
partial vector registers to reduce the register pressure. The parameter
to control register grouping and partial use is called LMUL. LMUL is a
part of the type. So, we have a bunch of vector types. In order to
support all these types, we need new MVT types in LLVM. In this patch, I
added several MVT types that are used in RISC-V vector implementation.
This is a standalone patch for MVT types without RISC-V related implementation.
Differential revision: https://reviews.llvm.org/D81724
David Green [Tue, 30 Jun 2020 15:49:55 +0000 (16:49 +0100)]
[InstCombine] New FMA tests and regenerate tests. NFC
Lei Huang [Tue, 30 Jun 2020 16:42:36 +0000 (11:42 -0500)]
[PowerPC][NFC] Rename/organize encoding test files for ISA3.1
Rename `future*` encoding test files to include ISA3.1 in the file name
and combine with exisitng ISA3.1 instruction encoding tests that were
added into `p10*` test files.
Keeping the `p10*` files for now to ensure we don't add more to it.
Will remove once all ISA3.1 instruction are implemented.
Philippe Blain [Tue, 30 Jun 2020 16:31:46 +0000 (09:31 -0700)]
[clang][docs] Add note about using `-flto` with `-g` on macOS
If -Wl,object_path_lto,<lto-filename>.o is not passed at link time
when compiling and linking in separate steps with -flto and -g, the
temporary file used for Link Time Optimization is deleted by the linker,
so the executable is missing debug symbols and can't be easily debugged,
and dsymutil can't be run.
Document this behaviour.
Differential revision: https://reviews.llvm.org/D82733
Samuel Tebbs [Tue, 30 Jun 2020 16:00:29 +0000 (17:00 +0100)]
[ARM] Allow the fabs intrinsic to be tail predicated
This patch stops the fabs intrinsic from blocking tail predication.
Differential Revision: https://reviews.llvm.org/D82570
Simon Pilgrim [Tue, 30 Jun 2020 14:28:27 +0000 (15:28 +0100)]
Pass MDFieldPrinter::printAPInt APInt arg by reference not value.
Noticed by clang-tidy performance-unnecessary-value-param warning.
Samuel Tebbs [Tue, 30 Jun 2020 16:04:13 +0000 (17:04 +0100)]
[ARM] Allow the usub_sat and ssub_sat intrinsics to be tail predicated
This patch stops the usub_sat and ssub_sat intrinsics from blocking tail predication.
Differential Revision: https://reviews.llvm.org/D82571
Louis Dionne [Mon, 29 Jun 2020 21:44:05 +0000 (17:44 -0400)]
[libc++abi] Remove unused include of <sys/types.h>
I ran into an error while trying to build libc++abi for a platform that
doesn't have <sys/types.h>. I couldn't find what <sys/types.h> was used
for in the header, so I think it's fine to remove it.
Differential Revision: https://reviews.llvm.org/D82810
Matt Arsenault [Tue, 30 Jun 2020 15:57:24 +0000 (11:57 -0400)]
RegAlloc: Start using Register
Matt Arsenault [Tue, 30 Jun 2020 15:57:47 +0000 (11:57 -0400)]
BranchFolding: Use Register
Matt Arsenault [Tue, 30 Jun 2020 15:20:12 +0000 (11:20 -0400)]
TailDuplicator: Use Register
Matt Arsenault [Tue, 23 Jun 2020 13:37:13 +0000 (09:37 -0400)]
AMDGPU: Use Register
Matt Arsenault [Sun, 28 Jun 2020 14:49:06 +0000 (10:49 -0400)]
X86: Use Register
Sjoerd Meijer [Mon, 29 Jun 2020 14:40:03 +0000 (15:40 +0100)]
[ARM][MVE] Tail-predication: clean-up of unused code
After the rewrite of this pass (D79175) I missed one thing: the inserted VCTP
intrinsic can be cloned to exit blocks if there are instructions present in it
that perform the same operation, but this wasn't triggering anymore. However,
it turns out that for handling reductions, see D75533, it's actually easier not
not to have the VCTP in exit blocks, so this removes that code.
This was possible because it turned out that some other code that depended on
this, rematerialization of the trip count enabling more dead code removal
later, wasn't doing much anymore due to more aggressive dead code removal that
was added to the low-overhead loops pass.
Differential Revision: https://reviews.llvm.org/D82773
aartbik [Tue, 30 Jun 2020 16:04:16 +0000 (09:04 -0700)]
[mlir] [VectorOps] Replace zero fma with mult for vector.contract
More efficient implementation of the multiply-reduce pair,
no need to add in a zero vector. Microbenchmarking on AVX2
yields the following difference in vector.contract speedup
(over strict-order scalar reduction).
SPEEDUP SIMD-fma SIMD-mul
4x4 1.45 2.00
8x8 1.40 1.90
32x32 5.32 5.80
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D82833
Jonas Devlieghere [Tue, 30 Jun 2020 15:57:50 +0000 (08:57 -0700)]
[lldb/Test] Skip recognizer tests when Python is disabled
The `frame recognizer` command only exists when Python scripting is
enabled. Therefore the test should be made conditional on Python.
Without it, the test fails with "'frame recognizer' is not a known
command."
Samuel Tebbs [Tue, 30 Jun 2020 15:49:20 +0000 (16:49 +0100)]
[ARM] Allow rounding intrinsics to be tail predicated
This patch stops the trunc, rint, round, floor and ceil intrinsics from blocking tail predication.
Differential Revision: https://reviews.llvm.org/D82553
Nathan James [Tue, 30 Jun 2020 15:48:23 +0000 (16:48 +0100)]
[CodeComplete] Tweak completion for else.
If an `if` statement uses braces for its `then` block, suggest braces for the `else` and `else if` completion blocks, Otherwise don't suggest them.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D82626
Nathan James [Tue, 30 Jun 2020 15:45:58 +0000 (16:45 +0100)]
[clang-tidy] performance-faster-string-find string-view
Extend the default string like classes to include `std::basic_string_view`.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82720
Guillaume Chatelet [Tue, 30 Jun 2020 15:31:24 +0000 (15:31 +0000)]
[Alignment][NFC] TargetLowering::allowsMemoryAccessForAlignment
First patch of a series to adapt TargetLowering::allowsXXX functions
This patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Differential Revision: https://reviews.llvm.org/D81372
Nathan James [Tue, 30 Jun 2020 15:19:14 +0000 (16:19 +0100)]
[clang-tidy] Sanity checks in ClangTidyTest header.
Motivated by a suspicously failing build, but also good to have anyway in general.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82815
Louis Dionne [Tue, 30 Jun 2020 15:18:02 +0000 (11:18 -0400)]
[libc++abi] Remove empty source file cxa_unexpected.cpp
Pavel Labath [Tue, 30 Jun 2020 15:05:08 +0000 (17:05 +0200)]
[lldb/Scripts]
Fix analyze-project-deps.py. "lldb/Plugins" (home of Plugins.def) does
not depend on anything. Make sure this does not crash the script.
Andy Soffer [Tue, 30 Jun 2020 14:35:15 +0000 (14:35 +0000)]
Add Metadata to Transformer tooling
This change adds a Metadata field to ASTEdit, Edit, and AtomicChange so that
edits can have associated metadata and that metadata can be constructed with
Transformer-based RewriteRules. Metadata is ignored when applying edits to
source, but other consumers of AtomicChange can use this metadata to direct how
they want to consume each edit.
Reviewed By: ymandel, gribozavr2
Differential Revision: https://reviews.llvm.org/D82226
Guillaume Chatelet [Tue, 30 Jun 2020 14:46:56 +0000 (14:46 +0000)]
[NFC] Remove dead code
Differential Revision: https://reviews.llvm.org/D81195
Ulrich Weigand [Tue, 30 Jun 2020 14:29:25 +0000 (16:29 +0200)]
[SystemZ] Simplify knownbits.ll test
The knownbits.ll test case is somewhat fragile since:
- it relies on undef inputs; and
- it operates just at the limits of the MaxRecursionDepth
This means that optimization changes may easily cause the test
to spuriously fail. Rewrite the test so it still validates
the same thing, but in a less fragile manner.
Haojian Wu [Tue, 30 Jun 2020 14:13:20 +0000 (16:13 +0200)]
[AST][RecoveryExpr] Avoid spurious 'missing typename' diagnostic when the NNS contains errors.
Differential Revision: https://reviews.llvm.org/D82631
Louis Dionne [Tue, 30 Jun 2020 14:10:30 +0000 (10:10 -0400)]
[runtimes] Rename newformat to just format, now that the old format has been removed
Louis Dionne [Tue, 30 Jun 2020 14:03:28 +0000 (10:03 -0400)]
[libc++] Remove dead code since the removal of the old testing format
Xing GUO [Tue, 30 Jun 2020 13:14:28 +0000 (21:14 +0800)]
[DWARFYAML][MachO] Remove endianness related tests.
fe08ab542bd6328a7906e38ae473cf655eb6a228 makes build bots unhappy
(http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/33624/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3ADWARF-debug_info.yaml).
This patch removes failed tests.
Haojian Wu [Tue, 30 Jun 2020 13:42:03 +0000 (15:42 +0200)]
[ASTMatcher] Fix a performance regression: memorize the child match.
D80025 introduced a performance regression: in some cases, it makes
clang-tidy readability-container-size-empty ~80x slower (running on an internal
huge TU, before that patch 12s vs after 950s).
after this patch, we go back to 12s.
Differential Revision: https://reviews.llvm.org/D82771
Pavel Labath [Mon, 29 Jun 2020 11:51:46 +0000 (13:51 +0200)]
[lldb/Test] Introduce "assertSuccess"
Summary:
A lot of our tests do 'self.assertTrue(error.Success()'. The problem
with that is that when this fails, it produces a completely useless
error message (False is not True) and the most important piece of
information -- the actual error message -- is completely hidden.
Sometimes we mitigate that by including the error message in the "msg"
argument, but this has two additional problems:
- as the msg argument is evaluated unconditionally, one needs to be
careful to not trigger an exception when the operation was actually
successful.
- it requires more typing, which means we often don't do it
assertSuccess solves these problems by taking the entire SBError object
as an argument. If the operation was unsuccessful, it can format a
reasonable error message itself. The function still accepts a "msg"
argument, which can include any additional context, but this context now
does not need to include the error message.
To demonstrate usage, I replace a number of existing assertTrue
assertions with the new function. As this process is not easily
automatable, I have just manually updated a representative sample. In
some cases, I did not update the code to use assertSuccess, but I went
for even higher-level assertion apis (runCmd, expect_expr), as these are
even shorter, and can produce even better failure messages.
Reviewers: teemperor, JDevlieghere
Subscribers: arphaman, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D82759
Simon Pilgrim [Tue, 30 Jun 2020 13:09:23 +0000 (14:09 +0100)]
[X86][SSE] LowerVectorAllZero - add support for masked OR-reductions
If we're masking the result of an OR-reduction before comparing against zero, we can fold this into the PTEST() / MOVMSK(CMPEQ()) codegen by pre-masking the source value.
This works particularly well on PTEST which performs the AND as part of its operation, but the MOVMSK variant also benefits for non-V2I64 cases.
Fixes PR44781
serge-sans-paille [Tue, 30 Jun 2020 12:11:28 +0000 (14:11 +0200)]
Make it possible for client code to consume CLANG_LINK_CLANG_DYLIB
If a client code wants to consume clang libraries, it needs to know
CLANG_LINK_CLANG_DYLIB value in order to decide whether to use the DYLIB or
individual components.
Differential Revision: https://reviews.llvm.org/D82291
Guillaume Chatelet [Tue, 30 Jun 2020 13:12:31 +0000 (13:12 +0000)]
[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemcpy to Align
This patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Differential Revision: https://reviews.llvm.org/D82849