platform/upstream/llvm.git
6 years agoAMDGPU: Don't use struct type for argument layout
Matt Arsenault [Fri, 29 Jun 2018 17:31:42 +0000 (17:31 +0000)]
AMDGPU: Don't use struct type for argument layout

This was introducing unnecessary padding after the explicit
arguments, depending on the alignment of the total struct type.
Also has the side effect of avoiding creating an extra GEP for
the offset from the base kernel argument to the explicit kernel
argument offset.

llvm-svn: 335999

6 years ago[X86] Limit the number of target specific nodes emitted in LowerShiftParts
Craig Topper [Fri, 29 Jun 2018 17:24:07 +0000 (17:24 +0000)]
[X86] Limit the number of target specific nodes emitted in LowerShiftParts

The important part is the creation of the SHLD/SHRD nodes. The compare and the conditional move can use target independent nodes that can be legalized on their own. This gives some opportunities to trigger the optimizations present in the lowering for those things. And its just better to limit the number of places we emit target specific nodes.

The changed test cases still aren't optimal.

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

llvm-svn: 335998

6 years ago[cfi] Use __builtin version of __clear_cache.
Evgeniy Stepanov [Fri, 29 Jun 2018 17:22:58 +0000 (17:22 +0000)]
[cfi] Use __builtin version of __clear_cache.

__builtin___clear_cache is also present on X86 and does the right thing (i.e. nop) there.

llvm-svn: 335997

6 years agoExtend CFGPrinter and CallPrinter with Heat Colors
Sean Fertile [Fri, 29 Jun 2018 17:13:58 +0000 (17:13 +0000)]
Extend CFGPrinter and CallPrinter with Heat Colors

Extends the CFGPrinter and CallPrinter with heat colors based on heuristics or
profiling information. The colors are enabled by default and can be toggled
on/off for CFGPrinter by using the option -cfg-heat-colors for both
-dot-cfg[-only] and -view-cfg[-only].  Similarly, the colors can be toggled
on/off for CallPrinter by using the option -callgraph-heat-colors for both
-dot-callgraph and -view-callgraph.

Patch by Rodrigo Caetano Rocha!

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

llvm-svn: 335996

6 years ago[dsymutil] Rename conflicting declaration
Jonas Devlieghere [Fri, 29 Jun 2018 17:11:34 +0000 (17:11 +0000)]
[dsymutil] Rename conflicting declaration

Using MemoryBuffer as member name clashed with the llvm::MemoryBuffer
class.

llvm-svn: 335995

6 years ago[X86] Use a std::vector for the memory unfolding table.
Craig Topper [Fri, 29 Jun 2018 17:11:26 +0000 (17:11 +0000)]
[X86] Use a std::vector for the memory unfolding table.

Previously we used a DenseMap which is costly to set up due to multiple full table rehashes as the size increases and causes the table to be reallocated.

This patch changes the table to a vector of structs. We now walk the reg->mem tables and push new entries in the mem->reg table for each row not marked TB_NO_REVERSE. Once all the table entries have been created, we sort the vector. Then we can use a binary search for lookups.

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

llvm-svn: 335994

6 years ago[Fixed Point Arithmetic] Rename `-fsame-fbits` flag
Leonard Chan [Fri, 29 Jun 2018 17:08:19 +0000 (17:08 +0000)]
[Fixed Point Arithmetic] Rename `-fsame-fbits` flag

- Rename the `-fsame-fbits` flag to `-fpadding-on-unsigned-fixed-point`
- Move the flag from a driver option to a cc1 option
- Rename the `SameFBits` member in TargetInfo to `PaddingOnUnsignedFixedPoint`
- Updated descriptions

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

llvm-svn: 335993

6 years ago[ELF] Set -o because current directory may not be writable during a test
Fangrui Song [Fri, 29 Jun 2018 17:07:22 +0000 (17:07 +0000)]
[ELF] Set -o because current directory may not be writable during a test

llvm-svn: 335992

6 years ago[dsymutil] Make the CachedBinaryHolder the default
Jonas Devlieghere [Fri, 29 Jun 2018 16:51:52 +0000 (16:51 +0000)]
[dsymutil] Make the CachedBinaryHolder the default

Replaces all uses of the old binary holder with its cached variant.

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

llvm-svn: 335991

6 years ago[dsymutil] Introduce a new CachedBinaryHolder
Jonas Devlieghere [Fri, 29 Jun 2018 16:50:41 +0000 (16:50 +0000)]
[dsymutil] Introduce a new CachedBinaryHolder

The original binary holder has an optimization where it caches a static
library (archive) between consecutive calls to GetObjects. However, the
actual memory buffer wasn't cached between calls.

This made sense when dsymutil was processing objects one after each
other, but when processing them in parallel, several binaries have to be
in memory at the same time. For this reason, every link context
contained a binary holder.

Having one binary holder per context is problematic, because the same
static archive was cached for every object file. Luckily, when the file
is mmap'ed, this was only costing us virtual memory.

This patch introduces a new BinaryHolder variant that is fully cached,
for all the object files it load, as well as the static archives. This
way, we don't have to give up on this optimization of bypassing the
file system.

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

llvm-svn: 335990

6 years ago[mips] Support shrink-wrapping
Petar Jovanovic [Fri, 29 Jun 2018 16:37:16 +0000 (16:37 +0000)]
[mips] Support shrink-wrapping

Except for -O0, it's enabled by default.

Patch by Vladimir Stefanovic.

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

llvm-svn: 335989

6 years ago[AMDGPU] Enable LICM in the BE pipeline
Stanislav Mekhanoshin [Fri, 29 Jun 2018 16:26:53 +0000 (16:26 +0000)]
[AMDGPU] Enable LICM in the BE pipeline

This allows to hoist code portion to compute reciprocal of loop
invariant denominator in integer division after codegen prepare
expansion.

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

llvm-svn: 335988

6 years ago[OPENMP, NVPTX] Sync threads before start ordered loops.
Alexey Bataev [Fri, 29 Jun 2018 16:16:00 +0000 (16:16 +0000)]
[OPENMP, NVPTX] Sync threads before start ordered loops.

Summary: Threads must be synchronized before starting ordered construct.

Reviewers: grokos

Subscribers: guansong, openmp-commits

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

llvm-svn: 335987

6 years ago[MachineOutliner] Add always and never options to -enable-machine-outliner
Jessica Paquette [Fri, 29 Jun 2018 16:12:45 +0000 (16:12 +0000)]
[MachineOutliner] Add always and never options to -enable-machine-outliner

This is a recommit of r335887, which was erroneously committed earlier.

To enable the MachineOutliner by default on AArch64, we need to be able to
disable the MachineOutliner and also provide an option to "always" enable the
outliner.

This adds that capability. It allows the user to still use the old
-enable-machine-outliner option, which defaults to "always". This is building
up to allowing the user to specify "always" versus the target default
outlining behaviour.

https://reviews.llvm.org/D48682

llvm-svn: 335986

6 years ago[lld] Address post-commit review of r335848
Filipe Cabecinhas [Fri, 29 Jun 2018 15:34:36 +0000 (15:34 +0000)]
[lld] Address post-commit review of r335848

llvm-svn: 335985

6 years ago[InstCombine] add more tests for shuffle-binop folds; NFC
Sanjay Patel [Fri, 29 Jun 2018 15:28:11 +0000 (15:28 +0000)]
[InstCombine] add more tests for shuffle-binop folds; NFC

The mul+shl tests add coverage for the fold enabled with D48678.
The and+or tests are not handled yet; that's D48662.

llvm-svn: 335984

6 years ago[clang-format/ObjC] Fix NS_SWIFT_NAME(foo(bar:baz:)) after ObjC method decl
Ben Hamilton [Fri, 29 Jun 2018 15:26:37 +0000 (15:26 +0000)]
[clang-format/ObjC] Fix NS_SWIFT_NAME(foo(bar:baz:)) after ObjC method decl

Summary:
In D44638, I partially fixed `NS_SWIFT_NAME(foo(bar:baz:))`-style
annotations on C functions, but didn't add a test for Objective-C
method declarations.

For ObjC method declarations which are annotated with `NS_SWIFT_NAME(...)`,
we currently fail to annotate the final component of the selector
name as `TT_SelectorName`.

Because the token type is left unknown, clang-format will happily
cause a compilation error when it changes the following:

```
@interface Foo
- (void)doStuffWithFoo:(id)name
                   bar:(id)bar
                   baz:(id)baz
    NS_SWIFT_NAME(doStuff(withFoo:bar:baz:));
@end
```

to:

```
@interface Foo
- (void)doStuffWithFoo:(id)name
                   bar:(id)bar
                   baz:(id)baz
    NS_SWIFT_NAME(doStuff(withFoo:bar:baz
:));
@end
```

(note the linebreak before the final `:`).

The logic which decides whether or not to annotate the token before a
`:` with `TT_SelectorName` is pretty fragile, and has to handle some
pretty odd cases like pair-parameters:

```
[I drawRectOn:surface ofSize:aa:bbb atOrigin:cc:dd];
```

So, to minimize the effect of this change, I decided to only annotate
unknown identifiers before a `:` as `TT_SelectorName` for Objective-C
declaration lines.

Test Plan: New tests included. Confirmed tests failed before change and
  passed after change. Ran tests with:
  % make -j16 FormatTests && ./tools/clang/unittests/Format/FormatTests

Reviewers: djasper, krasimir, jolesiak

Reviewed By: krasimir

Subscribers: cfe-commits

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

llvm-svn: 335983

6 years ago[scs] Disable negative test in shadowcallstack.
Evgeniy Stepanov [Fri, 29 Jun 2018 15:16:45 +0000 (15:16 +0000)]
[scs] Disable negative test in shadowcallstack.

The test checks that scs does NOT work correctly w/o runtime support.
That's a strange thing to test, and it is also flaky, because things
may just work if x18 happens to point to a writable page.

llvm-svn: 335982

6 years ago[scudo] Add some runtime tests for the minimal runtime
Kostya Kortchinsky [Fri, 29 Jun 2018 14:56:25 +0000 (14:56 +0000)]
[scudo] Add some runtime tests for the minimal runtime

Summary:
As well as some tests to ensure that various combinations of the clang command
line flags work (shared/static/minimal).

Reviewers: eugenis, alekseyshl, vitalybuka

Reviewed By: vitalybuka

Subscribers: srhines, delcypher, #sanitizers, llvm-commits

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

llvm-svn: 335981

6 years ago[clangd] codeComplete returns more structured completion items, LSP. NFC.
Sam McCall [Fri, 29 Jun 2018 14:47:57 +0000 (14:47 +0000)]
[clangd] codeComplete returns more structured completion items, LSP. NFC.

Summary:
LSP has some presentational fields with limited semantics (e.g. 'detail') and
doesn't provide a good place to return information like namespace.

Some places where more detailed information is useful:
 - tools like quality analysis
 - alternate frontends that aren't strictly LSP
 - code completion unit tests

In this patch, ClangdServer::codeComplete still return LSP CompletionList, but
I plan to switch that soon (should be a no-op for ClangdLSPServer).

Deferring this makes it clear that we don't change behavior (tests stay the
same) and also keeps the API break to a small patch which can be reverted.

Reviewers: ioeric

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

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

llvm-svn: 335980

6 years ago[ELF] - Linker script: add tests for checking malformed numbers parsing.
George Rimar [Fri, 29 Jun 2018 14:29:44 +0000 (14:29 +0000)]
[ELF] - Linker script: add tests for checking malformed numbers parsing.

Previoulsy we had no test that covered malfolmed numbers
with 'H', 'K' and 'M' suffixes, so the following lines
were uncovered:

https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L996
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L1003
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L1008

Patch fixes that.

llvm-svn: 335979

6 years ago[clang-format] Support additional common functions for text proto formatting
Krasimir Georgiev [Fri, 29 Jun 2018 14:25:25 +0000 (14:25 +0000)]
[clang-format] Support additional common functions for text proto formatting

Summary: This adds a few more common function names expecting a text proto argument.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

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

llvm-svn: 335978

6 years ago[llvm-mca] Remove field HasReadAdvanceEntries from class ReadDescriptor.
Andrea Di Biagio [Fri, 29 Jun 2018 14:24:46 +0000 (14:24 +0000)]
[llvm-mca] Remove field HasReadAdvanceEntries from class ReadDescriptor.

This simplifies the logic that updates RAW dependencies in the DispatchStage.
There is no advantage in storing that flag in the ReadDescriptor; we should
simply rely on the call to `STI.getReadAdvanceCycles()` to obtain the
ReadAdvance cycles. If there are no read-advance entries, then method
`getReadAdvanceCycles()` quickly returns 0.

No functional change intended.

llvm-svn: 335977

6 years ago[DEBUG_INFO, NVPTX] Do not emit .debug_loc section.
Alexey Bataev [Fri, 29 Jun 2018 14:23:28 +0000 (14:23 +0000)]
[DEBUG_INFO, NVPTX] Do not emit .debug_loc section.

Summary:
.debug_loc section is not supported for NVPTX target. If there is an
object whose location can change during its lifetime, we do not generate
debug location info for this variable.

Reviewers: echristo

Subscribers: jholewinski, JDevlieghere, llvm-commits

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

llvm-svn: 335976

6 years ago[Hexagon] Remove unused instruction itineraties, NFC
Krzysztof Parzyszek [Fri, 29 Jun 2018 13:55:28 +0000 (13:55 +0000)]
[Hexagon] Remove unused instruction itineraties, NFC

llvm-svn: 335975

6 years ago[InstCombine] enhance shuffle-of-binops to allow different variable ops (PR37806)
Sanjay Patel [Fri, 29 Jun 2018 13:44:06 +0000 (13:44 +0000)]
[InstCombine] enhance shuffle-of-binops to allow different variable ops (PR37806)

This was discussed in D48401 as another improvement for:
https://bugs.llvm.org/show_bug.cgi?id=37806

If we have 2 different variable values, then we shuffle (select) those lanes,
shuffle (select) the constants, and then perform the binop. This eliminates a binop.

The new shuffle uses the same shuffle mask as the existing shuffle, so there's no
danger of creating a difficult shuffle.

All of the earlier constraints still apply, but we also check for extra uses to
avoid creating more instructions than we'll remove.

Additionally, we're disallowing the fold for div/rem because that could expose a
UB hole.

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

llvm-svn: 335974

6 years ago[ELF] - Eliminate dead code from shouldKeepInSymtab. NFC.
George Rimar [Fri, 29 Jun 2018 13:34:05 +0000 (13:34 +0000)]
[ELF] - Eliminate dead code from shouldKeepInSymtab. NFC.

shouldKeepInSymtab is called from copyLocalSymbols:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L574

The pre-condition is that symbol should be Defined:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L572

And its section is Live:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L548

InputSection::Discarded section can never be Live. And hence I believe
check I removed in this patch is excessive.

llvm-svn: 335973

6 years ago[clangd] Improve output of --help and --version. NFC.
Sam McCall [Fri, 29 Jun 2018 13:24:20 +0000 (13:24 +0000)]
[clangd] Improve output of --help and --version. NFC.

Reviewers: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, cfe-commits

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

llvm-svn: 335972

6 years agoUse range for in normalizeValInst [NFCI]
Tobias Grosser [Fri, 29 Jun 2018 13:06:44 +0000 (13:06 +0000)]
Use range for in normalizeValInst [NFCI]

llvm-svn: 335971

6 years agoTranslate a couple of foreach callbacks into range-based iterator loops
Tobias Grosser [Fri, 29 Jun 2018 12:23:48 +0000 (12:23 +0000)]
Translate a couple of foreach callbacks into range-based iterator loops

Thanks to Philip Pfaffe for providing iterator support in the previous
commit.

llvm-svn: 335970

6 years ago[ELF] - EhFrame.cpp: cover personality encoding handling code with the test cases.
George Rimar [Fri, 29 Jun 2018 12:19:35 +0000 (12:19 +0000)]
[ELF] - EhFrame.cpp: cover personality encoding handling code with the test cases.

CIEs augmentation string can have 'P' character,
what means the next byte is the personality encoding, a DW_EH_PE_xxx value.
This is followed by a pointer to the personality function.

We had the support of the different encodings earlier, but had no test cases.

This change adds coverage of DW_EH_PE_absptr/DW_EH_PE_signed/DW_EH_PE_udata2/DW_EH_PE_sdata2 and
DW_EH_PE_udata8/DW_EH_PE_sdata8 cases for place below:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L123

llvm-svn: 335969

6 years ago[ASTImporter] Added import of CXXStdInitializerListExpr
Gabor Marton [Fri, 29 Jun 2018 12:17:34 +0000 (12:17 +0000)]
[ASTImporter] Added import of CXXStdInitializerListExpr

Reviewers: a.sidorin

Reviewed By: a.sidorin

Subscribers: martong, cfe-commits

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

Patch by Balazs Keri!

llvm-svn: 335968

6 years agoAdd a test for reading lld-generated build-ids
Pavel Labath [Fri, 29 Jun 2018 12:15:54 +0000 (12:15 +0000)]
Add a test for reading lld-generated build-ids

Summary:
This test makes sure we are able to read the shorter build-ids which are
generated by lld.

To make this work, I've extended lldb-test to print the UUID of the
loaded object file. I've renamed the lldb-test subcommand from
"module-sections" to "object-file" to reflect the fact it prints more
than just the sections.

I've also added the module Architecture to the output, so we could avoid
printing the entire symbol file information just to get the ArchSpec
details in the lc_version_min test (which was also the only test in it's
folder not using the module-sections command).

Reviewers: aprantl, zturner

Subscribers: lldb-commits

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

llvm-svn: 335967

6 years agoAdd missing namespace specifier
Tobias Grosser [Fri, 29 Jun 2018 11:49:34 +0000 (11:49 +0000)]
Add missing namespace specifier

llvm-svn: 335966

6 years agoFix overconfident assert in ScalarEvolution::isImpliedViaMerge
Roman Shirokiy [Fri, 29 Jun 2018 11:46:30 +0000 (11:46 +0000)]
Fix overconfident assert in ScalarEvolution::isImpliedViaMerge
We can have AddRec with loops having many predecessors.
This changes an assert to an early return.

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

llvm-svn: 335965

6 years ago[analyzer][UninitializedObjectChecker] Added a NotesAsWarnings flag
Kristof Umann [Fri, 29 Jun 2018 11:25:24 +0000 (11:25 +0000)]
[analyzer][UninitializedObjectChecker] Added a NotesAsWarnings flag

In order to better support consumers of the plist output that don't
parse note entries just yet, a 'NotesAsWarnings' flag was added.
If it's set to true, all notes will be converted to warnings.

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

llvm-svn: 335964

6 years agoUUID: Add support for arbitrary-sized module IDs
Pavel Labath [Fri, 29 Jun 2018 11:20:29 +0000 (11:20 +0000)]
UUID: Add support for arbitrary-sized module IDs

Summary:
The data structure is optimized for the case where the UUID size is <=
20 bytes (standard length emitted by the GNU linkers), but larger sizes
are also possible.

I've modified the string conversion function to support the new sizes as
well. For standard UUIDs it maintains the traditional formatting
(4-2-2-2-6). If a UUID is shorter, we just cut this sequence short, and
for longer UUIDs it will just repeat the last 6-byte block as long as
necessary.

I've also modified ObjectFileELF to take advantage of the new UUIDs and
avoid manually padding the UUID to 16 bytes. While there, I also made
sure the computed UUID does not depend on host endianness.

Reviewers: clayborg, lemo, sas, davide, espindola

Subscribers: emaste, arichardson, lldb-commits

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

llvm-svn: 335963

6 years ago[AArch64] Armv8.4-A: Virtualization system registers
Sjoerd Meijer [Fri, 29 Jun 2018 11:03:15 +0000 (11:03 +0000)]
[AArch64] Armv8.4-A: Virtualization system registers

This adds the Secure EL2 extension.

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

llvm-svn: 335962

6 years ago[cmake] Change WIN32 test to CMAKE_HOST_WIN32
Filipe Cabecinhas [Fri, 29 Jun 2018 10:34:37 +0000 (10:34 +0000)]
[cmake] Change WIN32 test to CMAKE_HOST_WIN32

The test is about what can be run on the host, not the cmake target.
When cross-compiling (compiler-rt at least) on Windows, we end up with
lit being unable to run llvm-lit because it can't find the llvm-lit
module.

llvm-svn: 335961

6 years agoFix use-after-free in CommandCompletions.cpp
Pavel Labath [Fri, 29 Jun 2018 10:27:18 +0000 (10:27 +0000)]
Fix use-after-free in CommandCompletions.cpp

The code was creating a StringRef to a temporary std::string. The
solution is to just drop the .str() from the original StringRef.

This manifested it self as the new TestCompletions test failing in some
configurations.

llvm-svn: 335960

6 years ago[ASTImporter] Eliminated some unittest warnings.
Gabor Marton [Fri, 29 Jun 2018 10:25:19 +0000 (10:25 +0000)]
[ASTImporter] Eliminated some unittest warnings.

Summary:
When running the ASTTests test, warnings produced by the compiler can be
distracting when looking for test errors. A part of the warnings is removed
by setting extra compiler options.

Reviewers: a.sidorin

Reviewed By: a.sidorin

Subscribers: a_sidorin, martong, cfe-commits

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

Patch by Balazs Keri!

llvm-svn: 335959

6 years ago[ELF] - Remove dead code.
George Rimar [Fri, 29 Jun 2018 09:54:51 +0000 (09:54 +0000)]
[ELF] - Remove dead code.

I do not think this code was ever alive,
because the following code says we can have OutputSection and
SymbolAssignment cases only. We already handle both of them.

https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L502

FWIW, it is dead in the LLD code coverage reports I am running either.

llvm-svn: 335958

6 years ago[X86][SSE] Support v16i8/v32i8 vector rotations
Simon Pilgrim [Fri, 29 Jun 2018 09:36:39 +0000 (09:36 +0000)]
[X86][SSE] Support v16i8/v32i8 vector rotations

This uses the same technique as for shifts - split the rotation into 4/2/1-bit partial rotations and select those partials based on the amount bit, making use of PBLENDVB if available. This halves the use of PBLENDVB compared to expanding to shifts, which can be a slow op.

Unfortunately I haven't found a decent way to share much of this code with the shift equivalent.

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

llvm-svn: 335957

6 years agoFix TestLoadUsingPaths on linux
Pavel Labath [Fri, 29 Jun 2018 09:22:07 +0000 (09:22 +0000)]
Fix TestLoadUsingPaths on linux

we need to explicitly link the test program with -ldl for the dlopen
function to be available.

llvm-svn: 335956

6 years agoModernize completion tests
Pavel Labath [Fri, 29 Jun 2018 09:06:42 +0000 (09:06 +0000)]
Modernize completion tests

Now that we have gmock, we can use its matchers to better express the
test assertions. The main advantage of this is that when things fail,
the test will now print the expected and actual lists of completed
strings instead of just a not-very-helpful "false is not true" message.

llvm-svn: 335955

6 years ago[ELF] - Add test case to test 32 bits output.
George Rimar [Fri, 29 Jun 2018 08:54:34 +0000 (08:54 +0000)]
[ELF] - Add test case to test 32 bits output.

We had no tests that checked how we print -Map output for
32 bit targets. Though there are at least 2 places where we have the difference.
(between 64 and 32 bits):

https://github.com/llvm-mirror/lld/blob/master/ELF/MapFile.cpp#L52
https://github.com/llvm-mirror/lld/blob/master/ELF/MapFile.cpp#L162

Patch adds just a trivial test to check we do right things in general.

llvm-svn: 335954

6 years ago[ARM][AArch64] Armv8.4-A Enablement
Sjoerd Meijer [Fri, 29 Jun 2018 08:43:19 +0000 (08:43 +0000)]
[ARM][AArch64] Armv8.4-A Enablement

Initial patch adding assembly support for Armv8.4-A.

Besides adding v8.4 as a supported architecture to the usual places, this also
adds target features for the different crypto algorithms. Armv8.4-A introduced
new crypto algorithms, made them optional, and allows different combinations:

- none of the v8.4 crypto functions are supported, which is independent of the
  implementation of the Armv8.0 SHA1 and SHA2 instructions.
- the v8.4 SHA512 and SHA3 support is implemented, in this case the Armv8.0
  SHA1 and SHA2 instructions must also be implemented.
- the v8.4 SM3 and SM4 support is implemented, which is independent of the
  implementation of the Armv8.0 SHA1 and SHA2 instructions.
- all of the v8.4 crypto functions are supported, in this case the Armv8.0 SHA1
  and SHA2 instructions must also be implemented.

The v8.4 crypto instructions are added to AArch64 only, and not AArch32,
and are made optional extensions to Armv8.2-A.

The user-facing Clang options will map on these new target features, their
naming will be compatible with GCC and added in follow-up patches.

The Armv8.4-A instruction sets can be downloaded here:
https://developer.arm.com/products/architecture/a-profile/exploration-tools

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

llvm-svn: 335953

6 years ago[NFC] Fix formatting to appease builders
Philip Pfaffe [Fri, 29 Jun 2018 08:29:17 +0000 (08:29 +0000)]
[NFC] Fix formatting to appease builders

llvm-svn: 335952

6 years agoImplement an iterator for isl maps, basic_maps, sets, basic_sets
Philip Pfaffe [Fri, 29 Jun 2018 08:17:03 +0000 (08:17 +0000)]
Implement an iterator for isl maps, basic_maps, sets, basic_sets

Summary:
Provide an iterator to simplify iteration over some isl collections.
Since these types do not natively support iteration, they have to be converted
to an list first by the caller, but can then be used in a ranged for loop:
```
isl::set S;
for (auto SubSet : S.get_basic_set_list ()) {
  // ...
}
```

Reviewers: bollu, Meinersbur, grosser, dexonsmith

Reviewed By: bollu

Subscribers: hfinkel, mgorny, Meinersbur, mehdi_amini, bollu, steven_wu, llvm-commits

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

llvm-svn: 335951

6 years agoSCEVExpander::expandAddRecExprLiterally(): check before casting as Instruction
Roman Lebedev [Fri, 29 Jun 2018 07:44:20 +0000 (07:44 +0000)]
SCEVExpander::expandAddRecExprLiterally(): check before casting as Instruction

Summary:
An alternative to D48597.
Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=37936 | PR37936 ]].

The problem is as follows:
1. `indvars` marks `%dec` as `NUW`.
2. `loop-instsimplify` runs `instsimplify`, which constant-folds `%dec` to -1 (D47908)
3. `loop-reduce` tries to do some further modification, but crashes
    with an type assertion in cast, because `%dec` is no longer an `Instruction`,

If the runline is split into two, i.e. you first run `-indvars -loop-instsimplify`,
store that into a file, and then run `-loop-reduce`, there is no crash.

So it looks like the problem is due to `-loop-instsimplify` not discarding SCEV.
But in this case we can just not crash if it's not an `Instruction`.
This is just a local fix, unlike D48597, so there may very well be other problems.

Reviewers: mkazantsev, uabelho, sanjoy, silviu.baranga, wmi

Reviewed By: mkazantsev

Subscribers: evstupac, javed.absar, spatel, llvm-commits

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

llvm-svn: 335950

6 years ago[ScopHelper] Provide support for recognising collective invariant loads
Philip Pfaffe [Fri, 29 Jun 2018 07:29:45 +0000 (07:29 +0000)]
[ScopHelper] Provide support for recognising collective invariant loads

Summary: This patch aims to provide support for detecting load patterns which are collectively invariant but right now `isHoistableLoad()` is checking each load instruction individually which cannot detect the load pattern as a whole.

Patch by: Sahil Girish Yerawar

Reviewers: bollu, philip.pfaffe, Meinersbur

Reviewed By: philip.pfaffe, Meinersbur

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

llvm-svn: 335949

6 years agoMake email options of find_interesting_reviews more flexible.
Kristof Beyls [Fri, 29 Jun 2018 07:16:27 +0000 (07:16 +0000)]
Make email options of find_interesting_reviews more flexible.

This enables a few requested improvements on the original review of this
script at https://reviews.llvm.org/D46192.

This introduces 2 new command line options:

* --email-report: This option enables specifying who to email the generated
  report to. This also enables not sending any email and only printing out
  the report on stdout by not specifying this option on the command line.
* --sender: this allows specifying the email address that will be used in
  the "From" email header.

I believe that with these options the script starts having the basic
features needed to run it well on a regular basis for a group of
developers.

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

llvm-svn: 335948

6 years ago[MinGW] Implement the GNU ld options -S/--strip-debug
Martin Storsjo [Fri, 29 Jun 2018 06:08:31 +0000 (06:08 +0000)]
[MinGW] Implement the GNU ld options -S/--strip-debug

In this mode, we retain the symbol table, but skip the actual debug
information.

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

llvm-svn: 335947

6 years ago[COFF] Add an LLD specific option -debug:symbtab
Martin Storsjo [Fri, 29 Jun 2018 06:08:25 +0000 (06:08 +0000)]
[COFF] Add an LLD specific option -debug:symbtab

With this set, we retain the symbol table, but skip the actual debug
information.

This is meant to be used by the MinGW frontend.

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

llvm-svn: 335946

6 years ago[X86] Remove masking from the avx512 packed sqrt builtins. Use select builtins instead.
Craig Topper [Fri, 29 Jun 2018 05:43:33 +0000 (05:43 +0000)]
[X86] Remove masking from the avx512 packed sqrt builtins. Use select builtins instead.

llvm-svn: 335945

6 years ago[X86] Remove masking from the avx512 packed sqrt intrinsics. Use select in IR instead.
Craig Topper [Fri, 29 Jun 2018 05:43:26 +0000 (05:43 +0000)]
[X86] Remove masking from the avx512 packed sqrt intrinsics. Use select in IR instead.

While there improve the coverage of the intrinsic testing and add fast-isel tests.

llvm-svn: 335944

6 years ago[cfi] Reset i-cache after copying code in test.
Evgeniy Stepanov [Fri, 29 Jun 2018 00:38:26 +0000 (00:38 +0000)]
[cfi] Reset i-cache after copying code in test.

Fixes intermittent crashes on Android.
Also add PROT_READ to the code mapping for no real reason.

llvm-svn: 335943

6 years agoAMDGPU: Separate R600 and GCN TableGen files
Tom Stellard [Thu, 28 Jun 2018 23:47:12 +0000 (23:47 +0000)]
AMDGPU: Separate R600 and GCN TableGen files

Summary:
We now have two sets of generated TableGen files, one for R600 and one
for GCN, so each sub-target now has its own tables of instructions,
registers, ISel patterns, etc.  This should help reduce compile time
since each sub-target now only has to consider information that
is specific to itself.  This will also help prevent the R600
sub-target from slowing down new features for GCN, like disassembler
support, GlobalISel, etc.

Reviewers: arsenm, nhaehnle, jvesely

Reviewed By: arsenm

Subscribers: MatzeB, kzhuravl, wdng, mgorny, yaxunl, dstuttard, tpr, t-tye, javed.absar, llvm-commits

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

llvm-svn: 335942

6 years ago[asan] Change 3 tests from XFAIL to UNSUPPORTED.
Evgeniy Stepanov [Thu, 28 Jun 2018 23:27:55 +0000 (23:27 +0000)]
[asan] Change 3 tests from XFAIL to UNSUPPORTED.

The failure in https://github.com/google/sanitizers/issues/981 is flaky.

llvm-svn: 335941

6 years ago[frontend] Don't include the C++ stdlib for -x assembler-with-cpp
Alex Lorenz [Thu, 28 Jun 2018 23:23:45 +0000 (23:23 +0000)]
[frontend] Don't include the C++ stdlib for -x assembler-with-cpp

The new C++ stdlib warning added in r335081 gets
triggered when compiling an assembly file with -x assembler-with-cpp.
This commit ensures that the C++ stdlib is not included when compiling assembly.
In general, it's not really useful to include the C++ stdlib search path when
compiling assembly source.

rdar://41359632

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

llvm-svn: 335940

6 years agoRequire x86 for this test.
Sterling Augustine [Thu, 28 Jun 2018 23:22:14 +0000 (23:22 +0000)]
Require x86 for this test.

llvm-svn: 335939

6 years agoDebugInfo: Add -gno-gnu-pubnames to allow disabling gnu-pubnames later in the command...
David Blaikie [Thu, 28 Jun 2018 22:58:04 +0000 (22:58 +0000)]
DebugInfo: Add -gno-gnu-pubnames to allow disabling gnu-pubnames later in the command line

llvm-svn: 335938

6 years ago[asan] Disable 3 tests on Android O+.
Evgeniy Stepanov [Thu, 28 Jun 2018 22:54:55 +0000 (22:54 +0000)]
[asan] Disable 3 tests on Android O+.

https://github.com/google/sanitizers/issues/981

llvm-svn: 335937

6 years ago[asan] Fix one more test on Android.
Evgeniy Stepanov [Thu, 28 Jun 2018 22:54:42 +0000 (22:54 +0000)]
[asan] Fix one more test on Android.

This change makes it pass both on libstdc++ and libc++-based toolchains.

The error was:
error: function-like macro '__GLIBC_PREREQ' is not defined
                               ^

llvm-svn: 335936

6 years ago[asan] un-XFAIL one test
Evgeniy Stepanov [Thu, 28 Jun 2018 22:54:30 +0000 (22:54 +0000)]
[asan] un-XFAIL one test

NDK r16 provides glob.h, which makes this test pass.
Supporting different test outcomes depending on the version of NDK
add unnecessary complexity to the test harness. IMHO, it's OK to require
the latest stable release.

llvm-svn: 335935

6 years agoFix path completion test case added in rL335905 on Windows
Raphael Isemann [Thu, 28 Jun 2018 22:40:10 +0000 (22:40 +0000)]
Fix path completion test case added in rL335905 on Windows

Summary:
The test fails because we don't rewrite the slash behind `foo` to the OS specific
separator (as the completion API doesn't support this kind of rewriting). However,
we assume that this part of the string is rewritten in the test case, which broke
on Windows.

Reviewers: stella.stamenova

Reviewed By: stella.stamenova

Subscribers: lldb-commits

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

llvm-svn: 335934

6 years ago[fuzzer] Don't run tests on Android.
Evgeniy Stepanov [Thu, 28 Jun 2018 22:16:59 +0000 (22:16 +0000)]
[fuzzer] Don't run tests on Android.

Need better build system support.

llvm-svn: 335933

6 years ago[analyzer] fix test case expected warning
Mikhail R. Gadelha [Thu, 28 Jun 2018 22:08:44 +0000 (22:08 +0000)]
[analyzer] fix test case expected warning

After r335814, the constraint manager is no longer generating a false bug report
about the division by zero in the test case.

This patch removes the expected false bug report.

llvm-svn: 335932

6 years ago[ARM] Assert that ARMDAGToDAGISel creates valid UBFX/SBFX nodes.
Eli Friedman [Thu, 28 Jun 2018 21:49:41 +0000 (21:49 +0000)]
[ARM] Assert that ARMDAGToDAGISel creates valid UBFX/SBFX nodes.

We don't ever check these again (unless you're using
-fno-integrated-as), so make sure the extracted bits are well-defined.

I don't think it's possible to trigger any of the assertions on trunk,
but it's difficult to prove.  (The first one depends on DAGCombine to
minimize the number of set bits in AND masks; I think the others are
mathematically impossible to hit.)

llvm-svn: 335931

6 years ago[MachineOutliner] Never add the outliner in -O0
Jessica Paquette [Thu, 28 Jun 2018 21:49:24 +0000 (21:49 +0000)]
[MachineOutliner] Never add the outliner in -O0

This is a recommit of r335879.

We shouldn't add the outliner when compiling at -O0 even if
-enable-machine-outliner is passed in. This makes sure that we
don't add it in this case.

This also removes -O0 from the outliner DWARF test.

llvm-svn: 335930

6 years ago[analyzer] Move test to the correct directory
Mikhail R. Gadelha [Thu, 28 Jun 2018 21:39:41 +0000 (21:39 +0000)]
[analyzer] Move test to the correct directory

It was accidentaly pushed in r335926

llvm-svn: 335929

6 years ago[TSan] More detailed error message on failed sahdow memory madvise
Alex Shlyapnikov [Thu, 28 Jun 2018 21:38:34 +0000 (21:38 +0000)]
[TSan] More detailed error message on failed sahdow memory madvise

Summary:
Report errno value on failed shadow memory madvise attempt and add a
hint message with the possible workaround.

Reviewers: eugenis

Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits

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

llvm-svn: 335928

6 years ago[Parse] Make -Wgcc-compat complain about for loop inits in C89
George Burgess IV [Thu, 28 Jun 2018 21:36:00 +0000 (21:36 +0000)]
[Parse] Make -Wgcc-compat complain about for loop inits in C89

While clang allows declarations in for loop init statements in c89 and
gnu89, gcc does not. So, we should probably warn if users care about gcc
compatibility.

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

llvm-svn: 335927

6 years ago[analyzer] Fix wrong comparison generation of the ranges generated by the refutation...
Mikhail R. Gadelha [Thu, 28 Jun 2018 21:26:52 +0000 (21:26 +0000)]
[analyzer] Fix wrong comparison generation of the ranges generated by the refutation manager

The refutation manager is removing a true bug from the test in this patch.

The problem is that the following constraint:
```
(conj_$1{struct o *}) - (reg_$3<int * r>): [-9223372036854775808, 0]
```
is encoded as:
```
(and (bvuge (bvsub $1 $3) #x8000000000000000)
     (bvule (bvsub $1 $3) #x0000000000000000))
```
The issue is that unsigned comparisons (bvuge and bvule) are being generated instead of signed comparisons (bvsge and bvsle).

When generating the expressions:
```
(conj_$1{p *}) - (reg_$3<int * r>) >= -9223372036854775808
```
and
```
(conj_$1{p *}) - (reg_$3<int * r>) <= 0
```
both -9223372036854775808 and 0 are casted to pointer type and `LTy->isSignedIntegerOrEnumerationType()` in `Z3ConstraintManager::getZ3BinExpr` only checks if the type is signed, not if it's a pointer.

Reviewers: NoQ, george.karpenkov, ddcc

Subscribers: rnkovacs, NoQ, george.karpenkov, ddcc, xazax.hun, szepet, a.sidorin

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

llvm-svn: 335926

6 years agoPR37979: integral promotions in C++ treat enum bit-fields like enums,
Richard Smith [Thu, 28 Jun 2018 21:17:55 +0000 (21:17 +0000)]
PR37979: integral promotions in C++ treat enum bit-fields like enums,
not like bit-fields.

We used to get this right "by accident", because conversions for the
selected built-in overloaded operator would convert the enum bit-field
to its corresponding underlying type early. But after DR1687 that no
longer happens.

Technically this change should also apply to C, where bit-fields only
have special promotion rules if the bit-field's declared type is
_Bool, int, signed int, or unsigned int, but for GCC compatibility we
only look at the bit-width and not the underlying type when performing
bit-field integral promotions in C.

llvm-svn: 335925

6 years ago[InstCombine] adjust shuffle tests; NFC
Sanjay Patel [Thu, 28 Jun 2018 21:14:02 +0000 (21:14 +0000)]
[InstCombine] adjust shuffle tests; NFC

Use xor for the extra uses test because div/rem have other problems.

llvm-svn: 335924

6 years ago[UBsan] minimal unit tests removing OpenBSD spacial case
David Carlier [Thu, 28 Jun 2018 21:10:52 +0000 (21:10 +0000)]
[UBsan] minimal unit tests removing OpenBSD spacial case

The OpenBSD driver now handles sanitisers with ld.lld automatically.

Reviewers: vitalybuka

Reviewed By: vitalybuka

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

llvm-svn: 335923

6 years ago[llvm-readobj] Add experimental support for SHT_RELR sections
Jake Ehrlich [Thu, 28 Jun 2018 21:07:34 +0000 (21:07 +0000)]
[llvm-readobj] Add experimental support for SHT_RELR sections

This change adds experimental support for SHT_RELR sections, proposed
here: https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg

Definitions for the new ELF section type and dynamic array tags, as well
as the encoding used in the new section are all under discussion and are
subject to change. Use with caution!

Author: rahulchaudhry

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

llvm-svn: 335922

6 years ago[SupportTests] Silence -Wsign-compare warnings
Benjamin Kramer [Thu, 28 Jun 2018 21:03:24 +0000 (21:03 +0000)]
[SupportTests] Silence -Wsign-compare warnings

llvm-svn: 335921

6 years ago[InstCombine] fix opcode check in shuffle fold
Sanjay Patel [Thu, 28 Jun 2018 20:52:43 +0000 (20:52 +0000)]
[InstCombine] fix opcode check in shuffle fold

There's no way to expose this difference currently,
but we should use the updated variable because the
original opcodes can go stale if we transform into
something new.

llvm-svn: 335920

6 years ago[CMake] Don't build Linux targets on Darwin in Fuchsia toolchain
Petr Hosek [Thu, 28 Jun 2018 20:33:18 +0000 (20:33 +0000)]
[CMake] Don't build Linux targets on Darwin in Fuchsia toolchain

This is currently breaking because Linux target sysroots rely on
case sensitive filesystem which is not by default enabled on macOS.

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

llvm-svn: 335919

6 years ago[COFF] Fix constant sharing regression for MinGW
Martin Storsjo [Thu, 28 Jun 2018 20:28:29 +0000 (20:28 +0000)]
[COFF] Fix constant sharing regression for MinGW

This fixes a regression since SVN r334523, where the object files
built targeting MinGW were rejected by GNU binutils tools. Prior to
that commit, we only put constants in comdat for MSVC configurations.

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

llvm-svn: 335918

6 years ago[CMake] Build static runtimes for host in Fuchsia first stage
Petr Hosek [Thu, 28 Jun 2018 20:19:11 +0000 (20:19 +0000)]
[CMake] Build static runtimes for host in Fuchsia first stage

First stage build is only a minimal build where we don't need
a complete multiarch support, but we need enough to build the
second stage.

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

llvm-svn: 335917

6 years agoConfigure ELAST for MinGW
Pirama Arumuga Nainar [Thu, 28 Jun 2018 20:16:45 +0000 (20:16 +0000)]
Configure ELAST for MinGW

Summary:
Use _LIBCPP_MSVCRT_LIKE while configuring ELAST, so MinGW gets the same
configuration as MSVC.

Reviewers: compnerd, srhines, danalbert, mstorsjo

Subscribers: christof, ldionne, cfe-commits

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

llvm-svn: 335916

6 years agoFix padding with custom character in formatv.
Zachary Turner [Thu, 28 Jun 2018 20:09:37 +0000 (20:09 +0000)]
Fix padding with custom character in formatv.

The format string for formatv allows to specify a custom padding
character instead of the default space.  This custom character was
parsed correctly, but not passed on to the formatter.

Patch by Marcel Köppe
Differential Revision: https://reviews.llvm.org/D48140

llvm-svn: 335915

6 years ago[ThinLTO] Port InlinerFunctionImportStats handling to new PM
Teresa Johnson [Thu, 28 Jun 2018 20:07:47 +0000 (20:07 +0000)]
[ThinLTO] Port InlinerFunctionImportStats handling to new PM

Summary:
The InlinerFunctionImportStats will collect and dump stats regarding how
many function inlined into the module were imported by ThinLTO.

Reviewers: wmi, dexonsmith

Subscribers: mehdi_amini, inglorion, llvm-commits, eraman

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

llvm-svn: 335914

6 years ago[NVPTX] Delete dead code
Benjamin Kramer [Thu, 28 Jun 2018 20:05:35 +0000 (20:05 +0000)]
[NVPTX] Delete dead code

No functionality change.

llvm-svn: 335913

6 years agoAdd a way to load an image using a library name and list of paths.
Jim Ingham [Thu, 28 Jun 2018 20:02:11 +0000 (20:02 +0000)]
Add a way to load an image using a library name and list of paths.

This provides an efficient (at least on Posix platforms) way to offload to the
target process the search & loading of a library when all we have are the
library name and a set of potential candidate locations.

<rdar://problem/40905971>

llvm-svn: 335912

6 years ago[OPENMP] Fix incomplete type check for array reductions
Joel E. Denny [Thu, 28 Jun 2018 19:54:49 +0000 (19:54 +0000)]
[OPENMP] Fix incomplete type check for array reductions

A reduction for an incomplete array type used to produce an assert
fail during codegen.  Now it produces a diagnostic.

Reviewed By: ABataev

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

llvm-svn: 335911

6 years agoRevert r335907: [OPENMP] Fix incomplete type check for array reductions
Joel E. Denny [Thu, 28 Jun 2018 19:54:27 +0000 (19:54 +0000)]
Revert r335907: [OPENMP] Fix incomplete type check for array reductions

Sorry, forgot to add commit log attributes again.

llvm-svn: 335910

6 years ago[ARM] Add missing Thumb2 assembler diagnostics.
Eli Friedman [Thu, 28 Jun 2018 19:53:12 +0000 (19:53 +0000)]
[ARM] Add missing Thumb2 assembler diagnostics.

Mostly just adding checks for Thumb2 instructions which correspond to
ARM instructions which already had diagnostics. While I'm here, also fix
ARM-mode strd to check the input registers correctly.

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

llvm-svn: 335909

6 years agoSome targets don't have lld built, so just use a binary copy
Sterling Augustine [Thu, 28 Jun 2018 19:47:23 +0000 (19:47 +0000)]
Some targets don't have lld built, so just use a binary copy
of the input file.

llvm-svn: 335908

6 years ago[OPENMP] Fix incomplete type check for array reductions
Joel E. Denny [Thu, 28 Jun 2018 19:46:10 +0000 (19:46 +0000)]
[OPENMP] Fix incomplete type check for array reductions

A reduction for an incomplete array type used to produce an assert
fail during codegen.  Now it produces a diagnostic.

llvm-svn: 335907

6 years ago[lldbsuite] Fix TestBreakpointHitCount on Windows
Stella Stamenova [Thu, 28 Jun 2018 19:42:30 +0000 (19:42 +0000)]
[lldbsuite] Fix TestBreakpointHitCount on Windows

Summary: On Windows, the newer DIA SDKs end up producing function names that contain the return type as well. This means that the function name returned in the test will contain the return type (int) in addition to the name of the function and the type of the input (a(int)). To account for the possibility of both, the test should pass if the function name matches either pattern.

Reviewers: zturner, asmith

Subscribers: llvm-commits

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

llvm-svn: 335906

6 years ago Added test case for: r334978 - Fixed file completion for paths that start with '~'
Raphael Isemann [Thu, 28 Jun 2018 19:34:49 +0000 (19:34 +0000)]
 Added test case for: r334978 - Fixed file completion for paths that start with '~'

Reviewers: labath

Reviewed By: labath

Subscribers: lldb-commits

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

llvm-svn: 335905

6 years ago[SROA] Preserve DebugLoc when rewriting alloca partitions
Anastasis Grammenos [Thu, 28 Jun 2018 18:58:30 +0000 (18:58 +0000)]
[SROA] Preserve DebugLoc when rewriting alloca partitions

When rewriting an alloca partition copy the DL from the
old alloca over the the new one.

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

llvm-svn: 335904

6 years agoHandle absolute symbols as branch targets in disassembly.
Sterling Augustine [Thu, 28 Jun 2018 18:57:13 +0000 (18:57 +0000)]
Handle absolute symbols as branch targets in disassembly.

https://reviews.llvm.org/D48554

llvm-svn: 335903

6 years agoAdd a flag to FileOutputBuffer that allows modification.
Zachary Turner [Thu, 28 Jun 2018 18:49:09 +0000 (18:49 +0000)]
Add a flag to FileOutputBuffer that allows modification.

FileOutputBuffer creates a temp file and on commit atomically
renames the temp file to the destination file.  Sometimes we
want to modify an existing file in place, but still have the
atomicity guarantee.  To do this we can initialize the contents
of the temp file from the destination file (if it exists), that
way the resulting FileOutputBuffer can have only selective
bytes modified.  Committing will then atomically replace the
destination file as desired.

llvm-svn: 335902

6 years agoRemove unnecessary semicolon. NFCI.
Simon Pilgrim [Thu, 28 Jun 2018 18:37:16 +0000 (18:37 +0000)]
Remove unnecessary semicolon. NFCI.

Fixes -Wpedantic warning.

llvm-svn: 335901

6 years ago[CMake] Respect CMAKE_STRIP and CMAKE_DSYMUTIL on apple platforms
Justin Bogner [Thu, 28 Jun 2018 18:36:52 +0000 (18:36 +0000)]
[CMake] Respect CMAKE_STRIP and CMAKE_DSYMUTIL on apple platforms

This allows overriding the strip and dsymutil tools, and updates
iOS.cmake to do so. I've also added libtool to iOS.cmake, but it was
already respecting CMAKE_LIBTOOL if set.

llvm-svn: 335900