platform/upstream/llvm.git
5 years ago[llvm-mca] Remove unused/stale forward decl. NFC.
Matt Davis [Thu, 4 Oct 2018 22:16:39 +0000 (22:16 +0000)]
[llvm-mca] Remove unused/stale forward decl. NFC.

llvm-svn: 343823

5 years ago[RISCV] Support named operands for CSR instructions.
Ana Pazos [Thu, 4 Oct 2018 21:50:54 +0000 (21:50 +0000)]
[RISCV] Support named operands for CSR instructions.

Reviewers: asb, mgrang

Reviewed By: asb

Subscribers: jocewei, mgorny, jfb, PkmX, MartinMosbeck, brucehoult, the_o, rkruppe, rogfer01, rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones

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

llvm-svn: 343822

5 years ago[globalisel][combine] Fix a rare crash when encountering an instruction whose op0...
Daniel Sanders [Thu, 4 Oct 2018 21:44:32 +0000 (21:44 +0000)]
[globalisel][combine] Fix a rare crash when encountering an instruction whose op0 isn't a reg

The simplest instance of this is an intrinsic with no results which will have the
intrinsic ID as operand 0.

Also fix some benign incorrectness when op0 is a reg but isn't a def that was
guarded against by checking for the extension opcodes.

llvm-svn: 343821

5 years agoReleaseNotes: remove superfluous 's' in 'can promotes'
Ed Maste [Thu, 4 Oct 2018 21:37:32 +0000 (21:37 +0000)]
ReleaseNotes: remove superfluous 's' in 'can promotes'

llvm-svn: 343820

5 years ago[InstCombine] drop poison flags in SimplifyVectorDemandedElts
Sanjay Patel [Thu, 4 Oct 2018 21:36:50 +0000 (21:36 +0000)]
[InstCombine] drop poison flags in SimplifyVectorDemandedElts

We established the (unfortunately complicated) rules for UB/poison
propagation with vector ops in:
D48893
D48987
D49047

It's clear from the affected tests that we are potentially creating
poison where none existed before the transforms. For add/sub/mul,
the answer is simple: just drop the flags because the extra undef
vector lanes are generally more valuable for analysis and codegen.

llvm-svn: 343819

5 years ago[clang-doc] Clean up Markdown output
Julie Hockett [Thu, 4 Oct 2018 21:34:13 +0000 (21:34 +0000)]
[clang-doc] Clean up Markdown output

Make the output for the MDGenerator cleaner and more readable.

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

llvm-svn: 343818

5 years ago[X86][LegalizeVectorOps] Use MERGE_VALUES to return two results from LowerLoad. Remov...
Craig Topper [Thu, 4 Oct 2018 21:24:24 +0000 (21:24 +0000)]
[X86][LegalizeVectorOps] Use MERGE_VALUES to return two results from LowerLoad. Remove special case code in LegalizeVectorOps that allowed us to only return one result.

Previously we replaced the chain use ourself and return the data result. LegalizeVectorOps then detected that we'd done this and assumed the chain had already been handled.

This commit instead returns a MERGE_VALUES node with two results joined from nodes. This allows LegalizeVectorOps to do all the replacements for us without any special casing. The MERGE_VALUES will be removed by DAG combine.

llvm-svn: 343817

5 years ago[SimplifyCFG] Change recursive calls to llvm::SimplifyCFG to instead use an outer...
Craig Topper [Thu, 4 Oct 2018 21:11:52 +0000 (21:11 +0000)]
[SimplifyCFG] Change recursive calls to llvm::SimplifyCFG to instead use an outer while loop to revisit.

Summary:
The llvm::SimplifyCFG function creates a SimplifyCFGOpt object and calls run on it. There were numerous places reached from this run function that called back out llvm::SimplifyCFG which would create another SimplifyCFGOpt object. This is an inefficient use of stack space at minimum. We are also not passing along the LoopHeaders pointer passed into the outer llvm::SimplifyCFG call. So if its not null we lose it on the first recursion and get nullptr from there on.

This patch adds an outer loop around the main BasicBlock simplifying code and adds a flag to the SimplifyCFGOpt class that can be set by to request another iteration. I don't think we can iterate based just on the change flag alone since some of the simplifications delete a basic block entirely leaving nothing to iterate on.

Reviewers: bogner, eli.friedman, reames

Reviewed By: reames

Subscribers: llvm-commits

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

llvm-svn: 343816

5 years agoEsan for FreeBSD, forgotten file.
David Carlier [Thu, 4 Oct 2018 21:07:21 +0000 (21:07 +0000)]
Esan for FreeBSD, forgotten file.

llvm-svn: 343815

5 years ago[WebAssembly] Don't modify preds/succs iterators while erasing from them
Heejin Ahn [Thu, 4 Oct 2018 21:03:35 +0000 (21:03 +0000)]
[WebAssembly] Don't modify preds/succs iterators while erasing from them

Summary:
This caused out-of-bound bugs. Found by
`-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON`.

Reviewers: dschuff

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

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

llvm-svn: 343814

5 years agoAMDGPU: Rename isAmdCodeObjectV2 -> isAmdHsaOrMesa
Konstantin Zhuravlyov [Thu, 4 Oct 2018 21:02:16 +0000 (21:02 +0000)]
AMDGPU: Rename isAmdCodeObjectV2 -> isAmdHsaOrMesa

The isAmdCodeObjectV2 is a misleading name which actually checks whether the os
is amdhsa or mesa.

Also add a test to make sure we do not generate old kernel header for code
object v3.

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

llvm-svn: 343813

5 years ago[Esan] Port cache frag to FreeBSD
David Carlier [Thu, 4 Oct 2018 20:58:18 +0000 (20:58 +0000)]
[Esan] Port cache frag to FreeBSD

Data involving struct accesses accounting work (plan to support only efficiency-cache-frag flag in the frontend side).

Reviewers: krytarowski, vitalybuka, jfb

Reviewed By : vitalybuka

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

llvm-svn: 343812

5 years ago[COFF] [X86] Don't use llvm_unreachable for unsupported relocation types
Martin Storsjo [Thu, 4 Oct 2018 20:43:38 +0000 (20:43 +0000)]
[COFF] [X86] Don't use llvm_unreachable for unsupported relocation types

This can happen if assembling a reference to _GLOBAL_OFFSET_TABLE_.

While it doesn't make sense to try to assemble that for COFF,
the fact that we previously used llvm_unreachable meant that the code
had undefined behaviour if something tried to assemble that.

The configure script of libgmp would try to assemble such a snippet
(which should signal a failure). If llvm is built without assertions,
the undefined behaviour meant a (near) infinite loop.

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

llvm-svn: 343811

5 years agoThe Python 3 part of the script was missed when adding OpenBSD support.
Brad Smith [Thu, 4 Oct 2018 20:34:58 +0000 (20:34 +0000)]
The Python 3 part of the script was missed when adding OpenBSD support.

llvm-svn: 343810

5 years agoUpdate Clang Windows getting started docs
Reid Kleckner [Thu, 4 Oct 2018 20:34:52 +0000 (20:34 +0000)]
Update Clang Windows getting started docs

Summary:
- Update the example VS project generation to use VS2017.
- Add docs for generating ninja build files, since they are popular.
- Remove reference to "make update" which no longer exists. Mention the
  monorepo instead.
- Try to explain gnuwin32/coreutils requirements better.
- Use https:// links where possible

Reviewers: zturner, STL_MSFT

Subscribers: jfb, cfe-commits

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

llvm-svn: 343809

5 years ago[AST] Revert mangling changes from r339428
Shoaib Meenai [Thu, 4 Oct 2018 19:50:14 +0000 (19:50 +0000)]
[AST] Revert mangling changes from r339428

As discussed in https://reviews.llvm.org/D50144, we want Obj-C classes
to have the same mangling as C++ structs, to support headers like the
following:

```
@class I;
struct I;

void f(I *);
```

since the header can be used from both C++ and Obj-C++ TUs, and we want
a consistent mangling across the two to prevent link errors. Itanium
mangles both the same way, and so should the MS ABI.

The main concern with having the same mangling for C++ structs and Obj-C
classes was that we want to treat them differently for the purposes of
exception handling, e.g. we don't want a C++ catch statement for a
struct to be able to catch an Obj-C class with the same name as the
struct. We can accomplish this by mangling Obj-C class names differently
in their RTTI, which I'll do in a follow-up patch.

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

llvm-svn: 343808

5 years ago[NestedNameSpecifier] Add missing stream-specific dump methods
Stephen Kelly [Thu, 4 Oct 2018 19:22:00 +0000 (19:22 +0000)]
[NestedNameSpecifier] Add missing stream-specific dump methods

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

llvm-svn: 343807

5 years ago[InstCombine] reduce code duplication in SimplifyDemandedVectorElts; NFCI
Sanjay Patel [Thu, 4 Oct 2018 19:12:07 +0000 (19:12 +0000)]
[InstCombine] reduce code duplication in SimplifyDemandedVectorElts; NFCI

llvm-svn: 343806

5 years agoGive same-named members unique timestamps on Darwin in llvm-ar.
James Y Knight [Thu, 4 Oct 2018 18:49:21 +0000 (18:49 +0000)]
Give same-named members unique timestamps on Darwin in llvm-ar.

This change ensures that the (membername,timestamp) tuple uniquely
identifies an entry in an archive for format=darwin, in deterministic
mode (which is the default).

That, then, enables lldb and dsymutil to locate the appropriate object
within the archive.

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

llvm-svn: 343805

5 years ago[globalisel][combine] Improve the truncate placement for the extending-loads combine
Daniel Sanders [Thu, 4 Oct 2018 18:44:58 +0000 (18:44 +0000)]
[globalisel][combine] Improve the truncate placement for the extending-loads combine

This brings the extending loads patch back to the original intent but minus the
PHI bug and with another small improvement to de-dupe truncates that are
inserted into the same block.

The truncates are sunk to their uses unless this would require inserting before a
phi in which case it sinks to the _beginning_ of the predecessor block for that
path (but no earlier than the def).

The reason for choosing the beginning of the predecessor is that it makes de-duping
multiple truncates in the same block simple, and optimized code is going to run a
scheduler at some point which will likely change the position anyway.

llvm-svn: 343804

5 years ago[x86] add test for SSE sqrtss register dep (PR22206)
Sanjay Patel [Thu, 4 Oct 2018 17:59:30 +0000 (17:59 +0000)]
[x86] add test for SSE sqrtss register dep (PR22206)

llvm-svn: 343803

5 years ago[clangd] Simplify Dex query tree logic and fix missing-posting-list bug
Sam McCall [Thu, 4 Oct 2018 17:18:55 +0000 (17:18 +0000)]
[clangd] Simplify Dex query tree logic and fix missing-posting-list bug

Summary:
The bug being fixed: when a posting list doesn't exist in the index, it
was previously just dropped from the query rather than being treated as
empty. Now that we have the FALSE iterator, we can use it instead.

The query tree logic previously had a bunch of special cases to detect whether
subtrees are empty. Now we just naively build the whole tree, and rely
on the query optimizations to drop the trivial parts.

Finally, there was a bug in trigram generation: the empty query would
generate a single trigram "$$$" instead of no trigrams.
This had no effect (there was no posting list, so the other bug
cancelled it out). But we now have to fix this bug too.

Reviewers: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 343802

5 years ago[clangd] Dex: FALSE iterator, peephole optimizations, fix AND bug
Sam McCall [Thu, 4 Oct 2018 17:18:49 +0000 (17:18 +0000)]
[clangd] Dex: FALSE iterator, peephole optimizations, fix AND bug

Summary:
The FALSE iterator will be used in a followup patch to fix a logic bug in Dex
(currently, tokens that don't have posting lists in the index are simply dropped
from the query, changing semantics).

It can usually be optimized away, so added the following opmitizations:
 - simplify booleans inside AND/OR
 - replace effectively-empty AND/OR with booleans
 - flatten nested AND/ORs

While working on this, found a bug in the AND iterator: its constructor sync()
assumes that ReachedEnd is set if applicable, but the constructor never sets it.
This crashes if a non-first iterator is nonempty.

Reviewers: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 343801

5 years ago[clangd] Add std::move for converting-return to satisfy older compilers
Sam McCall [Thu, 4 Oct 2018 17:15:41 +0000 (17:15 +0000)]
[clangd] Add std::move for converting-return to satisfy older compilers

llvm-svn: 343800

5 years agoAArch64: Fix XSeqPairs/WSeqPairs problems
Matthias Braun [Thu, 4 Oct 2018 17:02:53 +0000 (17:02 +0000)]
AArch64: Fix XSeqPairs/WSeqPairs problems

- Fix spill/reloads of XSeqPairs failing with vregs (only physregs
  worked correctly)
- Add missing spill/reload code for WSeqPairs class

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

llvm-svn: 343799

5 years ago[AMDGPU] Match signed dot4/8 pattern.
Farhana Aleen [Thu, 4 Oct 2018 16:57:37 +0000 (16:57 +0000)]
[AMDGPU] Match signed dot4/8 pattern.

Summary: This patch matches signed dot4 and dot8 pattern.

Author: FarhanaAleen

Reviewed By: msearles

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

llvm-svn: 343798

5 years ago[clang-tidy] fix failing unit tests
Jonas Toth [Thu, 4 Oct 2018 16:39:41 +0000 (16:39 +0000)]
[clang-tidy] fix failing unit tests

The removal from the FIX-IT notes through the check-clang-tidy
script was done incorrect. I did not detect beforehand but adjusted
the script and tests accordingly

llvm-svn: 343797

5 years ago[clangd] fix another ambigous constructor in DexTest
Jonas Toth [Thu, 4 Oct 2018 16:29:58 +0000 (16:29 +0000)]
[clangd] fix another ambigous constructor in DexTest

llvm-svn: 343796

5 years ago[llvm-mca][x86] Add PR36951 ReadAfterLd test case
Simon Pilgrim [Thu, 4 Oct 2018 16:26:56 +0000 (16:26 +0000)]
[llvm-mca][x86] Add PR36951 ReadAfterLd test case

llvm-svn: 343795

5 years ago[InstCombine] allow bitcast to/from FP for vector insert/extract transform
Sanjay Patel [Thu, 4 Oct 2018 16:25:05 +0000 (16:25 +0000)]
[InstCombine] allow bitcast to/from FP for vector insert/extract transform

This is a follow-up to rL343482 / D52439.
This was a pattern that initially caused the commit to be reverted because
the transform requires a bitcast as shown here.

llvm-svn: 343794

5 years ago[clangd] Fix ambiguous constructor in DexTest
Sam McCall [Thu, 4 Oct 2018 16:05:22 +0000 (16:05 +0000)]
[clangd] Fix ambiguous constructor in DexTest

llvm-svn: 343793

5 years ago[clang-tidy] NFC use CHECK-NOTES in tests for fuchsia-default-arguments
Jonas Toth [Thu, 4 Oct 2018 15:59:30 +0000 (15:59 +0000)]
[clang-tidy] NFC use CHECK-NOTES in tests for fuchsia-default-arguments

Reviewers: alexfh, aaron.ballman, hokein

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

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

llvm-svn: 343792

5 years ago[clang-tidy] NFC use CHECK-NOTES in tests for performance-move-constructor-init
Jonas Toth [Thu, 4 Oct 2018 15:55:37 +0000 (15:55 +0000)]
[clang-tidy] NFC use CHECK-NOTES in tests for performance-move-constructor-init

Reviewers: alexfh, aaron.ballman, hokein

Reviewed By: alexfh

Subscribers: lebedev.ri, xazax.hun, cfe-commits

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

llvm-svn: 343791

5 years ago[clang] Add the exclude_from_explicit_instantiation attribute
Louis Dionne [Thu, 4 Oct 2018 15:49:42 +0000 (15:49 +0000)]
[clang] Add the exclude_from_explicit_instantiation attribute

Summary:
This attribute allows excluding a member of a class template from being part
of an explicit template instantiation of that class template. This also makes
sure that code using such a member will not take for granted that an external
instantiation exists in another translation unit. The attribute was discussed
on cfe-dev at [1] and is primarily motivated by the removal of always_inline
in libc++ to control what's part of the ABI (see links in [1]).

[1]: http://lists.llvm.org/pipermail/cfe-dev/2018-August/059024.html

rdar://problem/43428125

Reviewers: rsmith

Subscribers: dexonsmith, cfe-commits

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

llvm-svn: 343790

5 years ago[clang-tidy] fix PR39167, bugprone-exception-escape hangs-up
Jonas Toth [Thu, 4 Oct 2018 15:49:25 +0000 (15:49 +0000)]
[clang-tidy] fix PR39167, bugprone-exception-escape hangs-up

Summary:
The check bugprone-exception-escape should not register
if -fno-exceptions is set for the compile options. Bailing out on non-cplusplus
and non-exceptions language options resolves the issue.

Reviewers: alexfh, aaron.ballman, baloghadamsoftware

Reviewed By: alexfh

Subscribers: lebedev.ri, xazax.hun, rnkovacs, cfe-commits

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

llvm-svn: 343789

5 years ago[clang-tidy] Added pointer types to clang-tidy readability-identifier-naming check.
Jonas Toth [Thu, 4 Oct 2018 15:47:57 +0000 (15:47 +0000)]
[clang-tidy] Added pointer types to clang-tidy readability-identifier-naming check.

Summary:

Option to check for different naming conventions on the following types:

  - GlobalConstantPointer
  - GlobalPointer
  - LocalConstantPointer
  - LocalPointer
  - PointerParameter
  - ConstantPointerParameter

When not specified, the conventions for the non pointer types will be applied (GlobalConstant, GlobalVariable, LocalConstant, ...).

Patch by ffigueras!

Reviewers: alexfh, kbobyrev

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

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

llvm-svn: 343788

5 years ago[llvm-mca] Move field 'AllowZeroMoveEliminationOnly' to class RegisterFile. NFC.
Andrea Di Biagio [Thu, 4 Oct 2018 15:20:56 +0000 (15:20 +0000)]
[llvm-mca] Move field 'AllowZeroMoveEliminationOnly' to class RegisterFile. NFC.

Flag 'AllowZeroMoveEliminationOnly' should have been a property of the PRF, and
not set at register granularity.

This change also restricts move elimination to writes that update a full
physical register. We assume that there is a strong correlation between
logical registers that allow move elimination, and how those same registers are
allocated to physical registers by the register renamer.

This is still a no functional change, because this experimental code path is
disabled for now. This is done in preparation for another patch that will add
the ability to describe how move elimination works in scheduling models.

llvm-svn: 343787

5 years ago[X86][AVX] Add PR39161 test case for v4f64 zzww shuffle
Simon Pilgrim [Thu, 4 Oct 2018 15:06:09 +0000 (15:06 +0000)]
[X86][AVX] Add PR39161 test case for v4f64 zzww shuffle

llvm-svn: 343786

5 years ago[OpenMP][OMPT] Fix unsafe initialization of ompt_data_t objects
Jonathan Peyton [Thu, 4 Oct 2018 14:57:04 +0000 (14:57 +0000)]
[OpenMP][OMPT] Fix unsafe initialization of ompt_data_t objects

Initializing an ompt_data_t object using the pointer union member is potentially
unsafe in 32-bit programs.  This change fixes the issue
by using the constant, ompt_data_none.

Patch by Hansang Bae

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

llvm-svn: 343785

5 years ago[ELF][HEXAGON] Add support for GOT relocations.
Sid Manning [Thu, 4 Oct 2018 14:54:17 +0000 (14:54 +0000)]
[ELF][HEXAGON] Add support for GOT relocations.

The GOT is referenced through the symbol _GLOBAL_OFFSET_TABLE_ .

The relocation added calculates the offset into the global offset table for
the entry of a symbol.  In order to get the correct TargetVA I needed to
create an new relocation expression, HEXAGON_GOT.  It does
Sym.getGotVA() - In.GotPlt->getVA().

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

llvm-svn: 343784

5 years ago[utils] Ensure that update_mca_test_checks.py writes prefixes in alphabetical order
Greg Bedwell [Thu, 4 Oct 2018 14:42:19 +0000 (14:42 +0000)]
[utils] Ensure that update_mca_test_checks.py writes prefixes in alphabetical order

llvm-svn: 343783

5 years ago[utils] simple refactor in update_mca_test_checks.py to make intent more readable
Greg Bedwell [Thu, 4 Oct 2018 14:42:06 +0000 (14:42 +0000)]
[utils] simple refactor in update_mca_test_checks.py to make intent more readable

llvm-svn: 343782

5 years ago[RISCV] Remove overzealous is64Bit checks
Alex Bradbury [Thu, 4 Oct 2018 14:30:03 +0000 (14:30 +0000)]
[RISCV] Remove overzealous is64Bit checks

lowerGlobalAddress, lowerBlockAddress, and insertIndirectBranch contain
overzealous checks for is64Bit. These functions are all safe as-implemented
for RV64.

llvm-svn: 343781

5 years ago[clangd] expose MergedIndex class
Sam McCall [Thu, 4 Oct 2018 14:20:22 +0000 (14:20 +0000)]
[clangd] expose MergedIndex class

Summary:
This allows inheriting from it, so index() can ga away and allowing
TestTU::index) to be fixed.

Reviewers: ioeric

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 343780

5 years ago[clangd] clangd-indexer gathers refs and stores them in index files.
Sam McCall [Thu, 4 Oct 2018 14:09:55 +0000 (14:09 +0000)]
[clangd] clangd-indexer gathers refs and stores them in index files.

Reviewers: ioeric

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 343778

5 years ago[clangd] Remove one-segment-skipping from Dex trigrams.
Sam McCall [Thu, 4 Oct 2018 14:08:11 +0000 (14:08 +0000)]
[clangd] Remove one-segment-skipping from Dex trigrams.

Summary:
Currently queries like "ab" can match identifiers like a_yellow_bee.
The value of allowing this for exactly one segment but no more seems dubious.
It costs ~3% of overall ram (~9% of posting list ram) and some quality.

Reviewers: ilya-biryukov, ioeric

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 343777

5 years ago[X86] Set correct MMO offset on scalarized load pieces
David Greene [Thu, 4 Oct 2018 14:07:59 +0000 (14:07 +0000)]
[X86] Set correct MMO offset on scalarized load pieces

When scalarizing a load, be sure to update the offset in the
MachineMemOperand for each scalar load.

llvm-svn: 343776

5 years ago[cland] Dex: fix/simplify short-trigram generation
Sam McCall [Thu, 4 Oct 2018 14:01:55 +0000 (14:01 +0000)]
[cland] Dex: fix/simplify short-trigram generation

Summary:
1) Instead of x$$ for a short-query trigram, just use x
2) Make rules more coherent: prefixes of length 1-2, and first char + next head
3) Fix Dex::fuzzyFind to mark results as incomplete, because
   short-trigram rules only yield a subset of results.

Reviewers: ioeric

Subscribers: ilya-biryukov, jkorous, mgrang, arphaman, kadircet, cfe-commits

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

llvm-svn: 343775

5 years ago[clangd] Dex: FALSE iterator, peephole optimizations, fix AND bug
Sam McCall [Thu, 4 Oct 2018 13:12:23 +0000 (13:12 +0000)]
[clangd] Dex: FALSE iterator, peephole optimizations, fix AND bug

Summary:
The FALSE iterator will be used in a followup patch to fix a logic bug in Dex
(currently, tokens that don't have posting lists in the index are simply dropped
from the query, changing semantics).

It can usually be optimized away, so added the following opmitizations:
 - simplify booleans inside AND/OR
 - replace effectively-empty AND/OR with booleans
 - flatten nested AND/ORs

While working on this, found a bug in the AND iterator: its constructor sync()
assumes that ReachedEnd is set if applicable, but the constructor never sets it.
This crashes if a non-first iterator is nonempty.

Reviewers: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 343774

5 years ago[llvm-mca][x86] Add tests demonstrating ReadAfterLd delay
Simon Pilgrim [Thu, 4 Oct 2018 13:05:42 +0000 (13:05 +0000)]
[llvm-mca][x86] Add tests demonstrating ReadAfterLd delay

llvm-svn: 343773

5 years ago[PassTimingInfo] cleanup on TimingData's Timer handling
Fedor Sergeev [Thu, 4 Oct 2018 12:49:57 +0000 (12:49 +0000)]
[PassTimingInfo] cleanup on TimingData's Timer handling

Replacing Timer* with unique_ptr<Timer> in a pass-to-timer map.
That allows to get rid of unpretty raw deletes in PassTimingInfo destructor.
Strictly cleanup, not intended to change any visible behavior.

llvm-svn: 343772

5 years ago[llvm-exegesis][NFC] Improve parsing of the YAML files
Guillaume Chatelet [Thu, 4 Oct 2018 12:33:46 +0000 (12:33 +0000)]
[llvm-exegesis][NFC] Improve parsing of the YAML files

Summary: sscanf turns out to be slow for reading floating points.

Reviewers: courbet

Subscribers: tschuett, llvm-commits, RKSimon

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

llvm-svn: 343771

5 years ago[doc] Update the programmer's manual about SmallSet's iterator
Kristof Umann [Thu, 4 Oct 2018 12:33:33 +0000 (12:33 +0000)]
[doc] Update the programmer's manual about SmallSet's iterator

Since rL337818, you can now iterate the SmallSet.

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

llvm-svn: 343770

5 years agoRe-commit r343500 "Fix build with GCC < 5.0 (PR39131)"
Tatyana Krasnukha [Thu, 4 Oct 2018 11:39:55 +0000 (11:39 +0000)]
Re-commit r343500 "Fix build with GCC < 5.0 (PR39131)"

Occasionally didn't commit actual fix the first time.

llvm-svn: 343769

5 years ago[clang-tidy] Sequence statements with multiple parents correctly (PR39149)
Martin Bohme [Thu, 4 Oct 2018 11:36:39 +0000 (11:36 +0000)]
[clang-tidy] Sequence statements with multiple parents correctly (PR39149)

Summary:
Before this fix, the bugprone-use-after-move check could incorrectly
conclude that a use and move in a function template were not sequenced.
For details, see

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

Reviewers: alexfh, hokein, aaron.ballman, JonasToth

Reviewed By: aaron.ballman

Subscribers: xazax.hun, cfe-commits

Tags: #clang-tools-extra

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

llvm-svn: 343768

5 years ago[Index] Respect "IndexFunctionLocals" option for type loc.
Haojian Wu [Thu, 4 Oct 2018 11:03:55 +0000 (11:03 +0000)]
[Index] Respect "IndexFunctionLocals" option for type loc.

Summary:
Previously, clang index ignored local symbols defined in the function body even
IndexFunctionLocals is true.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: ilya-biryukov, ioeric, arphaman, kadircet, cfe-commits

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

llvm-svn: 343767

5 years ago[llvm-mca] Check for inconsistencies when constructing instruction descriptors.
Andrea Di Biagio [Thu, 4 Oct 2018 10:36:49 +0000 (10:36 +0000)]
[llvm-mca] Check for inconsistencies when constructing instruction descriptors.

This should help with catching inconsistent definitions of instructions with
zero opcodes, which also declare to consume scheduler/pipeline resources.

llvm-svn: 343766

5 years agoFix MSVC "not all control paths return a value" warning. NFCI.
Simon Pilgrim [Thu, 4 Oct 2018 10:25:52 +0000 (10:25 +0000)]
Fix MSVC "not all control paths return a value" warning. NFCI.

llvm-svn: 343765

5 years ago[clangd] Revert accidental flag change
Sam McCall [Thu, 4 Oct 2018 10:10:35 +0000 (10:10 +0000)]
[clangd] Revert accidental flag change

llvm-svn: 343764

5 years ago[clangd] Use canonical declarations in ReferenceFinder.
Haojian Wu [Thu, 4 Oct 2018 09:56:08 +0000 (09:56 +0000)]
[clangd] Use canonical declarations in ReferenceFinder.

Summary:
handleDeclOccurrencce reports a canonical declartion, so stick to use
canonical declarations to determine whether a declaration is in the
target set.

Also fix a previous ref test which misses a matched label (it fails without this
patch).

Reviewers: sammccall

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 343763

5 years ago[ELF] - Simplify. NFCI.
George Rimar [Thu, 4 Oct 2018 09:31:15 +0000 (09:31 +0000)]
[ELF] - Simplify. NFCI.

Assign the `Link` to parent directly.

llvm-svn: 343762

5 years ago[constexpr] Fix ICE when memcpy() is given a pointer to an incomplete array
Petr Pavlu [Thu, 4 Oct 2018 09:25:44 +0000 (09:25 +0000)]
[constexpr] Fix ICE when memcpy() is given a pointer to an incomplete array

Fix code for constant evaluation of __builtin_memcpy() and
__builtin_memmove() that would attempt to divide by zero when given two
pointers to an incomplete array.

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

llvm-svn: 343761

5 years ago[clangd] Support refs() in dex. Largely cloned from MemIndex.
Sam McCall [Thu, 4 Oct 2018 09:16:12 +0000 (09:16 +0000)]
[clangd] Support refs() in dex. Largely cloned from MemIndex.

Reviewers: hokein

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

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

llvm-svn: 343760

5 years ago[clangd] clangd-indexer: Drop support for MR-via-YAML
Sam McCall [Thu, 4 Oct 2018 08:30:03 +0000 (08:30 +0000)]
[clangd] clangd-indexer: Drop support for MR-via-YAML

Summary:
It's slow, and the open-source reduce implementation doesn't scale properly.
While here, tidy up some dead headers and comments.

Reviewers: kadircet

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

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

llvm-svn: 343759

5 years ago[AArch64][ARM] Context sensitive meaning of crypto
Sjoerd Meijer [Thu, 4 Oct 2018 07:38:53 +0000 (07:38 +0000)]
[AArch64][ARM] Context sensitive meaning of crypto

For AArch64, crypto means:
- sm4 + sha3 + sha2 + aes for Armv8.4-A and up, and
- sha2 + aes for Armv8.3-A and earlier.

For AArch32:
Crypto means sha2 + aes, because the Armv8.2-A crypto instructions
were added to AArch64 only.

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

llvm-svn: 343758

5 years ago[RISCV][NFC] Remove dead CHECK lines from vararg.ll test
Alex Bradbury [Thu, 4 Oct 2018 07:35:52 +0000 (07:35 +0000)]
[RISCV][NFC] Remove dead CHECK lines from vararg.ll test

The RISCV32 check prefix is no longer used so these lines are dead.

llvm-svn: 343757

5 years ago[RISCV] Bugfix for floats passed on the stack with the ILP32 ABI on RV32F
Alex Bradbury [Thu, 4 Oct 2018 07:28:49 +0000 (07:28 +0000)]
[RISCV] Bugfix for floats passed on the stack with the ILP32 ABI on RV32F

f32 values passed on the stack would previously cause an assertion in
unpackFromMemLoc.. This would only trigger in the presence of the F extension
making f32 a legal type. Otherwise the f32 would be legalized.

This patch fixes that by keeping LocVT=f32 when a float is passed on the
stack. It also adds test coverage for this case, and tests that also
demonstrate lw/sw/flw/fsw will be selected when most profitable. i.e. there is
no unnecessary i32<->f32 conversion in registers.

llvm-svn: 343756

5 years ago[llvm-exegesis][NFC] Test sched class names only in !NDEBUG mode.
Clement Courbet [Thu, 4 Oct 2018 07:07:16 +0000 (07:07 +0000)]
[llvm-exegesis][NFC] Test sched class names only in !NDEBUG mode.

Sched classes have no names in NDEBUG.

llvm-svn: 343755

5 years ago[X86] Merge matchANDXORWithAllOnesAsANDNP into combineANDXORWithAllOnesIntoANDNP...
Craig Topper [Thu, 4 Oct 2018 06:13:27 +0000 (06:13 +0000)]
[X86] Merge matchANDXORWithAllOnesAsANDNP into combineANDXORWithAllOnesIntoANDNP. NFCI

It's the only caller and the logic pretty easy to combine.

llvm-svn: 343754

5 years ago[CMake] Use just basename when copying C++ ABI headers
Petr Hosek [Thu, 4 Oct 2018 05:38:53 +0000 (05:38 +0000)]
[CMake] Use just basename when copying C++ ABI headers

This avoids duplicate directories when the filename includes path.

Fixes PR39145

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

llvm-svn: 343753

5 years ago[RISCV][NFC] Fix naming of RISCVISelLowering::{LowerRETURNADDR,LowerFRAMEADDR}
Alex Bradbury [Thu, 4 Oct 2018 05:27:50 +0000 (05:27 +0000)]
[RISCV][NFC] Fix naming of RISCVISelLowering::{LowerRETURNADDR,LowerFRAMEADDR}

Rename to lowerRETURNADDR, lowerFRAMEADDR in order to be consistent with the
LLVM coding style and the other functions in this file.

llvm-svn: 343752

5 years ago[llvm-exegesis] Unbreak analysis-uops-variant.test introduced in D52825
Fangrui Song [Thu, 4 Oct 2018 03:32:47 +0000 (03:32 +0000)]
[llvm-exegesis] Unbreak analysis-uops-variant.test introduced in D52825

A `defined(NDEBUG) && !defined(LLVM_ENABLE_DUMP)` build does not call
writeEscaped and there will be no `SBWriteZeroLatency` in the output.

llvm-svn: 343751

5 years ago[LegalizeIntegerTypes] Fix typo in comment. NFC
Craig Topper [Thu, 4 Oct 2018 02:40:35 +0000 (02:40 +0000)]
[LegalizeIntegerTypes] Fix typo in comment. NFC

llvm-svn: 343750

5 years agoUse std::make_pair rather than brace initialization.
Matt Morehouse [Thu, 4 Oct 2018 00:35:24 +0000 (00:35 +0000)]
Use std::make_pair rather than brace initialization.

r343732 broke the Windows bot.  Seems like the compiler on that bot
doesn't like brace initialization.

llvm-svn: 343749

5 years ago[ELF] Fix typo. NFC
Shoaib Meenai [Thu, 4 Oct 2018 00:07:59 +0000 (00:07 +0000)]
[ELF] Fix typo. NFC

llvm-svn: 343748

5 years ago[analyzer] [quickfix] Temporarily disabling a failing test.
George Karpenkov [Thu, 4 Oct 2018 00:07:45 +0000 (00:07 +0000)]
[analyzer] [quickfix] Temporarily disabling a failing test.

llvm-svn: 343747

5 years ago[WebAssembly] Add WebAssembly to LLVM_ALL_TARGETS
Derek Schuff [Wed, 3 Oct 2018 23:56:52 +0000 (23:56 +0000)]
[WebAssembly] Add WebAssembly to LLVM_ALL_TARGETS

Summary:
After fixing memory leaks in rL343362 and rL343733 the sanitizer builds are
clean and we should be good to build by default again.

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

llvm-svn: 343746

5 years ago[ELF] Fix crash on invalid undefined local symbols
Shoaib Meenai [Wed, 3 Oct 2018 23:53:11 +0000 (23:53 +0000)]
[ELF] Fix crash on invalid undefined local symbols

r320770 made LLD handle invalid DSOs where local symbols were found in
the global part of the symbol table. Unfortunately, it didn't handle the
case where those local symbols were also undefined, and r326242 exposed
an assertion failure in that case. Just warn on that case instead of
crashing, by moving the local binding check before the undefined symbol
addition.

The input file for the test is crafted by hand, since I don't know of
any tool that would produce such a broken DSO. I also don't understand
what it even means for a symbol to be undefined but have STB_LOCAL
binding - I don't think that combination makes any sense - but we have
found broken DSOs of this nature that we were linking against. I've
included detailed instructions on how to produce the DSO in the test.

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

llvm-svn: 343745

5 years ago[llvm-nm] Update clang tests based on changed llvm-nm output
Jordan Rupprecht [Wed, 3 Oct 2018 23:40:04 +0000 (23:40 +0000)]
[llvm-nm] Update clang tests based on changed llvm-nm output

llvm-svn: 343744

5 years ago[llvm-nm] Update lld tests based on changed llvm-nm output
Jordan Rupprecht [Wed, 3 Oct 2018 23:39:59 +0000 (23:39 +0000)]
[llvm-nm] Update lld tests based on changed llvm-nm output

llvm-svn: 343743

5 years ago[llvm-nm] Print an explicit "no symbols" message when an object file has no symbols
Jordan Rupprecht [Wed, 3 Oct 2018 23:39:49 +0000 (23:39 +0000)]
[llvm-nm] Print an explicit "no symbols" message when an object file has no symbols

Summary:
GNU nm (and other nm implementations, such as "go tool nm") prints an explicit "no symbols" message when an object file has no symbols. Currently llvm-nm just doesn't print anything. Adding an explicit "no symbols" message will allow llvm-nm to be used in place of nm: some scripts and build processes use `nm <file> | grep "no symbols"` as a test to see if a file has no symbols. It will also be more familiar to anyone used to nm.

That said, the format implemented here is slightly different, in that it doesn't print the tool name in the message (which IMHO is not useful to include).

Demo:
```
$ for nm in nm bin/llvm-nm ; do echo "nm implementation: $nm"; $nm /tmp/foo{1,2}.o; echo; done
nm implementation: nm

/tmp/foo1.o:
nm: /tmp/foo1.o: no symbols

/tmp/foo2.o:
0000000000000000 T foo2

nm implementation: bin/llvm-nm

/tmp/foo1.o:
no symbols

/tmp/foo2.o:
0000000000000000 T foo2
```

Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: llvm-commits

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

llvm-svn: 343742

5 years ago[RISCV] Handle redundant SplitF64+BuildPairF64 pairs in a DAGCombine
Alex Bradbury [Wed, 3 Oct 2018 23:30:16 +0000 (23:30 +0000)]
[RISCV] Handle redundant SplitF64+BuildPairF64 pairs in a DAGCombine

r343712 performed this optimisation during instruction selection. As Eli
Friedman pointed out in post-commit review, implementing this as a DAGCombine
might allow opportunities for further optimisations.

llvm-svn: 343741

5 years ago[SEMA] split ExtWarn dupl-decl-spec's into Extension and ExtWarn
Nick Desaulniers [Wed, 3 Oct 2018 23:09:29 +0000 (23:09 +0000)]
[SEMA] split ExtWarn dupl-decl-spec's into Extension and ExtWarn

Summary:
For types deduced from typedef's and typeof's, don't warn for duplicate
declaration specifiers in C90 unless -pedantic.

Create a third diagnostic type for duplicate declaration specifiers.
Previously, we had an ExtWarn and a Warning. This change adds a third,
Extension, which only warns when -pedantic is set, staying silent
otherwise.

Fixes PR32985.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: srhines, cfe-commits

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

llvm-svn: 343740

5 years ago[WebAssembly] Bitselect intrinsic and instruction
Thomas Lively [Wed, 3 Oct 2018 23:02:23 +0000 (23:02 +0000)]
[WebAssembly] Bitselect intrinsic and instruction

Summary: Depends on D52755.

Reviewers: aheejin, dschuff

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

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

llvm-svn: 343739

5 years agoRevert "[ASTMatchers] Fix DynamicASTMatchersTests again"
Fangrui Song [Wed, 3 Oct 2018 22:56:26 +0000 (22:56 +0000)]
Revert "[ASTMatchers] Fix DynamicASTMatchersTests again"

This reverts commit 8a6631a983ec9c1d22cc77c5f55a524a651740f0.

The last fix seems good in Debug mode.

llvm-svn: 343738

5 years ago[RISCV][NFC] Refactor LocVT<->ValVT converstion in RISCVISelLowering
Alex Bradbury [Wed, 3 Oct 2018 22:53:25 +0000 (22:53 +0000)]
[RISCV][NFC] Refactor LocVT<->ValVT converstion in RISCVISelLowering

There was some duplicated logic for using the LocInfo of a CCValAssign in
order to convert from the ValVT to LocVT or vice versa. Resolve this by
factoring out convertLocVTFromValVT from unpackFromRegLoc. Also rename
packIntoRegLoc to the more appropriate convertValVTToLocVT and call these
helper functions consistently.

llvm-svn: 343737

5 years ago[analyzer] [tests] [quickfix] Make more test more resilient for non-defaut -std.
Artem Dergachev [Wed, 3 Oct 2018 22:48:00 +0000 (22:48 +0000)]
[analyzer] [tests] [quickfix] Make more test more resilient for non-defaut -std.

It is important to specify the version of the standard because tests should
test the same thing regardless of the current default version of the standard.

llvm-svn: 343736

5 years ago[analyzer] Do not crash if the assumption added in TrustNonNullChecker is enough...
George Karpenkov [Wed, 3 Oct 2018 22:31:09 +0000 (22:31 +0000)]
[analyzer] Do not crash if the assumption added in TrustNonNullChecker is enough to make the state unfeasible

rdar://43541814

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

llvm-svn: 343735

5 years ago[WebAssembly] Refactor use of signatures
Derek Schuff [Wed, 3 Oct 2018 22:25:32 +0000 (22:25 +0000)]
[WebAssembly] Refactor use of signatures

Update use of WebAssemblySignature to go along with D52580

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

llvm-svn: 343734

5 years ago[WebAssembly] Refactor WasmSignature and use it for MCSymbolWasm
Derek Schuff [Wed, 3 Oct 2018 22:22:48 +0000 (22:22 +0000)]
[WebAssembly] Refactor WasmSignature and use it for MCSymbolWasm

MCContext does not destroy MCSymbols on shutdown. So, rather than putting
SmallVectors (which may heap-allocate) inside MCSymbolWasm, use unowned pointer
to a WasmSignature instead. The signatures are now owned by the AsmPrinter.
Also uses WasmSignature instead of param and result vectors in TargetStreamer,
and leaves some TODOs for further simplification.

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

llvm-svn: 343733

5 years agoMinor refacotring of Relocations.cpp. NFC.
Rui Ueyama [Wed, 3 Oct 2018 22:20:26 +0000 (22:20 +0000)]
Minor refacotring of Relocations.cpp. NFC.

This patch splits ThunkCreator::mergeThunks into two smaller functions.
Also adds blank lines to various places so that the code doesn't look
too dense.

llvm-svn: 343732

5 years ago[machineverifier] Detect PHI's that are preceeded by non-PHI's
Daniel Sanders [Wed, 3 Oct 2018 22:05:31 +0000 (22:05 +0000)]
[machineverifier] Detect PHI's that are preceeded by non-PHI's

If present, PHI nodes must appear before non-PHI nodes in a basic block. The
register allocator relies on this and will fail to eliminate PHI's that do not
meet this requirement.

llvm-svn: 343731

5 years ago[mips] Remove -allow-deprecated-dag-overlap flag from tests. NFC
Simon Atanasyan [Wed, 3 Oct 2018 22:02:23 +0000 (22:02 +0000)]
[mips] Remove -allow-deprecated-dag-overlap flag from tests. NFC

Fix DAG check statements in MIPS codegen tests to remove
-allow-deprecated-dag-overlap flag.

llvm-svn: 343730

5 years ago[PPC64] Test documenting toc-restore after interposable recursive call. [NFC]
Sean Fertile [Wed, 3 Oct 2018 21:58:44 +0000 (21:58 +0000)]
[PPC64] Test documenting toc-restore after interposable recursive call. [NFC]

A test verifying that toc restores are properly inserted following recursive
calls, as well as briefly describing why they are needed.

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

llvm-svn: 343729

5 years ago[PPC64] Add test documenting toc-restore when linking with -Bsymbolic. [NFC]
Sean Fertile [Wed, 3 Oct 2018 21:58:42 +0000 (21:58 +0000)]
[PPC64] Add test documenting toc-restore when linking with -Bsymbolic. [NFC]

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

llvm-svn: 343728

5 years ago[InstCombine] allow SimplifyDemandedVectorElts to work with FP binops
Sanjay Patel [Wed, 3 Oct 2018 21:44:59 +0000 (21:44 +0000)]
[InstCombine] allow SimplifyDemandedVectorElts to work with FP binops

We're a long way from D50992 and D51553, but this is where we have to start.
We weren't back-propagating undefs into binop constant values for anything but
add/sub/mul/and/or/xor.

This is likely because we have to be careful about not introducing UB/poison
with div/rem/shift. But I suspect we already are getting the poison part wrong
for add/sub/mul (although it may not be possible to expose the bug currently
because we use SimplifyDemandedVectorElts from a limited set of opcodes).
See the discussion/implementation from D48987 and D49047.

This patch just enables functionality for FP ops because those do not have
UB/poison potential.

llvm-svn: 343727

5 years agoFix buildbot regression by rL339929: NameError: global name 'test_directory' is not...
Jan Kratochvil [Wed, 3 Oct 2018 21:42:54 +0000 (21:42 +0000)]
Fix buildbot regression by rL339929: NameError: global name 'test_directory' is not defined

With buildbot slave under test - I get after rL339929:
http://lab.llvm.org:8014/builders/lldb-x86_64-fedora-28-cmake/builds/243/steps/test1/logs/stdio

  File "/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/scripts/../llvm/tools/lldb/test/dotest.py", line 7, in <module>
    lldbsuite.test.run_suite()
  File "/quad/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/llvm/tools/lldb/packages/Python/lldbsuite/test/dotest.py", line 1177, in run_suite
    configuration.results_formatter_object)
  File "/quad/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/llvm/tools/lldb/packages/Python/lldbsuite/test/dosep.py", line 1692, in main
    dst = core.replace(test_directory, "")[1:]
NameError: global name 'test_directory' is not defined

Patch by Vedant Kumar.

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

llvm-svn: 343726

5 years ago[libc++][NFC] Add error messages to a couple of static_asserts in span
Louis Dionne [Wed, 3 Oct 2018 21:36:16 +0000 (21:36 +0000)]
[libc++][NFC] Add error messages to a couple of static_asserts in span

Summary:
Add error messages to a couple of static_asserts in span to match the
style used in the rest of the file. Also fix an extra paren typo in a
assert error message.

Committed on behalf of Jason Lovett.

Reviewers: ldionne

Subscribers: libcxx-commits

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

llvm-svn: 343725

5 years agoMake meanings of variables clearer in action table generation (NFC)
Heejin Ahn [Wed, 3 Oct 2018 21:30:15 +0000 (21:30 +0000)]
Make meanings of variables clearer in action table generation (NFC)

Summary:

Reviewers: kristina, zhmu, dschuff, rnk

Subscribers: llvm-commits

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

llvm-svn: 343724

5 years ago[X86] Stop promoting vector ISD::SELECT to vXi64.
Craig Topper [Wed, 3 Oct 2018 21:10:29 +0000 (21:10 +0000)]
[X86] Stop promoting vector ISD::SELECT to vXi64.

The additional patterns needed for this aren't overwhelming and introducing extra bitcasts during lowering limits our ability to do computeNumSignBits. Not that I have a good example of that for select. I'm just becoming increasingly grumpy about promotion of AND/OR/XOR. SELECT was just a lot easier to fix.

llvm-svn: 343723