platform/upstream/llvm.git
5 years agoRevert r345169 [along with its llvm counterpart r345170] as it makes Halide builds...
Alina Sbirlea [Sat, 27 Oct 2018 04:51:12 +0000 (04:51 +0000)]
Revert r345169 [along with its llvm counterpart r345170] as it makes Halide builds timeout.

llvm-svn: 345447

5 years agoRevert r345170 [along with its llvm counterpart r345169] as it makes Halide builds...
Alina Sbirlea [Sat, 27 Oct 2018 04:51:09 +0000 (04:51 +0000)]
Revert r345170 [along with its llvm counterpart r345169] as it makes Halide builds timeout.

llvm-svn: 345446

5 years ago[XRay] Support generational buffers in FDR controller
Dean Michael Berris [Sat, 27 Oct 2018 03:00:21 +0000 (03:00 +0000)]
[XRay] Support generational buffers in FDR controller

Summary:
This is an intermediary step in the full support for generational buffer
management in the FDR runtime. This change makes the FDR controller
aware of the new generation number in the buffers handed out by the
BufferQueue type.

In the process of making this change, we've realised that the cleanest
way of ensuring that the backing store per generation is live while all
the threads that need access to it will need reference counting to tie
the backing store to the lifetime of all threads that have a handle on
buffers associated with the memory.

We also learn that we're missing the edge-case in the function exit
handler's implementation where the first record being written into the
buffer is a function exit, which is caught/fixed by the test for
generational buffer management.

We still haven't wired the controller into the FDR mode runtime, which
will need the reference counting on the backing store implemented to
ensure that we're being conservatively thread-safe with this approach.

Depends on D52974.

Reviewers: mboerger, eizan

Subscribers: llvm-commits

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

llvm-svn: 345445

5 years agotest: add missing -triple
Saleem Abdulrasool [Sat, 27 Oct 2018 02:27:38 +0000 (02:27 +0000)]
test: add missing -triple

Ensure that the test builds for x86_64 as it is an assembly test.  This
should repair the buildbots.

llvm-svn: 345444

5 years agoRevert "Pass the nopie flag to the linker when linking with -pg." until
Brad Smith [Sat, 27 Oct 2018 01:14:22 +0000 (01:14 +0000)]
Revert "Pass the nopie flag to the linker when linking with -pg." until
one of the tests can be fixed on !OpenBSD hosts.

llvm-svn: 345443

5 years ago[Hexagon] Add missing assignment to Itinerary in Call_nr
Brendon Cahoon [Sat, 27 Oct 2018 00:50:29 +0000 (00:50 +0000)]
[Hexagon] Add missing assignment to Itinerary in Call_nr

The class definition for Call_nr has the itinerary as a
parameter, but the value is never assigned to the Itinerary
field for the instruction. This means the compiler is unable
to schedule and packetize the instruction correctly because
these instrution will not have any resource descritions.
I don't have a specific test case, but the ps_call_nr.ll
test failed with a proposed patch.

llvm-svn: 345442

5 years agoDebugInfo: reduce DIE range verification on object files
Saleem Abdulrasool [Sat, 27 Oct 2018 00:49:33 +0000 (00:49 +0000)]
DebugInfo: reduce DIE range verification on object files

Relocatable content may have overlapping ranges until the sections are
finalized.  This reduces the amount of verification that is done on an object
file so that invalid errors are not raised.

llvm-svn: 345441

5 years agoUpdate the other test.
Brad Smith [Sat, 27 Oct 2018 00:46:12 +0000 (00:46 +0000)]
Update the other test.

llvm-svn: 345440

5 years agoPass the nopie flag to the linker when linking with -pg.
Brad Smith [Sat, 27 Oct 2018 00:23:28 +0000 (00:23 +0000)]
Pass the nopie flag to the linker when linking with -pg.

llvm-svn: 345439

5 years agoFurther split cpus test
Jonas Devlieghere [Fri, 26 Oct 2018 23:50:23 +0000 (23:50 +0000)]
Further split cpus test

On GreenDragon, CodeGen/X86/cpus-no-x86_64.ll was still timing out even
after breaking up the original test. I further split off the intel and
AMD cpus which hopefully resolves this.

http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan/

llvm-svn: 345438

5 years ago[x86] adjust tests to preserve behavior; NFC
Sanjay Patel [Fri, 26 Oct 2018 23:06:28 +0000 (23:06 +0000)]
[x86] adjust tests to preserve behavior; NFC

I'm planning a binop optimization that would subvert the
domain forcing ops in these tests, so turning them into
zexts.

llvm-svn: 345437

5 years ago[llvm-readobj] Fix bugs with unrecognized types in switch statements
Ryan Prichard [Fri, 26 Oct 2018 23:01:54 +0000 (23:01 +0000)]
[llvm-readobj] Fix bugs with unrecognized types in switch statements

Summary:
Add missing breaks. Several functions used nested switch statements,
where the outer switch branches based on the architecture, and the inner
switch handles architecture-specific types. If the type isn't
architecture-specific, break out to the generic types rather than fall
through.

getElfPtType: For GNU-style output, llvm-readobj prints
"<unknown>: 0xnnnnnnnn" for an unrecognized segment type, unless the
architecture is EM_ARM, EM_MIPS, or EM_MIPS_RS3_LE, in which case it
prints "". This behavior appears accidental, so instead, always print
the "<unknown>: 0xnnnnnnnn" string.

Reviewers: pcc, grimar

Reviewed By: grimar

Subscribers: sdardis, javed.absar, arichardson, kristof.beyls, atanasyan, llvm-commits

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

llvm-svn: 345436

5 years agoFix and rename broken test for `settings write`.
Jonas Devlieghere [Fri, 26 Oct 2018 23:01:25 +0000 (23:01 +0000)]
Fix and rename broken test for `settings write`.

I committed this test without updating the old `settings export` to
settings write. Since the functionality was renamed I also renamed the
test case.

llvm-svn: 345435

5 years agoFix PR39458 _LIBCPP_DEBUG breaks heterogeneous compare.
Eric Fiselier [Fri, 26 Oct 2018 22:54:46 +0000 (22:54 +0000)]
Fix PR39458 _LIBCPP_DEBUG breaks heterogeneous compare.

The types/comparators passed to std::upper_bound and std::lower_bound
are not required to provided to provide an operator</comp(...) which
accepts the arguments in reverse order. Nor are the ranges required
to have a strict weak ordering.

However, in debug mode we attempted to check the result of a comparison
with the arguments reversed, which may not compiler.

This patch removes the use of the debug comparator for upper_bound
and lower_bound.

equal_range et al still use debug comparators when they call
__upper_bound and __lower_bound.

See llvm.org/PR39458

llvm-svn: 345434

5 years agoRevert "[PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with...
Leonard Chan [Fri, 26 Oct 2018 22:51:51 +0000 (22:51 +0000)]
Revert "[PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address"

This reverts commit 8d6af840396f2da2e4ed6aab669214ae25443204 and commit
b78d19c287b6e4a9abc9fb0545de9a3106d38d3d which causes slower build times
by initializing the AddressSanitizer on every function run.

The corresponding revisions are https://reviews.llvm.org/D52814 and
https://reviews.llvm.org/D52739.

llvm-svn: 345433

5 years ago[VFS] Add property 'fallthrough' that controls fallback to real file system.
Volodymyr Sapsai [Fri, 26 Oct 2018 22:16:24 +0000 (22:16 +0000)]
[VFS] Add property 'fallthrough' that controls fallback to real file system.

Default property value 'true' preserves current behavior. Value 'false' can be
used to create VFS "root", file system that gives better control over which
files compiler can use during compilation as there are no unpredictable
accesses to real file system.

Non-fallthrough use case changes how we treat multiple VFS overlay
files. Instead of all of them being at the same level just above a real
file system, now they are nested and subsequent overlays can refer to
files in previous overlays.

Change is done both in LLVM and Clang, corresponding LLVM commit is r345431.

rdar://problem/39465552

Reviewers: bruno, benlangmuir

Reviewed By: bruno

Subscribers: dexonsmith, cfe-commits, hiraditya

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

llvm-svn: 345432

5 years ago[VFS] Add property 'fallthrough' that controls fallback to real file system.
Volodymyr Sapsai [Fri, 26 Oct 2018 22:14:33 +0000 (22:14 +0000)]
[VFS] Add property 'fallthrough' that controls fallback to real file system.

Default property value 'true' preserves current behavior. Value 'false' can be
used to create VFS "root", file system that gives better control over which
files compiler can use during compilation as there are no unpredictable
accesses to real file system.

Non-fallthrough use case changes how we treat multiple VFS overlay
files. Instead of all of them being at the same level just above a real
file system, now they are nested and subsequent overlays can refer to
files in previous overlays.

rdar://problem/39465552

Reviewers: bruno, benlangmuir

Reviewed By: bruno

Subscribers: dexonsmith, cfe-commits, hiraditya

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

llvm-svn: 345431

5 years ago[DAGCombiner] rearrange code in narrowExtractedVectorBinOp(); NFC
Sanjay Patel [Fri, 26 Oct 2018 21:32:04 +0000 (21:32 +0000)]
[DAGCombiner] rearrange code in narrowExtractedVectorBinOp(); NFC

We can extend this code to handle many more cases
if an extract is cheap, so prepping for that change.

llvm-svn: 345430

5 years ago[ValueTracking] peek through shuffles in ComputeNumSignBits (PR37549)
Sanjay Patel [Fri, 26 Oct 2018 21:05:14 +0000 (21:05 +0000)]
[ValueTracking] peek through shuffles in ComputeNumSignBits (PR37549)

The motivating case is from PR37549:
https://bugs.llvm.org/show_bug.cgi?id=37549

The analysis improvement allows us to form a vector 'select' out of
bitwise logic (the use of ComputeNumSignBits was added at rL345149).

The smaller test shows another InstCombine improvement - we use
ComputeNumSignBits to add 'nsw' to shift-left. But the negative
test shows an example where we must not add 'nsw' - when the shuffle
mask contains undef elements.

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

llvm-svn: 345429

5 years ago[LegalizeTypes] Stop DAGTypeLegalizer::getSETCCWidenedResultTy from creating illegal...
Craig Topper [Fri, 26 Oct 2018 20:59:55 +0000 (20:59 +0000)]
[LegalizeTypes] Stop DAGTypeLegalizer::getSETCCWidenedResultTy from creating illegal setccs. Add checks for valid setccs

The DAGTypeLegalizer::getSETCCWidenedResultTy was widening the MaskVT, but the code in convertMask called after getSETCCWidenedResultTy had no idea this widening had occurred. So none of the operands were widened when convertMask created new setccs with the widened VT.

This patch removes the widening and adds some asserts to getNode to validate the types of setccs to prevent issues like this in the future.

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

llvm-svn: 345428

5 years agoAdd docs+a script for building clang/LLVM with PGO
George Burgess IV [Fri, 26 Oct 2018 20:56:03 +0000 (20:56 +0000)]
Add docs+a script for building clang/LLVM with PGO

Depending on who you ask, PGO grants a 15%-25% improvement in build
times when using clang. Sadly, hooking everything up properly to
generate a profile and apply it to clang isn't always straightforward.
This script (and the accompanying docs) aim to make this process easier;
ideally, a single invocation of the given script.

In terms of testing, I've got a cronjob on my Debian box that's meant to
run this a few times per week, and I tried manually running it on a puny
Gentoo box I have (four whole Atom cores!). Nothing obviously broke.
¯\_(ツ)_/¯

I don't know if we have a Python style guide, so I just shoved this
through yapf with all the defaults on.

Finally, though the focus is clang at the moment, the hope is that this
is easily applicable to other LLVM-y tools with minimal effort (e.g.
lld, opt, ...). Hence, this lives in llvm/utils and tries to be somewhat
ambiguous about naming.

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

llvm-svn: 345427

5 years ago[Spectre] Fix MIR verifier errors in retpoline thunks
Reid Kleckner [Fri, 26 Oct 2018 20:26:36 +0000 (20:26 +0000)]
[Spectre] Fix MIR verifier errors in retpoline thunks

Summary:
The main challenge here is that X86InstrInfo::AnalyzeBranch doesn't
understand the way we're using a CALL instruction as a branch, so we
can't list the CallTarget MBB as a successor of the entry block. If we
don't list it as a successor, then the AsmPrinter doesn't print a label
for the MBB.

Fix the issue by inserting our own label at the beginning of the call
target block. We can rely on the AsmPrinter to always emit it, even
though the block appears to be unreachable, but address-taken.

Fixes PR38391.

Reviewers: thegameg, chandlerc, echristo

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 345426

5 years agoWork around gcc.gnu.org/PR87766
Eric Fiselier [Fri, 26 Oct 2018 20:20:12 +0000 (20:20 +0000)]
Work around gcc.gnu.org/PR87766

llvm-svn: 345425

5 years ago[NFC] Update comment in libc++ ABI changelog
Louis Dionne [Fri, 26 Oct 2018 20:08:43 +0000 (20:08 +0000)]
[NFC] Update comment in libc++ ABI changelog

llvm-svn: 345424

5 years agoFix test expectation to match reality.
Richard Smith [Fri, 26 Oct 2018 19:42:43 +0000 (19:42 +0000)]
Fix test expectation to match reality.

llvm-svn: 345423

5 years agoRemove an early-return from Driver::ParseArgs that
Jason Molenda [Fri, 26 Oct 2018 19:40:18 +0000 (19:40 +0000)]
Remove an early-return from Driver::ParseArgs that
was added as a part of D52604 / r343348.  If the
lldb driver is run without any arguments, .lldbinit
file reading was not enabled.

<rdar://problem/45570242>

llvm-svn: 345422

5 years agoFix typo.
Richard Smith [Fri, 26 Oct 2018 19:35:39 +0000 (19:35 +0000)]
Fix typo.

llvm-svn: 345421

5 years ago[ARM] Make InstrEmitter mark CPSR defs dead for Thumb1.
Eli Friedman [Fri, 26 Oct 2018 19:32:24 +0000 (19:32 +0000)]
[ARM] Make InstrEmitter mark CPSR defs dead for Thumb1.

The "dead" markings allow existing target-independent optimizations,
like MachineSink, to trigger more frequently. The CPSR defs would have
eventually been marked dead by LiveVariables, so this only affects
optimizations before regalloc.

The ARMBaseInstrInfo.cpp change is fixing a bug which is only visible
with this change: the transform adds a use to an otherwise dead def
of CPSR. This is covered by existing regression tests.

thumb2-tbh.ll breaks for Thumb1 due to MachineLICM changing the
generated code; I'll fix it in D53452.

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

llvm-svn: 345420

5 years agoPR26547: alignof should return ABI alignment, not preferred alignment
Richard Smith [Fri, 26 Oct 2018 19:26:45 +0000 (19:26 +0000)]
PR26547: alignof should return ABI alignment, not preferred alignment

Summary:
- Add `UETT_PreferredAlignOf` to account for the difference between `__alignof` and `alignof`
- `AlignOfType` now returns ABI alignment instead of preferred alignment iff clang-abi-compat > 7, and one uses _Alignof or alignof

Patch by Nicole Mazzuca!

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

llvm-svn: 345419

5 years ago[clang-doc] Switch to default to all-TUs executor
Julie Hockett [Fri, 26 Oct 2018 19:11:34 +0000 (19:11 +0000)]
[clang-doc] Switch to default to all-TUs executor

Since we generally want to document a whole project, not just one file.

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

llvm-svn: 345418

5 years ago[NFC][OpenMP] Add new test for parallel for code generation.
Gheorghe-Teodor Bercea [Fri, 26 Oct 2018 18:59:52 +0000 (18:59 +0000)]
[NFC][OpenMP] Add new test for parallel for code generation.

Summary:
This is a simple test of the parallel for code generation. It will be used to showcase the change introduced by patch D53443.

Reviewers: ABataev, caomhin

Reviewed By: ABataev

Subscribers: guansong, cfe-commits

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

llvm-svn: 345417

5 years ago[XRay] Use std::errc::invalid_argument instead of std::errc::bad_message
Yi Kong [Fri, 26 Oct 2018 18:25:27 +0000 (18:25 +0000)]
[XRay] Use std::errc::invalid_argument instead of std::errc::bad_message

This change should appease the mingw32 builds.

Similar to r293725.

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

llvm-svn: 345416

5 years ago[PowerPC] Improve BUILD_VECTOR of 4 i32s
Lei Huang [Fri, 26 Oct 2018 18:09:36 +0000 (18:09 +0000)]
[PowerPC] Improve BUILD_VECTOR of 4 i32s

Currently, for this node:
  vector int test(int a, int b, int c, int d) {
    return (vector int) { a, b, c, d };
  }

we get this on Power9:
  mtvsrdd 34, 5, 3
  mtvsrdd 35, 6, 4
  vmrgow 2, 3, 2

and this on Power8:
  mtvsrwz 0, 3
  mtvsrwz 1, 5
  mtvsrwz 2, 4
  mtvsrwz 3, 6
  xxmrghd 34, 1, 0
  xxmrghd 35, 3, 2
  vmrgow 2, 3, 2

This can be improved to this on LE Power9:
  rldimi 3, 4, 32, 0
  rldimi 5, 6, 32, 0
  mtvsrdd 34, 5, 3

and this on LE Power8
  rldimi 3, 4, 32, 0
  rldimi 5, 6, 32, 0
  mtvsrd 34, 3
  mtvsrd 35, 5
  xxpermdi 34, 35, 34, 0

This patch updates the TD pattern to generate the optimized sequence for both
Power8 and Power9 on LE and BE.

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

llvm-svn: 345414

5 years agoPointer types were treated as zero-size by MergeICmps
Christy Lee [Fri, 26 Oct 2018 18:02:06 +0000 (18:02 +0000)]
Pointer types were treated as zero-size by MergeICmps

Summary:
The visitICmp analysis function would record compares of pointer types, as size 0. This causes the resulting memcmp() call to have the wrong total size.
Found with "self-build" of clang/LLVM on Windows.

Reviewers: christylee, trentxintong, courbet

Reviewed By: courbet

Subscribers: llvm-commits

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

llvm-svn: 345413

5 years ago[ADT] Use explicit constructors for DenseMapPair to work around compiler issues.
Lang Hames [Fri, 26 Oct 2018 17:48:50 +0000 (17:48 +0000)]
[ADT] Use explicit constructors for DenseMapPair to work around compiler issues.

Inheriting constructors from std::pair caused clang-3.8 to treat some DenseMap
initializer_list constructor calls as ambiguous, which broke several bots. This
commit explicitly defines DenseMapPair's constructos to work around the issue.

https://reviews.llvm.org/D53726

llvm-svn: 345411

5 years ago[llvm-ar] Strip trailing \r and format
Fangrui Song [Fri, 26 Oct 2018 17:38:27 +0000 (17:38 +0000)]
[llvm-ar] Strip trailing \r and format

Reviewers: mstorsjo, rupprecht, gbreynoo

Reviewed By: rupprecht

Subscribers: llvm-commits

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

llvm-svn: 345410

5 years ago[X86] Stop promoting vector and/or/xor/andn to vXi64.
Craig Topper [Fri, 26 Oct 2018 17:21:26 +0000 (17:21 +0000)]
[X86] Stop promoting vector and/or/xor/andn to vXi64.

These promotions add additional bitcasts to the SelectionDAG that can pessimize computeKnownBits/computeNumSignBits. It also seems to interfere with broadcast formation.

This patch removes the promotion and adds isel patterns instead.

The increased table size is more than I would like, but hopefully we can find some canonicalizations or other tricks to start pruning out patterns going forward.

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

llvm-svn: 345408

5 years ago[X86] Add -LABEL to some FileCheck checks. NFC
Craig Topper [Fri, 26 Oct 2018 17:21:19 +0000 (17:21 +0000)]
[X86] Add -LABEL to some FileCheck checks. NFC

llvm-svn: 345407

5 years ago[sanitizer] Improve macOS version detection
Kuba Mracek [Fri, 26 Oct 2018 17:19:41 +0000 (17:19 +0000)]
[sanitizer] Improve macOS version detection

Part of <https://reviews.llvm.org/D48445>.

llvm-svn: 345406

5 years ago[llvm-ar] Add a dependency to BinaryFormat after rL345383
Fangrui Song [Fri, 26 Oct 2018 17:15:52 +0000 (17:15 +0000)]
[llvm-ar] Add a dependency to BinaryFormat after rL345383

llvm-svn: 345405

5 years ago[DWARF][NFC] cleanup (mostly leftovers from the implementation of string offsets...
Wolfgang Pieb [Fri, 26 Oct 2018 17:14:46 +0000 (17:14 +0000)]
[DWARF][NFC] cleanup (mostly leftovers from the implementation of string offsets tables)
Majority of the patch by David Blaikie.

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

llvm-svn: 345404

5 years agoFix incorrect use of aligned allocation in get_temporary_buffer.
Eric Fiselier [Fri, 26 Oct 2018 17:12:32 +0000 (17:12 +0000)]
Fix incorrect use of aligned allocation in get_temporary_buffer.

llvm-svn: 345403

5 years ago[DataFormatters] Adding formatters for libc++ std::u16string and std::u32string
Shafik Yaghmour [Fri, 26 Oct 2018 17:00:48 +0000 (17:00 +0000)]
[DataFormatters] Adding formatters for libc++ std::u16string and std::u32string

rdar://problem/41302849

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

llvm-svn: 345402

5 years agoXFAIL sized deallocation test with GCC
Eric Fiselier [Fri, 26 Oct 2018 16:37:11 +0000 (16:37 +0000)]
XFAIL sized deallocation test with GCC

llvm-svn: 345400

5 years ago[tblgen] Improve comments in TargetInstrPredicate.td. NFC
Andrea Di Biagio [Fri, 26 Oct 2018 16:22:26 +0000 (16:22 +0000)]
[tblgen] Improve comments in TargetInstrPredicate.td. NFC

llvm-svn: 345399

5 years ago[Fixed Point Arithmetic] Refactor fixed point casts
Bjorn Pettersson [Fri, 26 Oct 2018 16:12:12 +0000 (16:12 +0000)]
[Fixed Point Arithmetic] Refactor fixed point casts

Summary:
- Added names for some emitted values (such as "tobool" for
  the result of a cast to boolean).
- Replaced explicit IRBuilder request for doing sext/zext/trunc
  by using CreateIntCast instead.
- Simplify code for emitting satuation into one if-statement
  for clamping to max, and one if-statement for clamping to min.

Reviewers: leonardchan, ebevhan

Reviewed By: leonardchan

Subscribers: cfe-commits

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

llvm-svn: 345398

5 years agoRevert "UBSan blacklist workaround for bot timeouts"
Vlad Tsyrklevich [Fri, 26 Oct 2018 16:07:50 +0000 (16:07 +0000)]
Revert "UBSan blacklist workaround for bot timeouts"

This reverts commit r335525. This workaround is no longer necessary
because PR37929 has been fixed.

llvm-svn: 345397

5 years ago[MIR] Simplify and move MIR test
Francis Visoiu Mistrih [Fri, 26 Oct 2018 16:00:29 +0000 (16:00 +0000)]
[MIR] Simplify and move MIR test

Also fixes a Machine Verifier issue.

llvm-svn: 345396

5 years ago[X86][SSE] Move 2-input limit up from getFauxShuffleMask to resolveTargetShuffleInputs
Simon Pilgrim [Fri, 26 Oct 2018 15:19:02 +0000 (15:19 +0000)]
[X86][SSE] Move 2-input limit up from getFauxShuffleMask to resolveTargetShuffleInputs

Makes no difference to actual shuffle decoding yet, but merges all the existing limits in one place for when proper support is fixed.

llvm-svn: 345395

5 years ago[sanitizer] Fix mallopt test on Android.
Evgeniy Stepanov [Fri, 26 Oct 2018 15:13:20 +0000 (15:13 +0000)]
[sanitizer] Fix mallopt test on Android.

There is not a single common mallopt option between gnu/linux and
android, so simply use a random number there.

llvm-svn: 345394

5 years agoRename warnUnorderableSymbol maybeWarnUnorderableSymbol because the function doesn...
Rui Ueyama [Fri, 26 Oct 2018 15:07:12 +0000 (15:07 +0000)]
Rename warnUnorderableSymbol maybeWarnUnorderableSymbol because the function doesn't always emit a warning.

llvm-svn: 345393

5 years agoRefactor readCallGraph() and readCallGraphFromObjectFiles(). NFC.
Rui Ueyama [Fri, 26 Oct 2018 15:07:02 +0000 (15:07 +0000)]
Refactor readCallGraph() and readCallGraphFromObjectFiles(). NFC.

llvm-svn: 345392

5 years ago[x86] commute blendvb with constant condition op to allow load folding
Sanjay Patel [Fri, 26 Oct 2018 14:58:13 +0000 (14:58 +0000)]
[x86] commute blendvb with constant condition op to allow load folding

This is a narrow fix for 1 of the problems mentioned in PR27780:
https://bugs.llvm.org/show_bug.cgi?id=27780

I looked at more general solutions, but it's a mess. We canonicalize shuffle masks
based on the number of elements accessed from each operand, and that's not optional.
If you remove that, we'll crash because we fail to match isel patterns. So I'm
waiting until we're sure that we have blendvb with constant condition and then
commuting based on the load potential. Other cases like blend-with-immediate are
already handled elsewhere, so this is probably not a common problem anyway.

I didn't use "MayFoldLoad" because that checks for one-use and in these cases, we've
screwed that up by creating a temporary PSHUFB using these operands that we're counting
on to be killed later. Undoing that didn't look like a simple task because it's
intertwined with determining if we actually use both operands of the shuffle or not.a

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

llvm-svn: 345390

5 years ago[X86] Use existing pulled out VT variables. NFCI.
Simon Pilgrim [Fri, 26 Oct 2018 14:39:28 +0000 (14:39 +0000)]
[X86] Use existing pulled out VT variables. NFCI.

llvm-svn: 345388

5 years ago[SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics
Max Kazantsev [Fri, 26 Oct 2018 14:20:11 +0000 (14:20 +0000)]
[SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics

This patch adds support of `llvm.experimental.guard` intrinsics to non-trivial
simple loop unswitching. These intrinsics represent implicit control flow which
has pretty much the same semantics as usual conditional branches. The
algorithm of dealing with them is following:

- Consider guards as unswitching candidates;
- If a guard is considered the best candidate, turn it into a branch;
- Apply normal unswitching algorithm on this branch.

The patch has no compile time effect on code that does not contain any guards.

Differential Revision: https://reviews.llvm.org/D53744
Reviewed By: chandlerc

llvm-svn: 345387

5 years ago[ARM] Fix ARMCodeGenPrepare test cases
Sjoerd Meijer [Fri, 26 Oct 2018 14:19:57 +0000 (14:19 +0000)]
[ARM] Fix ARMCodeGenPrepare test cases

While working on FileCheck producing better diagnostics in D53710, I noticed
that our test case is broken in a few different ways. The test was running, but
results were not checked as prefix CHECK-COMMON wasn't defined (which is what
FileCheck should warn about). Also, the output was different in 2 cases because
of recent changes in ARMCodeGenPrepare.

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

llvm-svn: 345386

5 years ago[Windows] Define generic arguments registers for Windows x64
Aleksandr Urakov [Fri, 26 Oct 2018 14:15:34 +0000 (14:15 +0000)]
[Windows] Define generic arguments registers for Windows x64

Summary:
When evaluating expressions the generic arguments registers are required by ABI.
This patch defines them.

Reviewers: zturner, stella.stamenova, labath

Subscribers: aleksandr.urakov, lldb-commits

Tags: #lldb

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

llvm-svn: 345385

5 years ago[CodeGen] Remove out operands from PATCHABLE_OP
Francis Visoiu Mistrih [Fri, 26 Oct 2018 13:37:25 +0000 (13:37 +0000)]
[CodeGen] Remove out operands from PATCHABLE_OP

The current model requires 1 out operand, but it is not used nor created.

This fixed an x86 machine verifier issue.

Part of PR27481.

llvm-svn: 345384

5 years ago[llvm-ar] Access ADDLIB in llvm-ar via command line
Owen Reynolds [Fri, 26 Oct 2018 13:34:38 +0000 (13:34 +0000)]
[llvm-ar] Access ADDLIB in llvm-ar via command line

ADDLIB is called to add the contents of an archive to another archive.
Previously this was only accessible through the use of an MRI script.

With the use of a new "L" modifier, archive files can treated in the
manner above when using quick append.

llvm-svn: 345383

5 years ago[AMDGPU] Add a pass to promote bitcast calls
Scott Linder [Fri, 26 Oct 2018 13:18:36 +0000 (13:18 +0000)]
[AMDGPU] Add a pass to promote bitcast calls

AMDGPU currently only supports direct calls, but at lower optimisation levels it
fails to lower statically direct calls which appear indirect due to a bitcast.

Add a pass to visit all CallSites and use CallPromotionUtils to "devirtualize"
calls.

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

llvm-svn: 345382

5 years ago[clang-tidy] Re-commit: Add new 'readability-uppercase-literal-suffix' check (CERT...
Roman Lebedev [Fri, 26 Oct 2018 13:09:27 +0000 (13:09 +0000)]
[clang-tidy] Re-commit: Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

Summary:
Detects when the integral literal or floating point (decimal or hexadecimal)
literal has non-uppercase suffix, and suggests to make the suffix uppercase,
with fix-it.

All valid combinations of suffixes are supported.

```
  auto x = 1;  // OK, no suffix.

  auto x = 1u; // warning: integer literal suffix 'u' is not upper-case

  auto x = 1U; // OK, suffix is uppercase.

  ...
```

This is a re-commit, the original was reverted by me in
rL345305 due to discovered bugs. (implicit code, template instantiation)
Tests were added, and the bugs were fixed.
I'm unable to find any further bugs, hopefully there aren't any..

References:
* [[ https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152241 | CERT DCL16-C ]]
* MISRA C:2012, 7.3 - The lowercase character "l" shall not be used in a literal suffix
* MISRA C++:2008, 2-13-4 - Literal suffixes shall be upper case

Reviewers: JonasToth, aaron.ballman, alexfh, hokein, xazax.hun

Reviewed By: aaron.ballman

Subscribers: Eugene.Zelenko, mgorny, rnkovacs, cfe-commits

Tags: #clang-tools-extra

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

llvm-svn: 345381

5 years agoRevert r345330 "Add MS ABI mangling for operator<=>."
Hans Wennborg [Fri, 26 Oct 2018 13:05:45 +0000 (13:05 +0000)]
Revert r345330 "Add MS ABI mangling for operator<=>."

The generated MS manglings differ between 32- and 64-bit, and the test only
expects the latter. See also the commit email thread.

> Thanks to Cameron DaCamara at Microsoft for letting us know what their
> chosen mangling is here!

llvm-svn: 345380

5 years agoRegenerate test
Simon Pilgrim [Fri, 26 Oct 2018 12:33:56 +0000 (12:33 +0000)]
Regenerate test

llvm-svn: 345379

5 years ago[llvm-mca] Fix -wreorder and -Wunused-private-field after r345376. NFC
Sam McCall [Fri, 26 Oct 2018 12:19:48 +0000 (12:19 +0000)]
[llvm-mca] Fix -wreorder and -Wunused-private-field after r345376. NFC

llvm-svn: 345378

5 years ago[Codegen] - Implement basic .debug_loclists section emission (DWARF5).
George Rimar [Fri, 26 Oct 2018 11:25:12 +0000 (11:25 +0000)]
[Codegen] - Implement basic .debug_loclists section emission (DWARF5).

.debug_loclists is the DWARF 5 version of the .debug_loc.
With that patch, it will be emitted when DWARF 5 is used.

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

llvm-svn: 345377

5 years ago[llvm-mca] Removed dependency on mca::SourcMgr in some Views. NFC
Andrea Di Biagio [Fri, 26 Oct 2018 10:48:04 +0000 (10:48 +0000)]
[llvm-mca] Removed dependency on mca::SourcMgr in some Views. NFC

llvm-svn: 345376

5 years ago[SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch
Max Kazantsev [Fri, 26 Oct 2018 09:52:58 +0000 (09:52 +0000)]
[SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch

We should be able to make all relevant checks before we actually start the non-trivial
unswitching, so that we could guarantee that once we have started the transform,
it will always succeed.

Reviewed By: chandlerc
Differential Revision: https://reviews.llvm.org/D53747

llvm-svn: 345375

5 years ago[PDB] Fix `SymbolFilePDBTests` after r345313
Aleksandr Urakov [Fri, 26 Oct 2018 09:36:26 +0000 (09:36 +0000)]
[PDB] Fix `SymbolFilePDBTests` after r345313

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

llvm-svn: 345374

5 years ago[NativePDB] Add the ability to dump dump global variables.
Zachary Turner [Fri, 26 Oct 2018 09:06:38 +0000 (09:06 +0000)]
[NativePDB] Add the ability to dump dump global variables.

LLDB has the ability to display global variables, even without a running
process, via the target variable command. This is because global
variables are linker initialized, so their values are embedded directly
into the executables. This gives us great power for testing native PDB
functionality in a cross-platform manner, because we don't actually need
a running process. We can just create a target using an EXE file, and
display global variables. And global variables can have arbitrarily
complex types, so in theory we can fully exercise the type system,
record layout, and data formatters for native PDB files and PE/COFF
executables on any host platform, as long as our type does not require a
dynamic initializer.

This patch adds basic support for finding variables by name, and adds an
exhaustive test for fundamental data types and pointers / references to
fundamental data types.

Subsequent patches will extend this to typedefs, classes, pointers to
functions, and other cases.

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

llvm-svn: 345373

5 years agoRevert "Reapply: [Driver] Use forward slashes in most linker arguments"
Martin Storsjo [Fri, 26 Oct 2018 08:33:29 +0000 (08:33 +0000)]
Revert "Reapply: [Driver] Use forward slashes in most linker arguments"

This reverts commit r345370, as it uncovered even more issues in
tests with partial/inconsistent path normalization:
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/13562
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/886
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20994

In particular, these tests seem to have failed:
    Clang :: CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
    Clang :: CodeGen/thinlto-multi-module.ll
    Clang :: Driver/cuda-external-tools.cu
    Clang :: Driver/cuda-options.cu
    Clang :: Driver/hip-toolchain-no-rdc.hip
    Clang :: Driver/hip-toolchain-rdc.hip
    Clang :: Driver/openmp-offload-gpu.c

At least the Driver tests could potentially be fixed by extending
the path normalization to even more places, but the issues with the
CodeGen tests are still unknown.

In addition, a number of other tests seem to have been broken in
other clang dependent tools such as clang-tidy and clangd.

llvm-svn: 345372

5 years agoUpdate the example of BS_Stroustrup to match what is done by clang-format
Sylvestre Ledru [Fri, 26 Oct 2018 07:25:37 +0000 (07:25 +0000)]
Update the example of BS_Stroustrup to match what is done by clang-format

Summary:
reported here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911561

clang-format-7 -style="{BreakBeforeBraces: Stroustrup}" wasn't doing
the same as the doc

Reviewers: krasimir

Reviewed By: krasimir

Subscribers: cfe-commits

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

llvm-svn: 345371

5 years agoReapply: [Driver] Use forward slashes in most linker arguments
Martin Storsjo [Fri, 26 Oct 2018 07:01:59 +0000 (07:01 +0000)]
Reapply: [Driver] Use forward slashes in most linker arguments

libtool inspects the output of $CC -v to detect what object files and
libraries are linked in by default. When clang is built as a native
windows executable, all paths are formatted with backslashes, and
the backslashes cause each argument to be enclosed in quotes. The
backslashes and quotes break further processing within libtool (which
is implemented in shell script, running in e.g. msys) pretty badly.

Between unix style pathes (that only work in tools that are linked
to the msys runtime, essentially the same as cygwin) and proper windows
style paths (with backslashes, that can easily break shell scripts
and msys environments), the best compromise is to use windows style
paths (starting with e.g. c:) but with forward slashes, which both
msys based tools, shell scripts and native windows executables can
cope with. This incidentally turns out to be the form of paths that
GCC prints out when run with -v on windows as well.

This change potentially makes the output from clang -v a bit more
inconsistent, but it is isn't necessarily very consistent to begin with.

Compared to the previous attempt in SVN r345004, this now does
the same transformation on more paths, hopefully on the right set
of paths so that all tests pass (previously some tests failed, where
path fragments that were required to be identical turned out to
use different path separators in different places). This now also
is done only for non-windows, or cygwin/mingw targets, to preserve
all backslashes for MSVC cases (where the paths can end up e.g. embedded
into PDB files. (The transformation function itself,
llvm::sys::path::convert_to_slash only has an effect when run on windows.)

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

llvm-svn: 345370

5 years ago[SystemZ] Fix -Wcovered-switch-default as coding standard regulates
Fangrui Song [Fri, 26 Oct 2018 06:59:08 +0000 (06:59 +0000)]
[SystemZ] Fix -Wcovered-switch-default as coding standard regulates

llvm-svn: 345369

5 years ago[NFC] Add periods to CREDITS.txt (testing git-llvm)
Kristina Brooks [Fri, 26 Oct 2018 06:57:02 +0000 (06:57 +0000)]
[NFC] Add periods to CREDITS.txt (testing git-llvm)

NFC commit to test git-llvm bridge for current GitHub monorepo.

llvm-svn: 345368

5 years ago[llvm-nm] Simplify. NFC
Fangrui Song [Fri, 26 Oct 2018 06:56:51 +0000 (06:56 +0000)]
[llvm-nm] Simplify. NFC

Change a \t to spaces
Change some zero-filling memcpy to aggregate initialization
Delete redundant ArchiveName.clear() after declaration

llvm-svn: 345367

5 years ago[PowerPC] Fix some missed optimization opportunities in combineSetCC
Li Jia He [Fri, 26 Oct 2018 06:48:53 +0000 (06:48 +0000)]
[PowerPC] Fix some missed optimization opportunities in combineSetCC

For both operands are bool, short, int, long, long long, add the following optimization.
1. 0-x == y --> x+y ==0
2. 0-x != y --> x+y != 0

Review: nemanjai
Differential Revision: https://reviews.llvm.org/D53360

llvm-svn: 345366

5 years ago[PowerPC][NFC] Add tests for some missed optimization opportunities in combineSetCC
Li Jia He [Fri, 26 Oct 2018 05:02:10 +0000 (05:02 +0000)]
[PowerPC][NFC] Add tests for some missed optimization opportunities in combineSetCC

For both operands are bool, short, int, long, long long, add the following optimization test case.
1. 0-x == y --> x+y ==0
2. 0-x != y --> x+y != 0

Review: nemanjai
Differential Revision: https://reviews.llvm.org/D53358

llvm-svn: 345365

5 years agoThis reverts commit r345357, It is wrong to create a new directory and put the test...
Li Jia He [Fri, 26 Oct 2018 04:54:56 +0000 (04:54 +0000)]
This reverts commit  r345357, It is wrong to create a new directory and put the test file into it. I am sorry for this.

llvm-svn: 345364

5 years ago[NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py
Nemanja Ivanovic [Fri, 26 Oct 2018 03:30:28 +0000 (03:30 +0000)]
[NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py

Currently, the regular expression that matches the lines of assembly for PPC LE
(ELFv2) does not work for the assembly for BE (ELFv1). This patch fixes it.

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

llvm-svn: 345363

5 years agoPR31978: Don't crash if CodeGen sees a top-level BindingDecl.
Richard Smith [Fri, 26 Oct 2018 03:21:20 +0000 (03:21 +0000)]
PR31978: Don't crash if CodeGen sees a top-level BindingDecl.

llvm-svn: 345362

5 years ago[PowerPC] Keep vector int to fp conversions in vector domain
Nemanja Ivanovic [Fri, 26 Oct 2018 03:19:13 +0000 (03:19 +0000)]
[PowerPC] Keep vector int to fp conversions in vector domain

At present a v2i16 -> v2f64 convert is implemented by extracts to scalar,
scalar converts, and merge back into a vector. Use vector converts instead,
with the int data permuted into the proper position and extended if necessary.

Patch by RolandF.

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

llvm-svn: 345361

5 years agoCodeGen: correct the case for swift 4.2, 5.0
Saleem Abdulrasool [Fri, 26 Oct 2018 03:16:16 +0000 (03:16 +0000)]
CodeGen: correct the case for swift 4.2, 5.0

This corrects the leader for the swift names.  The encoding for 4.2 and
5.0 differ by a single bit on the second character and were swapped.

llvm-svn: 345360

5 years ago[Pipeliner] Mark swp-art-deps-rec.ll as REQUIRES: asserts after rL345319
Fangrui Song [Fri, 26 Oct 2018 03:15:56 +0000 (03:15 +0000)]
[Pipeliner] Mark swp-art-deps-rec.ll as REQUIRES: asserts after rL345319

llvm-svn: 345359

5 years agoAdd dependency from SystemZAsmParser to SystemZAsmPrinter after rL345349
Fangrui Song [Fri, 26 Oct 2018 03:04:54 +0000 (03:04 +0000)]
Add dependency from SystemZAsmParser to SystemZAsmPrinter after rL345349

This fixes -DBUILD_SHARED_LIBS=on build. The dependency is similar to that of X86's.

llvm-svn: 345358

5 years ago[PowerPC][NFC] Add tests for some missed optimization opportunities in combineSetCC
Li Jia He [Fri, 26 Oct 2018 02:34:57 +0000 (02:34 +0000)]
[PowerPC][NFC] Add tests for some missed optimization opportunities in combineSetCC

For both operands are bool, short, int, long, long long, add the following optimization test case.
1. 0-x == y --> x+y ==0
2. 0-x != y --> x+y != 0

Review: nemanjai
Differential Revision: https://reviews.llvm.org/D53358

llvm-svn: 345357

5 years agoRevert "[AArch64] Create proper memoperand for multi-vector stores"
Vlad Tsyrklevich [Fri, 26 Oct 2018 02:00:14 +0000 (02:00 +0000)]
Revert "[AArch64] Create proper memoperand for multi-vector stores"

This reverts commit r345315, it was causing test failures on
sanitizer-x86_64-linux-fast.

llvm-svn: 345356

5 years agoadd myself to the CREDITS.TXT
Li Jia He [Fri, 26 Oct 2018 01:58:23 +0000 (01:58 +0000)]
add myself to the CREDITS.TXT

llvm-svn: 345355

5 years ago[AArch64] Support Windows stack probe command-line arguments.
Eli Friedman [Fri, 26 Oct 2018 01:31:57 +0000 (01:31 +0000)]
[AArch64] Support Windows stack probe command-line arguments.

Adds support for -mno-stack-arg-probe and -mstack-probe-size.

(Not really happy copy-pasting code, but that's what we do for all the
other Windows targets.)

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

llvm-svn: 345354

5 years agoTeach the DominatorTree fallback to recalculation when applying updates to speedup...
Chijun Sima [Fri, 26 Oct 2018 01:28:36 +0000 (01:28 +0000)]
Teach the DominatorTree fallback to recalculation when applying updates to speedup JT (PR37929)

Summary:
This patch makes the dominatortree recalculate when applying updates with the size of the update vector larger than a threshold. Directly applying updates is usually slower than recalculating the whole domtree in this case. This patch fixes an issue which causes JT running slowly on some inputs.

In bug 37929, the dominator tree is trying to apply 19,000+ updates several times, which takes several minutes.

After this patch, the time used by DT.applyUpdates:

| Input | Before (s) | After (s) | Speedup |
| the 2nd Reproducer in 37929 | 297 | 0.15 | 1980x |
| clang-5.0.0.0.bc | 9.7 | 4.3 | 2.26x |
| clang-5.0.0.4.bc | 11.6 | 2.6 | 4.46x |

Reviewers: kuhar, brzycki, trentxintong, davide, dmgreen, grosser

Reviewed By: kuhar, brzycki

Subscribers: kristina, llvm-commits

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

llvm-svn: 345353

5 years agoRun the min/max tests agaist the header <charconv>. Fix that header so it passes...
Marshall Clow [Fri, 26 Oct 2018 01:00:56 +0000 (01:00 +0000)]
Run the min/max tests agaist the header <charconv>. Fix that header so it passes. NFC.

llvm-svn: 345352

5 years agoUpdate test that checks auto-completion for settings set.
Jonas Devlieghere [Fri, 26 Oct 2018 00:50:54 +0000 (00:50 +0000)]
Update test that checks auto-completion for settings set.

This reverts r345350 and updates the test rather than removing it. Now
we check that `--g` auto-completes to `--global`.

llvm-svn: 345351

5 years agoRemove test that checks auto-completion for settings set.
Jonas Devlieghere [Fri, 26 Oct 2018 00:39:27 +0000 (00:39 +0000)]
Remove test that checks auto-completion for settings set.

With the new `-f` option for `settings set`, `-` (dash) no longer
auto-complete to `-g`.

llvm-svn: 345350

5 years ago[SystemZ] Implement SystemZOperand::print()
Jonas Paulsson [Fri, 26 Oct 2018 00:36:00 +0000 (00:36 +0000)]
[SystemZ] Implement SystemZOperand::print()

SystemZAsmParser can now handle -debug by printing the operands neatly to the
output stream. Before this patch this lead to an llvm_unreachable().

It seems that now '-mllvm -debug' does not cause any crashes anywhere (at
least not on SPEC).

Review: Ulrich Weigand
https://reviews.llvm.org/D53328

llvm-svn: 345349

5 years agoDump public symbol records in pdb2yaml mode
Zachary Turner [Fri, 26 Oct 2018 00:17:31 +0000 (00:17 +0000)]
Dump public symbol records in pdb2yaml mode

llvm-svn: 345348

5 years ago[SystemZ] Pass the DAG pointer from SystemZAddressingMode::dump().
Jonas Paulsson [Fri, 26 Oct 2018 00:02:33 +0000 (00:02 +0000)]
[SystemZ]  Pass the DAG pointer from SystemZAddressingMode::dump().

In order to print the IR slot number for the memory operand, the DAG pointer
must be passed to SDNode::dump().

The isel-debug.ll test updated to also check for the IR Value reference being
printed correctly.

Review: Ulrich Weigand
https://reviews.llvm.org/D53333

llvm-svn: 345347

5 years agoAdd functionality to export settings
Jonas Devlieghere [Fri, 26 Oct 2018 00:00:17 +0000 (00:00 +0000)]
Add functionality to export settings

For the reproducer feature I need to be able to export and import the
current LLDB configuration. To realize this I've extended the existing
functionality to print settings. With the help of a new formatting
option, we can now write the settings and their values to a file
structured as regular commands.

Concretely the functionality works as follows:

  (lldb) settings export -f /path/to/file

This file contains a bunch of settings set commands, followed by the
setting's name and value.

  ...
  settings set use-external-editor false
  settings set use-color true
  settings set auto-one-line-summaries true
  settings set auto-indent true
  ...

You can import the settings again by either sourcing the file or using
the settings read command.

  (lldb) settings read -f /path/to/file

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

llvm-svn: 345346

5 years agoReland "[WebAssembly] LSDA info generation"
Heejin Ahn [Thu, 25 Oct 2018 23:55:10 +0000 (23:55 +0000)]
Reland "[WebAssembly] LSDA info generation"

Summary:
This adds support for LSDA (exception table) generation for wasm EH.
Wasm EH mostly follows the structure of Itanium-style exception tables,
with one exception: a call site table entry in wasm EH corresponds to
not a call site but a landing pad.

In wasm EH, the VM is responsible for stack unwinding. After an
exception occurs and the stack is unwound, the control flow is
transferred to wasm 'catch' instruction by the VM, after which the
personality function is called from the compiler-generated code. (Refer
to WasmEHPrepare pass for more information on this part.)

This patch:
- Changes wasm.landingpad.index intrinsic to take a token argument, to
make this 1:1 match with a catchpad instruction
- Stores landingpad index info and catch type info MachineFunction in
before instruction selection
- Lowers wasm.lsda intrinsic to an MCSymbol pointing to the start of an
exception table
- Adds WasmException class with overridden methods for table generation
- Adds support for LSDA section in Wasm object writer

Reviewers: dschuff, sbc100, rnk

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

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

llvm-svn: 345345

5 years ago[AArch64] Implement FP16FML intrinsics
Bryan Chan [Thu, 25 Oct 2018 23:47:00 +0000 (23:47 +0000)]
[AArch64] Implement FP16FML intrinsics

Generate the FP16FML intrinsics into arm_neon.h (AArch64 only for now).
Add two new type modifiers to NeonEmitter to handle the new prototypes.
Define __ARM_FEATURE_FP16FML when +fp16fml is enabled and guard the
intrinsics with the macro in arm_neon.h.

Based on a patch by Gao Yiling.

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

llvm-svn: 345344

5 years ago[WebAssembly] Support EH instructions in InstPrinter
Heejin Ahn [Thu, 25 Oct 2018 23:45:48 +0000 (23:45 +0000)]
[WebAssembly] Support EH instructions in InstPrinter

Summary: This adds support for exception handling instructions to InstPrinter.

Reviewers: dschuff, aardappel

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

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

llvm-svn: 345343

5 years agoFix in MachineOperand::printIRValueReference().
Jonas Paulsson [Thu, 25 Oct 2018 23:39:07 +0000 (23:39 +0000)]
Fix in MachineOperand::printIRValueReference().

Handle the case where getCurrentFunction() returns nullptr by passing -1 to
printIRSlotNumber(). This will result in <badref> being printed instead of an
assertion failure.

Review: Francis Visoiu Mistrih
https://reviews.llvm.org/D53333

llvm-svn: 345342