platform/upstream/llvm.git
6 years ago[AggressiveInstCombine] Add library initializer routine for AggressiveInstCombine...
Craig Topper [Tue, 24 Apr 2018 00:05:21 +0000 (00:05 +0000)]
[AggressiveInstCombine] Add library initializer routine for AggressiveInstCombine library. Use it in bugpoint and llvm-opt-fuzzer to match regular InstCombine.

This should make aggressive instcombine usable with these tools.

llvm-svn: 330663

6 years ago[X86] Remove unnecessary vector memory folded InstRW overrides.
Simon Pilgrim [Mon, 23 Apr 2018 22:45:04 +0000 (22:45 +0000)]
[X86] Remove unnecessary vector memory folded InstRW overrides.

We have test coverage for these with resources-sse*/avx*

llvm-svn: 330662

6 years ago[LLVM-C] DIBuilder Bindings For Variable Expressions
Robert Widmann [Mon, 23 Apr 2018 22:31:49 +0000 (22:31 +0000)]
[LLVM-C] DIBuilder Bindings For Variable Expressions

Summary: Add DIBuilder bindings for (global) variable expressions, variable value expressions, and debug value intrinsic insertion.

Reviewers: harlanhaskins, deadalnix, whitequark

Reviewed By: whitequark

Subscribers: llvm-commits

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

llvm-svn: 330661

6 years ago[GlobalISel][Legalizer] Look thro copies while combining G_UNMERGE's
Roman Tereshin [Mon, 23 Apr 2018 22:28:36 +0000 (22:28 +0000)]
[GlobalISel][Legalizer] Look thro copies while combining G_UNMERGE's

As we're becoming stricter w/ respect to not allowing vregs having LLTs
and regclasses assigned both mid-globalisel pipeline, the number of
extra copies grows, some of which separate G_UNMERGE's from their
corresponding G_MERGE's, becoming a performance concern.

It's worth mentioning that we're already looking through copies while
combining legalization artifacts for every kind of artifact but
G_UNMERGE.

Reviewed By: aditya_nandakumar

Reviewers: ab, t.p.northover, volkan, javed.absar

Subscribers: rovka, kristof.beyls, llvm-commits

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

llvm-svn: 330660

6 years ago[X86] Remove unnecessary BMI2 InstRW overrides.
Simon Pilgrim [Mon, 23 Apr 2018 22:19:55 +0000 (22:19 +0000)]
[X86] Remove unnecessary BMI2 InstRW overrides.

We have test coverage for these with resources-bmi2.s

llvm-svn: 330659

6 years ago[X86] Move the 32-bit versions of rdfsbase/rdgsbase/wrfsbase/wrgsbase to BuiltinsX86_...
Craig Topper [Mon, 23 Apr 2018 22:18:36 +0000 (22:18 +0000)]
[X86] Move the 32-bit versions of rdfsbase/rdgsbase/wrfsbase/wrgsbase to BuiltinsX86_64.def.

The 32-bit refers to their input/output type, but the instructions are only available in 64-bit mode.

llvm-svn: 330658

6 years ago[X86] Move __builtin_ia32_movnti64 andd __builtin_ia32_rdrand64_step to BuiltinsX86_6...
Craig Topper [Mon, 23 Apr 2018 22:18:34 +0000 (22:18 +0000)]
[X86] Move __builtin_ia32_movnti64 andd __builtin_ia32_rdrand64_step to BuiltinsX86_64.def to make them unavailable in 32-bit mode.

llvm-svn: 330657

6 years ago[AST] strcmp/memcmp always compares unsigned chars.
Benjamin Kramer [Mon, 23 Apr 2018 22:04:34 +0000 (22:04 +0000)]
[AST] strcmp/memcmp always compares unsigned chars.

This makes it return the right result in a couple of edge cases. The
wide versions always do the comparison on the underlying wchar_t type.

llvm-svn: 330656

6 years agoRe-commit r330627 "[libcxx] implement <experimental/simd> declarations based on P0214R7."
Tim Shen [Mon, 23 Apr 2018 21:54:06 +0000 (21:54 +0000)]
Re-commit r330627 "[libcxx] implement <experimental/simd> declarations based on P0214R7."

There are 3 changes:
* Renamed genertor.pass.cpp to generator.pass.cpp
* Removed nothing_to_do.pass.cpp
* Mark GCC 4.9 as UNSUPPORTED for the test files that have negative
  narrowing conversion SFINAE test (see GCC PR63723).

llvm-svn: 330655

6 years ago[Docs] Regenerate command line documentation.
Craig Topper [Mon, 23 Apr 2018 21:41:06 +0000 (21:41 +0000)]
[Docs] Regenerate command line documentation.

llvm-svn: 330654

6 years ago[LoopInterchange] Do not change LI for BBs in child loops.
Florian Hahn [Mon, 23 Apr 2018 21:38:19 +0000 (21:38 +0000)]
[LoopInterchange] Do not change LI for BBs in child loops.

If a loop with child loops becomes our new inner loop after
interchanging, we only need to update LoopInfo for the blocks defined in
the old outer loop. BBs in child loops will stay there.

Reviewers: efriedma, karthikthecool, mcrosier

Reviewed By: efriedma

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

llvm-svn: 330653

6 years ago[libFuzzer] Add feature to not use AFL's deferred forkserver.
Matt Morehouse [Mon, 23 Apr 2018 21:36:21 +0000 (21:36 +0000)]
[libFuzzer] Add feature to not use AFL's deferred forkserver.

A small but substantial minority of libFuzzer-based fuzzers run code that
does not play well with fork in global constructors or LLVMFuzzerInitialize.
This patch allows these fuzzers to use afl_driver by allowing them to
opt-out of using AFL's deferred forkserver which deferres calling fork until
after this code.

Patch By: metzman

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

llvm-svn: 330652

6 years ago[Sema] Add -Wno-self-assign-overloaded
Roman Lebedev [Mon, 23 Apr 2018 21:35:21 +0000 (21:35 +0000)]
[Sema] Add -Wno-self-assign-overloaded

Summary:
It seems there isn't much enthusiasm for `-wtest` D45685.

This is more conservative version, which i had in the very first
revision of D44883, but that 'erroneously' got removed because of the review.

**Based on some [irc] discussions, it must really be documented that
we want all the new diagnostics to have their own flags, to ease
rollouts, transitions, etc.**

Please do note that i'm only adding `-Wno-self-assign-overloaded`,
but not `-Wno-self-assign-field-overloaded`, because i'm honestly
not aware of any false-positives from the `-field` variant,
but i can just as easily add it if wanted.
https://reviews.llvm.org/D44883#1068561

Reviewers: dblaikie, aaron.ballman, thakis, rjmccall, rsmith

Reviewed By: dblaikie

Subscribers: Quuxplusone, chandlerc, cfe-commits

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

llvm-svn: 330651

6 years agoChange kAllocatorSpace for powerpc64.
Martin Liska [Mon, 23 Apr 2018 21:13:40 +0000 (21:13 +0000)]
Change kAllocatorSpace for powerpc64.

Fixes issue: https://github.com/google/sanitizers/issues/933

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

llvm-svn: 330650

6 years agolog10: Use sw implementation from amd builtins
Jan Vesely [Mon, 23 Apr 2018 21:10:42 +0000 (21:10 +0000)]
log10: Use sw implementation from amd builtins

Add missing table.
Fixes log10d CTS on carrizo.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Aaron Watry <awatry@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 330649

6 years ago[X86] Remove unnecessary WriteLEA InstRW overrides.
Simon Pilgrim [Mon, 23 Apr 2018 21:04:23 +0000 (21:04 +0000)]
[X86] Remove unnecessary WriteLEA InstRW overrides.

llvm-svn: 330648

6 years ago[COFF] Alias /DEBUG:FULL to /DEBUG
Zachary Turner [Mon, 23 Apr 2018 20:54:08 +0000 (20:54 +0000)]
[COFF] Alias /DEBUG:FULL to /DEBUG

With MSVC linker, /DEBUG is an alias of /DEBUG:FASTLINK, and if
you don't want /DEBUG:FASTLINK you have to explicitly specify
/DEBUG:FULL.

LLD doesn't support /DEBUG:FASTLINK, and so our standard /DEBUG
option is what MSVC calls /DEBUG:FULL.  To provide command line
compatibility with MSVC, we should also support /DEBUG:FULL, and
since it's the same as what LLD already does for /DEBUG, just
alias it.

llvm-svn: 330647

6 years ago[DAGCombiner] Unfold scalar masked merge if profitable
Roman Lebedev [Mon, 23 Apr 2018 20:38:49 +0000 (20:38 +0000)]
[DAGCombiner] Unfold scalar masked merge if profitable

Summary:
This is [[ https://bugs.llvm.org/show_bug.cgi?id=37104 | PR37104 ]].

[[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]] will introduce an IR canonicalization that is likely bad for the end assembly.
Previously, `andl`+`andn`/`andps`+`andnps` / `bic`/`bsl` would be generated. (see `@out`)
Now, they would no longer be generated  (see `@in`).
So we need to make sure that they are still generated.

If the mask is constant, we do nothing. InstCombine should have unfolded it.
Else, i use `hasAndNot()` TLI hook.

For now, only handle scalars.

https://rise4fun.com/Alive/bO6

----

I *really* don't like the code i wrote in `DAGCombiner::unfoldMaskedMerge()`.
It is super fragile. Is there something like IR Pattern Matchers for this?

Reviewers: spatel, craig.topper, RKSimon, javed.absar

Reviewed By: spatel

Subscribers: andreadb, courbet, kristof.beyls, javed.absar, rengolin, nemanjai, llvm-commits

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

llvm-svn: 330646

6 years ago[X86][AArch64][NFC] Add tests for masked merge unfolding
Roman Lebedev [Mon, 23 Apr 2018 20:38:42 +0000 (20:38 +0000)]
[X86][AArch64][NFC] Add tests for masked merge unfolding

Summary:
This is [[ https://bugs.llvm.org/show_bug.cgi?id=37104 | PR37104 ]].

[[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]] will introduce an IR canonicalization that is likely bad for the end assembly.
Previously, `andl`+`andn`/`andps`+`andnps` / `bic`/`bsl` would be generated. (see `@out`)
Now, they would no longer be generated  (see `@in`).
I'm guessing `llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp` should be able to unfold this.

Reviewers: spatel, craig.topper, RKSimon, javed.absar

Reviewed By: spatel

Subscribers: nemanjai, rengolin, javed.absar, kristof.beyls, llvm-commits

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

llvm-svn: 330645

6 years agoRemove duplicate "error:" from an error message.
Rui Ueyama [Mon, 23 Apr 2018 20:34:35 +0000 (20:34 +0000)]
Remove duplicate "error:" from an error message.

This patch also simplifies the code a bit which wasn't committed in
https://reviews.llvm.org/r330600.

llvm-svn: 330644

6 years ago[Sanitizer] Internal Printf string width + left-justify.
Alex Shlyapnikov [Mon, 23 Apr 2018 20:30:50 +0000 (20:30 +0000)]
[Sanitizer] Internal Printf string width + left-justify.

Summary:
Example:

  Printf("%-5s", "123");

should yield:

  '123  '

In case Printf's requested string field width is larger than the string
argument length, the resulting string should be padded up to the requested
width.

For the simplicity sake, implementing left-justified (right padding) only.

Reviewers: eugenis

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

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

llvm-svn: 330643

6 years ago[AggressiveInstCombine] add tests for PR37098; NFC
Sanjay Patel [Mon, 23 Apr 2018 20:20:32 +0000 (20:20 +0000)]
[AggressiveInstCombine] add tests for PR37098; NFC

I'm not sure if this is where we should try to fold these
patterns inspired by:
https://bugs.llvm.org/show_bug.cgi?id=37098
...if this isn't the right place, we can move the tests.

llvm-svn: 330642

6 years ago[CallSiteSplit] Make sure we remove nonnull if the parameter turns out to be a constant.
Xin Tong [Mon, 23 Apr 2018 20:09:08 +0000 (20:09 +0000)]
[CallSiteSplit] Make sure we remove nonnull if the parameter turns out to be a constant.

Summary: We do not need nonull attribute if we know an argument is going to be constant.

Reviewers: junbuml, davide, fhahn

Subscribers: llvm-commits

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

llvm-svn: 330641

6 years ago[X86] Revert r330638 - accidental commit
Gabor Buella [Mon, 23 Apr 2018 20:05:51 +0000 (20:05 +0000)]
[X86] Revert r330638 - accidental commit

llvm-svn: 330640

6 years agoFix a broken typedef; NFCI
George Burgess IV [Mon, 23 Apr 2018 20:03:00 +0000 (20:03 +0000)]
Fix a broken typedef; NFCI

Richard Smith noted that `typedef typename iplist::iplist_impl_type
iplist_impl_type` is incorrect, per
http://eel.is/c++draft/basic.scope#class-2

It seems that neither clang nor gcc get too angry about this, but a
newer version of msvc does.

Thanks to jcmac on IRC for pointing this out!

llvm-svn: 330639

6 years ago[X86] movdiri and movdir64b instructions
Gabor Buella [Mon, 23 Apr 2018 20:00:59 +0000 (20:00 +0000)]
[X86] movdiri and movdir64b instructions

Reviewers: craig.topper
llvm-svn: 330638

6 years ago[clangd] Implementation of workspace/symbol request
Marc-Andre Laperle [Mon, 23 Apr 2018 20:00:52 +0000 (20:00 +0000)]
[clangd] Implementation of workspace/symbol request

Summary:
This is a basic implementation of the "workspace/symbol" request which is
used to find symbols by a string query. Since this is similar to code completion
in terms of result, this implementation reuses the "fuzzyFind" in order to get
matches. For now, the scoring algorithm is the same as code completion and
improvements could be done in the future.

The index model doesn't contain quite enough symbols for this to cover
common symbols like methods, enum class enumerators, functions in unamed
namespaces, etc. The index model will be augmented separately to achieve this.

Reviewers: sammccall, ilya-biryukov

Reviewed By: sammccall

Subscribers: jkorous, hokein, simark, sammccall, klimek, mgorny, ilya-biryukov, mgrang, jkorous-apple, ioeric, MaskRay, cfe-commits

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

llvm-svn: 330637

6 years agoRevert "[libcxx] implement <experimental/simd> declarations based on P0214R7."
Tim Shen [Mon, 23 Apr 2018 19:56:20 +0000 (19:56 +0000)]
Revert "[libcxx] implement <experimental/simd> declarations based on P0214R7."

This reverts commit r330627.

This causes several bots to freak out.

llvm-svn: 330636

6 years ago[MemCpyOpt] Skip optimizing basic blocks not reachable from entry
Bjorn Pettersson [Mon, 23 Apr 2018 19:55:04 +0000 (19:55 +0000)]
[MemCpyOpt] Skip optimizing basic blocks not reachable from entry

Summary:
Skip basic blocks not reachable from the entry node
in MemCpyOptPass::iterateOnFunction.

Code that is unreachable may have properties that do not exist
for reachable code (an instruction in a basic block can for
example be dominated by a later instruction in the same basic
block, for example if there is a single block loop).
MemCpyOptPass::processStore is only safe to use for reachable
basic blocks, since it may iterate past the basic block
beginning when used for unreachable blocks. By simply skipping
to optimize unreachable basic blocks we can avoid asserts such
as "Assertion `!NodePtr->isKnownSentinel()' failed."
in MemCpyOptPass::processStore.

The problem was detected by fuzz tests.

Reviewers: eli.friedman, dneilson, efriedma

Reviewed By: efriedma

Subscribers: efriedma, llvm-commits

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

llvm-svn: 330635

6 years ago[OPENMP] Formatting and code improvement, NFC.
Alexey Bataev [Mon, 23 Apr 2018 19:53:05 +0000 (19:53 +0000)]
[OPENMP] Formatting and code improvement, NFC.

llvm-svn: 330634

6 years agoFix typo in comment.
Nico Weber [Mon, 23 Apr 2018 19:22:52 +0000 (19:22 +0000)]
Fix typo in comment.

llvm-svn: 330633

6 years ago[WebAssembly] MC: Refactor section creation code
Sam Clegg [Mon, 23 Apr 2018 19:16:19 +0000 (19:16 +0000)]
[WebAssembly] MC: Refactor section creation code

Remove the use of default argument in favor of a separate
startCustomSection method.

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

llvm-svn: 330632

6 years ago[CODE_OWNERS] Update my email address.
Quentin Colombet [Mon, 23 Apr 2018 19:09:49 +0000 (19:09 +0000)]
[CODE_OWNERS] Update my email address.

NFC

llvm-svn: 330631

6 years agoReland r329956, "AArch64: Introduce a DAG combine for folding offsets into addresses...
Peter Collingbourne [Mon, 23 Apr 2018 19:09:34 +0000 (19:09 +0000)]
Reland r329956, "AArch64: Introduce a DAG combine for folding offsets into addresses.", with a fix for the bot failure.

This reland includes a check to prevent the DAG combiner from folding an
offset that is smaller than the existing one. This can cause oscillations
between two possible DAGs, which was the cause of the hang and later assertion
failure observed on the lnt-ctmark-aarch64-O3-flto bot.
http://green.lab.llvm.org/green/job/lnt-ctmark-aarch64-O3-flto/2024/

Original commit message:
> This is a code size win in code that takes offseted addresses
> frequently, such as C++ constructors that typically need to compute
> an offseted address of a vtable. This reduces the size of Chromium
> for Android's .text section by 108KB.

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

llvm-svn: 330630

6 years ago[DSE] Teach the pass that atomic memory intrinsics are stores.
Daniel Neilson [Mon, 23 Apr 2018 19:06:49 +0000 (19:06 +0000)]
[DSE] Teach the pass that atomic memory intrinsics are stores.

Summary:
This change teaches DSE that the atomic memory intrinsics are stores
that can be eliminated, and can allow other stores to be eliminated.
This change specifically does not teach DSE that these intrinsics
can be partially eliminated (i.e. length reduced, and dest/src changed);
that will be handled in another change.

Reviewers: mkazantsev, skatkov, apilipenko, efriedma, rsmith

Reviewed By: efriedma

Subscribers: dmgreen, llvm-commits

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

llvm-svn: 330629

6 years ago[HWASan] Add files missing in r330624
Alex Shlyapnikov [Mon, 23 Apr 2018 19:05:12 +0000 (19:05 +0000)]
[HWASan] Add files missing in r330624

llvm-svn: 330628

6 years ago[libcxx] implement <experimental/simd> declarations based on P0214R7.
Tim Shen [Mon, 23 Apr 2018 18:47:07 +0000 (18:47 +0000)]
[libcxx] implement <experimental/simd> declarations based on P0214R7.

Summary:
The patch includes all declarations, and also implements the following features:
* ABI.
* narrowing-conversion related SFIANE, including simd<> ctors and (static_)simd_cast.

Reviewers: mclow.lists, EricWF

Subscribers: lichray, sanjoy, MaskRay, cfe-commits

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

llvm-svn: 330627

6 years agoDR727: remove wrong assertion for use of class-scope explicit
Richard Smith [Mon, 23 Apr 2018 18:38:30 +0000 (18:38 +0000)]
DR727: remove wrong assertion for use of class-scope explicit
specialization without -fms-extensions.

llvm-svn: 330626

6 years ago[AArch64] Add cost model test case for transpose
Matthew Simpson [Mon, 23 Apr 2018 18:21:29 +0000 (18:21 +0000)]
[AArch64] Add cost model test case for transpose

This patch adds a cost model test case for vector shuffles having transpose
masks. The given costs are inaccurate and will be updated in a follow-on patch.

llvm-svn: 330625

6 years ago[HWASan] Introduce non-zero based and dynamic shadow memory (compiler-rt).
Alex Shlyapnikov [Mon, 23 Apr 2018 18:19:23 +0000 (18:19 +0000)]
[HWASan] Introduce non-zero based and dynamic shadow memory (compiler-rt).

Retire the fixed shadow memory mapping to avoid conflicts with default
process memory mapping (currently manifests on Android).

Tests on AArch64 show <1% performance loss and code size increase,
making it possible to use dynamic shadow memory by default.

Keep the fixed shadow memory mapping around to be able to run
performance comparison tests later.

Re-commiting D45847 with fixed shadow for x86-64.

llvm-svn: 330624

6 years ago[HWASan] Switch back to fixed shadow mapping for x86-64
Alex Shlyapnikov [Mon, 23 Apr 2018 18:14:39 +0000 (18:14 +0000)]
[HWASan] Switch back to fixed shadow mapping for x86-64

For now switch back to fixed shadow mapping for x86-64 due to the issues
with IFUNC linking on older binutils. More details will be added to
https://bugs.chromium.org/p/chromium/issues/detail?id=835864

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

llvm-svn: 330623

6 years agoImprove checks in test/Frontend/ftime-report-template-decl.cpp
Bjorn Pettersson [Mon, 23 Apr 2018 18:05:35 +0000 (18:05 +0000)]
Improve checks in test/Frontend/ftime-report-template-decl.cpp

Some buildbots seems to have problems with the CHECKs in
test/Frontend/ftime-report-template-decl.cpp.

I this the problem is that the order in which timers are printed
is based on consumed wall time. So there is no guarantee in which
order the timers are printed.

This patch uses CHECK-DAG instead of CHECK to make the test
case less sensitive to the actual time used by the different
passes.

The (sometimes) failing test cases where introduced in trunk@330571.

llvm-svn: 330622

6 years ago[X86] Add disassembler test cases for bswap.
Craig Topper [Mon, 23 Apr 2018 17:47:33 +0000 (17:47 +0000)]
[X86] Add disassembler test cases for bswap.

This demonstrates a bug where the encoding for a 16-bit bswap prints a 16-bit register and a 32-bit mnemonic. Intel docs say 16-bit bswap is undefined. We should either claim it as an invalid encoding or we should print a 16-bit mnemonic.

objdump does print the encoding as bswap with a 16-bit register. But it doesn't seem to ever print a suffix.

llvm-svn: 330621

6 years ago[OPENMP] Do not cast captured by value variables with pointer types in
Alexey Bataev [Mon, 23 Apr 2018 17:33:41 +0000 (17:33 +0000)]
[OPENMP] Do not cast captured by value variables with pointer types in
NVPTX target.

When generating the wrapper function for the offloading region, we need
to call the outlined function and cast the arguments correctly to follow
the ABI. Usually, variables captured by value are casted to `uintptr_t`
type. But this should not performed for the variables with pointer type.

llvm-svn: 330620

6 years agoRevert r330474 - "[HWASan] Introduce non-zero based and dynamic shadow memory (compil...
Reid Kleckner [Mon, 23 Apr 2018 17:26:33 +0000 (17:26 +0000)]
Revert r330474 - "[HWASan] Introduce non-zero based and dynamic shadow memory (compiler-rt)."

This commit causes internal errors with ld.bfd 2.24. My guess is that
the ifunc usage in this commit is causing problems. This is the default
system linker on Trusty Tahr, which is from 2014. I claim it's still in
our support window. Maybe we will decide to drop support for it, but
let's get the bots green while we do the investigation and have that
discussion.

Discovered here: https://crbug.com/835864

llvm-svn: 330619

6 years ago[SelectionDAG] Dump debug locs in SDNodes
Vedant Kumar [Mon, 23 Apr 2018 17:18:24 +0000 (17:18 +0000)]
[SelectionDAG] Dump debug locs in SDNodes

This helps debug issues where selection-dag assigns the wrong location
to an instruction.

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

llvm-svn: 330618

6 years ago[CMake] Add the missing `dsymutil` dependency when running tests.
Davide Italiano [Mon, 23 Apr 2018 17:06:55 +0000 (17:06 +0000)]
[CMake] Add the missing `dsymutil` dependency when running tests.

llvm-svn: 330617

6 years agoFix clang-cl warnings in compiler-rt
Reid Kleckner [Mon, 23 Apr 2018 17:05:47 +0000 (17:05 +0000)]
Fix clang-cl warnings in compiler-rt

The profile library was missing some includes and was erroneously using
ftruncate. WinASan was using `= {0}` to initialize structs, which
creates -Wmissing-field-initializers and -Wmissing-braces warnings with
clang. Use `= {}` instead, since this is C++.

llvm-svn: 330616

6 years ago[MC] Remove MachineInstr reference in MC layer (PR37160)
Simon Pilgrim [Mon, 23 Apr 2018 16:59:06 +0000 (16:59 +0000)]
[MC] Remove MachineInstr reference in MC layer (PR37160)

Only add support for getSchedInfoStr(const MachineInstr &MI) at the TargetSubtargetInfo level.

Really, the getSchedInfoStr calls need to be removed entirely, we should just return a latency/rthroughput through the subtarget and keep a string creation helper function somewhere else.

llvm-svn: 330615

6 years agoFix -Wtautological-compare warning with npos on Windows
Reid Kleckner [Mon, 23 Apr 2018 16:47:27 +0000 (16:47 +0000)]
Fix -Wtautological-compare warning with npos on Windows

llvm-svn: 330614

6 years agoQuick fix for rC330605: specify a target arch for test
Aleksei Sidorin [Mon, 23 Apr 2018 16:38:29 +0000 (16:38 +0000)]
Quick fix for rC330605: specify a target arch for test

llvm-svn: 330613

6 years agoAMDGPU: Move a flawed assert when spilling SGPRs
Matt Arsenault [Mon, 23 Apr 2018 16:13:30 +0000 (16:13 +0000)]
AMDGPU: Move a flawed assert when spilling SGPRs

It's possible to validly spill the frame offset register
in a call sequence to a VGPR. There are definitely issues
with SGPR spilling to memory, so move the assert later.

llvm-svn: 330612

6 years ago[X86] Replace x87 instregex with instrs if they only match one instruction
Simon Pilgrim [Mon, 23 Apr 2018 16:10:50 +0000 (16:10 +0000)]
[X86] Replace x87 instregex with instrs if they only match one instruction

llvm-svn: 330611

6 years agoFix computeSymbolSizes SEGFAULT on invalid file
Adrian Prantl [Mon, 23 Apr 2018 16:08:01 +0000 (16:08 +0000)]
Fix computeSymbolSizes SEGFAULT on invalid file

We use llvm-symbolizer in some production systems, and we run it
against all possibly related files, including some that are not
ELF. We noticed that for some of those invalid files, llvm-symbolizer
would crash with SEGFAULT. Here is an example of such a file.

It is due to that in computeSymbolSizes, a loop uses condition

  for (unsigned I = 0, N = Addresses.size() - 1; I < N; ++I) {

where if Addresses.size() is 0, N would overflow and causing the loop
to access invalid memory.

Instead of patching the loop conditions, the commit makes so that the
function returns early if Addresses is empty.

Validated by checking that llvm-symbolizer no longer crashes.

Patch by Teng Qin!

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

llvm-svn: 330610

6 years ago[clangd][tests] Fix delimiter handling
Jan Korous [Mon, 23 Apr 2018 15:58:42 +0000 (15:58 +0000)]
[clangd][tests] Fix delimiter handling

Empty line shouldn't be considered a delimiter

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

llvm-svn: 330609

6 years ago[clangd][tests] Fix handling of EOF in delimited input
Jan Korous [Mon, 23 Apr 2018 15:55:07 +0000 (15:55 +0000)]
[clangd][tests] Fix handling of EOF in delimited input

Request in delimited input ended by EOF shouldn't be an error state.
Comments at the end of test file shouldn't be logged as an error state.
Input mirroring should work for the last request in delimited test file.

llvm-svn: 330608

6 years agoAMDGPU: Assign enum name to stack ID
Matt Arsenault [Mon, 23 Apr 2018 15:51:26 +0000 (15:51 +0000)]
AMDGPU: Assign enum name to stack ID

Also assert that it is correct for SGPRs. There is currently a bug
where stack slot coloring replaces SGPR spill FIs with one with
the default ID, which results in a more confusing assert later
about a dead object.

llvm-svn: 330607

6 years agoStackSlotColoring: Fix missing skipFunction check
Matt Arsenault [Mon, 23 Apr 2018 15:51:21 +0000 (15:51 +0000)]
StackSlotColoring: Fix missing skipFunction check

llvm-svn: 330606

6 years ago[analyzer] Don't crash on printing ConcreteInt of size >64 bits
Aleksei Sidorin [Mon, 23 Apr 2018 15:41:44 +0000 (15:41 +0000)]
[analyzer] Don't crash on printing ConcreteInt of size >64 bits

Printing of ConcreteInts with size >64 bits resulted in assertion failure
in get[Z|S]ExtValue() because these methods are only allowed to be used
with integers of 64 max bit width. This patch fixes the issue.

llvm-svn: 330605

6 years agoFix case of LLVM library names.
Nico Weber [Mon, 23 Apr 2018 15:41:08 +0000 (15:41 +0000)]
Fix case of LLVM library names.

llvm-svn: 330604

6 years ago[SelectionDAG] Refactor lowering of atomic memory intrinsics.
Daniel Neilson [Mon, 23 Apr 2018 15:40:37 +0000 (15:40 +0000)]
[SelectionDAG] Refactor lowering of atomic memory intrinsics.

Summary:
This just refactors the lowering of the atomic memory intrinsics to more
closely match the code patterns used in the lowering of the non-atomic
memory intrinsics. Specifically, we encapsulate the lowering in
SelectionDAG::getAtomicMem*() functions rather than embedding
the code directly in the SelectionDAGBuilder code.

llvm-svn: 330603

6 years ago[clangd] Fix Context::derive to actually call the right method.
Benjamin Kramer [Mon, 23 Apr 2018 15:27:42 +0000 (15:27 +0000)]
[clangd] Fix Context::derive to actually call the right method.

C++ is weird.

llvm-svn: 330602

6 years agoRemove unused code (made unused by r161073, and later more so by r248043).
Nico Weber [Mon, 23 Apr 2018 15:26:15 +0000 (15:26 +0000)]
Remove unused code (made unused by r161073, and later more so by r248043).

llvm-svn: 330601

6 years ago[PPC64] Fix toc restore nops offset for V2 ABI
Zaara Syeda [Mon, 23 Apr 2018 15:01:24 +0000 (15:01 +0000)]
[PPC64] Fix toc restore nops offset for V2 ABI

The PPC64 V2 ABI restores the toc base by loading from an offset of 24 from r1.
This patch fixes the offset and updates the testcases from V1 to V2. It also
issues an error when a nop is missing after a call to an external function.

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

llvm-svn: 330600

6 years ago[clangd] Prune some dead declarations. No functionality change.
Benjamin Kramer [Mon, 23 Apr 2018 14:58:18 +0000 (14:58 +0000)]
[clangd] Prune some dead declarations. No functionality change.

llvm-svn: 330599

6 years ago[scudo] Read ARM feature bits using Fuchsia APIs.
Kostya Kortchinsky [Mon, 23 Apr 2018 14:53:13 +0000 (14:53 +0000)]
[scudo] Read ARM feature bits using Fuchsia APIs.

Summary:
    Fuchsia uses zx_system_get_features in lieu of getauxval.

    Use this call when checking for CRC32 support.

Reviewers: cryptoad

Reviewed By: cryptoad

Subscribers: delcypher, llvm-commits, #sanitizers, kristof.beyls, chrib

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

llvm-svn: 330598

6 years ago[ELF] - Simplify. NFC.
George Rimar [Mon, 23 Apr 2018 14:41:49 +0000 (14:41 +0000)]
[ELF] - Simplify. NFC.

llvm-svn: 330597

6 years ago[analyzer] Move `TaintBugVisitor` from `GenericTaintChecker.cpp` to `BugReporterVisit...
Henry Wong [Mon, 23 Apr 2018 14:41:17 +0000 (14:41 +0000)]
[analyzer] Move `TaintBugVisitor` from `GenericTaintChecker.cpp` to `BugReporterVisitors.h`.

Summary: `TaintBugVisitor` is a universal visitor, and many checkers rely on it, such as `ArrayBoundCheckerV2.cpp`, `DivZeroChecker.cpp` and `VLASizeChecker.cpp`. Moving `TaintBugVisitor` to `BugReporterVisitors.h` enables other checker can also track where `tainted` value came from.

Reviewers: NoQ, george.karpenkov, xazax.hun

Reviewed By: george.karpenkov

Subscribers: szepet, rnkovacs, a.sidorin, cfe-commits, MTC

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

llvm-svn: 330596

6 years ago[index] Fix methods that take a shared_ptr to just take a reference.
Benjamin Kramer [Mon, 23 Apr 2018 14:30:21 +0000 (14:30 +0000)]
[index] Fix methods that take a shared_ptr to just take a reference.

There is no ownership here, passing a shared_ptr just adds confusion. No
functionality change intended.

llvm-svn: 330595

6 years ago[LLVM-C] DIBuilderBindings for Subrange and Arrays
Robert Widmann [Mon, 23 Apr 2018 14:29:33 +0000 (14:29 +0000)]
[LLVM-C] DIBuilderBindings for Subrange and Arrays

Summary: Move Go bindings for subranges and DINode arrays.

Reviewers: harlanhaskins, whitequark, deadalnix

Reviewed By: whitequark

Subscribers: llvm-commits

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

llvm-svn: 330594

6 years agoSort a target list a bit better.
Nico Weber [Mon, 23 Apr 2018 14:28:49 +0000 (14:28 +0000)]
Sort a target list a bit better.

llvm-svn: 330593

6 years ago[DEBUGINFO, NVPTX] Add the test for the debug info of the local
Alexey Bataev [Mon, 23 Apr 2018 14:00:53 +0000 (14:00 +0000)]
[DEBUGINFO, NVPTX] Add the test for the debug info of the local
variables, NFC.

llvm-svn: 330592

6 years ago[LLVM-C] Finish Up Scope Bindings
Robert Widmann [Mon, 23 Apr 2018 13:51:43 +0000 (13:51 +0000)]
[LLVM-C] Finish Up Scope Bindings

Summary: Adds bindings for Module and NameSpace scopes and LLVMDIBuilderCreateForwardDecl, a counterpart to LLVMDIBuilderCreateReplaceableCompositeType.

Reviewers: harlanhaskins, whitequark, deadalnix

Reviewed By: whitequark

Subscribers: llvm-commits

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

llvm-svn: 330591

6 years ago[doc] Removed obsolete -count-aa from AliasAnalysis documentation
Marianne Mailhot-Sarrasin [Mon, 23 Apr 2018 13:45:28 +0000 (13:45 +0000)]
[doc] Removed obsolete -count-aa from AliasAnalysis documentation

Summary:
This patch removes references to AliasAnalysisCounter pass from the AliasAnalysis documentation. That pass have been eliminated in 2015, at revision trunk@247167.

Reviewed By: hfinkel

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

llvm-svn: 330590

6 years ago[analyzer] CStringChecker.cpp - Code refactoring on bug report.
Henry Wong [Mon, 23 Apr 2018 13:36:51 +0000 (13:36 +0000)]
[analyzer] CStringChecker.cpp - Code refactoring on bug report.

Reviewers: NoQ, george.karpenkov, xazax.hun

Reviewed By: george.karpenkov

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

llvm-svn: 330589

6 years ago[X86] Remove instregex matching from CLAC/STAC.
Simon Pilgrim [Mon, 23 Apr 2018 13:24:17 +0000 (13:24 +0000)]
[X86] Remove instregex matching from CLAC/STAC.

Note - noticed this as the STAC case as it was unintentionally matching against *STACK* pseudo instructions.

llvm-svn: 330588

6 years agoList cpp file only once (was added in 147117 and 147117 as build fix each).
Nico Weber [Mon, 23 Apr 2018 13:11:51 +0000 (13:11 +0000)]
List cpp file only once (was added in 147117 and 147117 as build fix each).

llvm-svn: 330587

6 years agoAMDGPU: Fix SDWA peephole for V_AND_B32
Nicolai Haehnle [Mon, 23 Apr 2018 13:06:03 +0000 (13:06 +0000)]
AMDGPU: Fix SDWA peephole for V_AND_B32

Summary:
Found by inspection. We care about the operand that *doesn't*
contain the immediate.

I believe this is currently not hit because we fold 0xff / 0xffff
immediates only later.

Change-Id: Ic3cf8538bc7da5eff3200d96eccf9d339e6345a7

Reviewers: arsenm, rampitec

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

llvm-svn: 330586

6 years agoAMDGPU: Fix a corner case crash in SIOptimizeExecMasking
Nicolai Haehnle [Mon, 23 Apr 2018 13:05:50 +0000 (13:05 +0000)]
AMDGPU: Fix a corner case crash in SIOptimizeExecMasking

Summary:
See the new test case; this is really unlikely to happen with real code,
but I ran into this while attempting to bugpoint-reduce a different issue.

Change-Id: I9ade1dc1aa8fd9c4d9fc83661d7b80e310b5c4a6

Reviewers: arsenm, rampitec

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

llvm-svn: 330585

6 years agoConsistently sort add_subdirectory calls in lib/Target/*/CMakeLists.txt
Nico Weber [Mon, 23 Apr 2018 12:49:34 +0000 (12:49 +0000)]
Consistently sort add_subdirectory calls in lib/Target/*/CMakeLists.txt

llvm-svn: 330584

6 years ago[AArch64][SVE] Asm: Support for contiguous, non-faulting LDNF1 (scalar+imm) load...
Sander de Smalen [Mon, 23 Apr 2018 12:43:19 +0000 (12:43 +0000)]
[AArch64][SVE] Asm: Support for contiguous, non-faulting LDNF1 (scalar+imm) load instructions

Reviewers: fhahn, rengolin, javed.absar, huntergr, SjoerdMeijer, t.p.northover, echristo, evandro

Reviewed By: rengolin

Subscribers: tschuett, kristof.beyls, llvm-commits

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

llvm-svn: 330583

6 years ago[LoopRotate] Fix incorrect SCEV invalidation in loop rotation
Max Kazantsev [Mon, 23 Apr 2018 12:33:31 +0000 (12:33 +0000)]
[LoopRotate] Fix incorrect SCEV invalidation in loop rotation

LoopRotate only invalidates innermost loops while the changes that it makes may
also affert any of this parents. With patch rL329047, SCEV becomes much smarter
about calculation of exit counts for outer loops, so we cannot assume that they are
not affected.

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

llvm-svn: 330582

6 years ago[X86] Remove unnecessary MMX reg-mem InstRW scheduler overrides.
Simon Pilgrim [Mon, 23 Apr 2018 11:57:15 +0000 (11:57 +0000)]
[X86] Remove unnecessary MMX reg-mem InstRW scheduler overrides.

llvm-svn: 330581

6 years agoFix tests after changes to clang-format in r330573.
Manuel Klimek [Mon, 23 Apr 2018 11:47:59 +0000 (11:47 +0000)]
Fix tests after changes to clang-format in r330573.

We do now both:
- stop reformatting a sequence after a closing brace in more cases, in
  order to not misindent after an incorrect closing brace
- format the closing brace when formatting the line containing the
  opening brace

llvm-svn: 330580

6 years ago[OpenCL] Reject virtual functions for OpenCL C++
Sven van Haastregt [Mon, 23 Apr 2018 11:23:47 +0000 (11:23 +0000)]
[OpenCL] Reject virtual functions for OpenCL C++

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

llvm-svn: 330579

6 years agollgs-tests: Increase packet time out
Pavel Labath [Mon, 23 Apr 2018 11:22:44 +0000 (11:22 +0000)]
llgs-tests: Increase packet time out

The default packet timeout of 1 second is a bit too small for these
tests, particularly as they are working in ack-mode, which means they
need to fit twice as many packets into the timeslot.

This does not seem to be a problem on the bots, but for some people
these tests are timing out regularly. I can't be sure increasing this
will solve their problem, but this does seem like a likely culprit.

llvm-svn: 330578

6 years ago[LoopUnroll] Fix potentially incorrect SCEV invalidation in UnrollRuntime
Max Kazantsev [Mon, 23 Apr 2018 10:39:38 +0000 (10:39 +0000)]
[LoopUnroll] Fix potentially incorrect SCEV invalidation in UnrollRuntime

Current runtime unrolling invalidates parent loop saying that it might have changed
after the inner loop has changed, but it doesn't bother to do the same to its parents.
With patch rL329047, SCEV becomes much smarter about calculation of exit counts for
outer loops. We might need to invalidate not only the immediate parent, but also
any of its parents as well.

There is no clear evidence that there is some miscompile happening because of this
(at least I don't have such test), but the common sense says that the current code
is wrong.

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

llvm-svn: 330577

6 years ago[LoopSimplify] Fix incorrect SCEV invalidation
Max Kazantsev [Mon, 23 Apr 2018 10:32:37 +0000 (10:32 +0000)]
[LoopSimplify] Fix incorrect SCEV invalidation

In the function `simplifyOneLoop` we optimistically assume that changes in the
inner loop only affect this very loop and have no impact on its parents. In fact,
after rL329047 has been merged, we can now calculate exit counts for outer
loops which may depend on inner loops. Thus, we need to invalidate all parents
when we do something to a loop.

There is an evidence of incorrect behavior of `simplifyOneLoop`: when we insert
`SE->verify()` check in the end of this funciton, it fails on a bunch of existing
test, in particular:

    LLVM :: Transforms/LoopUnroll/peel-loop-not-forced.ll
    LLVM :: Transforms/LoopUnroll/peel-loop-pgo.ll
    LLVM :: Transforms/LoopUnroll/peel-loop.ll
    LLVM :: Transforms/LoopUnroll/peel-loop2.ll

Note that previously we have fixed issues of this variety, see rL328483.
This patch makes this function invalidate the outermost loop properly.

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

llvm-svn: 330576

6 years ago[CodeGen] Reland r330442: Add an option to suppress output of llvm.ident
Mikhail Maltsev [Mon, 23 Apr 2018 10:08:46 +0000 (10:08 +0000)]
[CodeGen] Reland r330442: Add an option to suppress output of llvm.ident

The test case in the original patch was overly contrained and
failed on PPC targets.

llvm-svn: 330575

6 years ago[clang-format] Fix clang-tidy readability problems, NFCI
Krasimir Georgiev [Mon, 23 Apr 2018 10:02:59 +0000 (10:02 +0000)]
[clang-format] Fix clang-tidy readability problems, NFCI

llvm-svn: 330574

6 years agoFormat closing braces when reformatting the line containing the opening brace.
Manuel Klimek [Mon, 23 Apr 2018 09:34:26 +0000 (09:34 +0000)]
Format closing braces when reformatting the line containing the opening brace.

This required a couple of yaks to be shaved:
1. MatchingOpeningBlockLineIndex was misused to also store the
   closing index; instead, use a second variable, as this doesn't
   work correctly for "} else {".
2. We needed to change the API of AffectedRangeManager to not
   use iterators; we always passed in begin / end for the whole
   container before, so there was no mismatch in generality.
3. We need an extra check to discontinue formatting at the top
   level, as we now sometimes change the indent of the closing
   brace, but want to bail out immediately afterwards, for
   example:
     void f() {
       if (a) {
     }
     void g();
   Previously:
     void f() {
       if (a) {
     }
     void g();
   Now:
     void f() {
       if (a) {
       }
     void g();

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

llvm-svn: 330573

6 years ago[Solaris] __float128 is supported on Solaris/x86
Rainer Orth [Mon, 23 Apr 2018 09:28:08 +0000 (09:28 +0000)]
[Solaris] __float128 is supported on Solaris/x86

When rebasing https://reviews.llvm.org/D40898 with GCC 5.4 on Solaris 11.4, I ran
into a few instances of

In file included from /vol/llvm/src/compiler-rt/local/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc:19:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/string:40:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/bits/char_traits.h:39:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/bits/stl_algobase.h:64:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/bits/stl_pair.h:59:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/bits/move.h:57:
/usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/type_traits:311:39: error: __float128 is not supported on this target

  struct __is_floating_point_helper<__float128>
                                    ^

during make check-all.  The line above is inside

#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)

  template<>
    struct __is_floating_point_helper<__float128>
    : public true_type { };

#endif

While the libstdc++ header indicates support for __float128, clang does not, but
should.  The following patch implements this and fixed those errors.

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

llvm-svn: 330572

6 years agoUse special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEna...
Andrew V. Tischenko [Mon, 23 Apr 2018 09:22:30 +0000 (09:22 +0000)]
Use special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEnabled' inside -ftime-report feature.
Differential Revision: https://reviews.llvm.org/D45619

llvm-svn: 330571

6 years agoFix BNF nits in TableGen language reference.
Simon Tatham [Mon, 23 Apr 2018 09:15:47 +0000 (09:15 +0000)]
Fix BNF nits in TableGen language reference.

Summary:
In the course of writing an experimental ANTLR grammar based on this
document, I found three errors in the documented BNF:

SimpleValues of dag type are allowed to have no operands at all after
the initial DagArg specifying the operator. For example, the value
(outs) is extremely common in backends; an example in the test suite
is test/TableGen/AsmVariant.td line 30. But the BNF doesn't allow
DagArgList to expand to the empty string (it must contain at least one
DagArg), and therefore the DagArgList specifying the operands in the
dag-shaped production for SimpleValue should be optional.

In the production for BodyItem with a 'let' and an optional RangeList,
the RangeList should have braces around it if it's present, matching
code such as "let E{7-0} = ..." on test/TableGen/BitsInit.td line 42.
Those braces aren't included in the RangeList nonterminal itself, so
instead they need to be part of the optional segment of the BodyItem
production.

Finally, the identifier after 'defm' should be optional. Again, this
is very common in the real back end .td files; an example in the test
suite is in test/TableGen/defmclass.td line 49.

Reviewers: rengolin, nhaehnle, stoklund

Reviewed By: nhaehnle

Subscribers: llvm-commits

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

llvm-svn: 330570

6 years agoRevert "[clang-format] Improve Incomplete detection for (text) protos"
Krasimir Georgiev [Mon, 23 Apr 2018 08:50:36 +0000 (08:50 +0000)]
Revert "[clang-format] Improve Incomplete detection for (text) protos"

This reverts commit r330016.
The incomplete detection has too many false positives, picking up typos
for hard failures and refusing to format anything in that case.

llvm-svn: 330569

6 years ago[CMake] Gate 'dsymutil' dependency
Jonas Devlieghere [Mon, 23 Apr 2018 08:44:06 +0000 (08:44 +0000)]
[CMake] Gate 'dsymutil' dependency

Only add `dsymutil` as a test dependency when this is not a stand-alone
build (LLDB_BUILT_STANDALONE).

llvm-svn: 330568

6 years agoTest commit access.
Simon Tatham [Mon, 23 Apr 2018 08:41:53 +0000 (08:41 +0000)]
Test commit access.

Should be a harmless trimming of trailing whitespace from a
documentation file.

(There are other instances of trailing whitespace in this file alone.
I've only fixed one of them, on the basis that that way the rest are
still available for other people's commit-access tests :-)

llvm-svn: 330567

6 years ago[Atomics] warn about atomic accesses using libcalls
Tim Northover [Mon, 23 Apr 2018 08:16:24 +0000 (08:16 +0000)]
[Atomics] warn about atomic accesses using libcalls

If an atomic variable is misaligned (and that suspicion is why Clang emits
libcalls at all) the runtime support library will have to use a lock to safely
access it, with potentially very bad performance consequences. There's a very
good chance this is unintentional so it makes sense to issue a warning.

Also give it a named group so people can promote it to an error, or disable it
if they really don't care.

llvm-svn: 330566

6 years ago[AArch64][SVE] Asm: Support for structured ST2, ST3 and ST4 (scalar+imm) store instru...
Sander de Smalen [Mon, 23 Apr 2018 07:50:35 +0000 (07:50 +0000)]
[AArch64][SVE] Asm: Support for structured ST2, ST3 and ST4 (scalar+imm) store instructions.

Reviewers: fhahn, rengolin, javed.absar, SjoerdMeijer, t.p.northover, echristo, evandro, huntergr

Reviewed By: rengolin

Subscribers: tschuett, kristof.beyls, llvm-commits

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

llvm-svn: 330565

6 years ago[PM/LoopUnswitch] Remove a buggy assert in the new loop unswitch.
Chandler Carruth [Mon, 23 Apr 2018 06:58:36 +0000 (06:58 +0000)]
[PM/LoopUnswitch] Remove a buggy assert in the new loop unswitch.

The condition this was asserting doesn't actually hold. I've added
comments to explain why, removed the assert, and added a fun test case
reduced out of 403.gcc.

llvm-svn: 330564