platform/upstream/llvm.git
5 years ago[AArch64] Disallow the MachO specific .loh directive for windows
Martin Storsjo [Wed, 1 Aug 2018 06:50:18 +0000 (06:50 +0000)]
[AArch64] Disallow the MachO specific .loh directive for windows

Also add a test for it being unsupported for linux.

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

llvm-svn: 338493

5 years ago[X86] When looking for (CMOV C-1, (ADD (CTTZ X), C), (X != 0)) -> (ADD (CMOV (CTTZ...
Craig Topper [Wed, 1 Aug 2018 06:36:20 +0000 (06:36 +0000)]
[X86] When looking for (CMOV C-1, (ADD (CTTZ X), C), (X != 0)) -> (ADD (CMOV (CTTZ X), -1, (X != 0)), C), make sure we really have a compare with 0.

It's not strictly required by the transform of the cmov and the add, but it makes sure we restrict it to the cases we know we want to match.

While there canonicalize the operand order of the cmov to simplify the matching and emitting code.

llvm-svn: 338492

5 years agoRemoved failing StreamTest case
Raphael Isemann [Wed, 1 Aug 2018 06:35:27 +0000 (06:35 +0000)]
Removed failing StreamTest case

The suspicious behavior is obviously because this method reads
OOB memory, so I'll remove it for now and re-add the test alongside
the fix later.

llvm-svn: 338491

5 years ago[test] Convert test for PR36720 to c89
Jonas Hahnfeld [Wed, 1 Aug 2018 06:26:55 +0000 (06:26 +0000)]
[test] Convert test for PR36720 to c89

GCC 4.8.5 defaults to this old C standard. I think we should make the
tests pass a newer -std=c99|c11 but that's too intrusive for now...

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

llvm-svn: 338490

5 years ago[AST] CastExpr: BasePathSize is not large enough.
Roman Lebedev [Wed, 1 Aug 2018 06:06:16 +0000 (06:06 +0000)]
[AST] CastExpr: BasePathSize is not large enough.

Summary:
rC337815 / D49508 had to cannibalize one bit of `CastExprBitfields::BasePathSize` in order to squeeze `PartOfExplicitCast` boolean.
That reduced the maximal value of `PartOfExplicitCast` from 9 bits (~512) down to 8 bits (~256).
Apparently, that mattered. Too bad there weren't any tests.
It caused [[ https://bugs.llvm.org/show_bug.cgi?id=38356 | PR38356 ]].

So we need to increase `PartOfExplicitCast` back at least to 9 bits, or a bit more.
For obvious reasons, we can't do that in `CastExprBitfields` - that would blow up the size of every `Expr`.
So we need to either just add a variable into the `CastExpr` (as done here),
or use `llvm::TrailingObjects`. The latter does not seem to be straight-forward.
Perhaps, that needs to be done not for the `CastExpr` itself, but for all of it's `final` children.

Reviewers: rjmccall, rsmith, erichkeane

Reviewed By: rjmccall

Subscribers: bricci, hans, cfe-commits, waddlesplash

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

llvm-svn: 338489

5 years agoAdded initial unit test for LLDB's Stream class.
Raphael Isemann [Wed, 1 Aug 2018 06:04:48 +0000 (06:04 +0000)]
Added initial unit test for LLDB's Stream class.

Summary:
This adds an initial small unit test for LLDB's Stream class, which should at least cover
most of the functions in the Stream class. StreamString is always in big endian
mode, so that's the only stream byte order path this test covers as of now. Also,
the binary mode still needs to be tested for all print methods.

Also adds some FIXMEs for wrong/strange result values of the Stream class that we hit
while testing those functions.

Reviewers: labath

Reviewed By: labath

Subscribers: probinson, labath, mgorny, lldb-commits

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

llvm-svn: 338488

5 years ago[DWARF] Basic support for producing DWARFv5 .debug_addr section
Victor Leschuk [Wed, 1 Aug 2018 05:48:06 +0000 (05:48 +0000)]
[DWARF] Basic support for producing DWARFv5 .debug_addr section

This revision implements support for generating DWARFv5 .debug_addr section.
The implementation is pretty straight-forward: we just check the dwarf version
and emit section header if needed.

Reviewers: aprantl, dblaikie, probinson

Reviewed by: dblaikie

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

llvm-svn: 338487

5 years ago[libc++] Fix build failures after merging <charconv>
Zhihao Yuan [Wed, 1 Aug 2018 05:21:26 +0000 (05:21 +0000)]
[libc++] Fix build failures after merging <charconv>

Summary:
- fix a stupid unit test typo
- add <charconv> symbols to Linux abilist

Reviewers: EricWF

Subscribers: christof, ldionne, cfe-commits

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

llvm-svn: 338486

5 years ago[InstSimplify] fold extracting from std::pair (1/2)
Hiroshi Inoue [Wed, 1 Aug 2018 04:40:32 +0000 (04:40 +0000)]
[InstSimplify] fold extracting from std::pair (1/2)

This patch intends to enable jump threading when a method whose return type is std::pair<int, bool> or std::pair<bool, int> is inlined.
For example, jump threading does not happen for the if statement in func.

std::pair<int, bool> callee(int v) {
  int a = dummy(v);
  if (a) return std::make_pair(dummy(v), true);
  else return std::make_pair(v, v < 0);
}

int func(int v) {
  std::pair<int, bool> rc = callee(v);
  if (rc.second) {
    // do something
  }

SROA executed before the method inlining replaces std::pair by i64 without splitting in both callee and func since at this point no access to the individual fields is seen to SROA.
After inlining, jump threading fails to identify that the incoming value is a constant due to additional instructions (like or, and, trunc).

This series of patch add patterns in InstructionSimplify to fold extraction of members of std::pair. To help jump threading, actually we need to optimize the code sequence spanning multiple BBs.
These patches does not handle phi by itself, but these additional patterns help NewGVN pass, which calls instsimplify to check opportunities for simplifying instructions over phi, apply phi-of-ops optimization to result in successful jump threading.
SimplifyDemandedBits in InstCombine, can do more general optimization but this patch aims to provide opportunities for other optimizers by supporting a simple but common case in InstSimplify.

This first patch in the series handles code sequences that merges two values using shl and or and then extracts one value using lshr.

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

llvm-svn: 338485

5 years ago[DebugInfo] Fix build failed in clang-x86_64-linux-selfhost-modules.
Hsiangkai Wang [Wed, 1 Aug 2018 04:17:41 +0000 (04:17 +0000)]
[DebugInfo] Fix build failed in clang-x86_64-linux-selfhost-modules.

Only generate symbol difference expression if needed.

llvm-svn: 338484

5 years ago[X86] Adding more test patterns for lea-opt (PR37939)
Jatin Bhateja [Wed, 1 Aug 2018 03:53:27 +0000 (03:53 +0000)]
[X86] Adding more test patterns for lea-opt (PR37939)

Subscribers: llvm-commits

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

llvm-svn: 338483

5 years ago[OpenEmbedded] Explicitly specify -rtlib in tests
Petr Hosek [Wed, 1 Aug 2018 03:30:06 +0000 (03:30 +0000)]
[OpenEmbedded] Explicitly specify -rtlib in tests

Tests added in r338294 implicitly assume that libgcc is the runtime library,
but that's not the case when the user configures Clang to use compiler-rt in
which case these tests will break. Explicitly request libgcc when invoking
clang in these tests to avoid that.

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

llvm-svn: 338482

5 years ago[x86] Fix a really subtle miscompile due to a somewhat glaring bug in
Chandler Carruth [Wed, 1 Aug 2018 03:01:58 +0000 (03:01 +0000)]
[x86] Fix a really subtle miscompile due to a somewhat glaring bug in
EFLAGS copy lowering.

If you have a branch of LLVM, you may want to cherrypick this. It is
extremely unlikely to hit this case empirically, but it will likely
manifest as an "impossible" branch being taken somewhere, and will be
... very hard to debug.

Hitting this requires complex conditions living across complex control
flow combined with some interesting memory (non-stack) initialized with
the results of a comparison. Also, because you have to arrange for an
EFLAGS copy to be in *just* the right place, almost anything you do to
the code will hide the bug. I was unable to reduce anything remotely
resembling a "good" test case from the place where I hit it, and so
instead I have constructed synthetic MIR testing that directly exercises
the bug in question (as well as the good behavior for completeness).

The issue is that we would mistakenly assume any SETcc with a valid
condition and an initial operand that was a register and a virtual
register at that to be a register *defining* SETcc...

It isn't though....

This would in turn cause us to test some other bizarre register,
typically the base pointer of some memory. Now, testing this register
and using that to branch on doesn't make any sense. It even fails the
machine verifier (if you are running it) due to the wrong register
class. But it will make it through LLVM, assemble, and it *looks*
fine... But wow do you get a very unsual and surprising branch taken in
your actual code.

The fix is to actually check what kind of SETcc instruction we're
dealing with. Because there are a bunch of them, I just test the
may-store bit in the instruction. I've also added an assert for sanity
that ensure we are, in fact, *defining* the register operand. =D

llvm-svn: 338481

5 years ago[x86/slh] Add unwind info to several tests to make it more obvious that
Chandler Carruth [Wed, 1 Aug 2018 03:01:10 +0000 (03:01 +0000)]
[x86/slh] Add unwind info to several tests to make it more obvious that
we aren't incorrectly generating any of it when doing SLH.

There was a bug that only occured with SLH that very much looked like it
could be caused by bad unwind info, and so this was a prime suspect.
Turns out that everything is fine, but this way we'll *see* if we end
up, for example, putting things we shouldn't inside the prolog.

llvm-svn: 338480

5 years ago[libc++][C++17] Elementary string conversions for integral types
Zhihao Yuan [Wed, 1 Aug 2018 02:38:30 +0000 (02:38 +0000)]
[libc++][C++17] Elementary string conversions for integral types

Summary:
Major QoI considerations:

- The facility is backported to C++14, same as libstdc++.
- Efforts have been made to minimize the header dependencies.
- The design is friendly to the uses of MSVC intrinsics (`__emulu`, `_umul128`, `_BitScanForward`, `_BitScanForward64`) but not implemented; future contributions are welcome.

Thanks to Milo Yip for contributing the implementation of `__u64toa` and `__u32toa`.

References:
 https://wg21.link/p0067r5
 https://wg21.link/p0682r1

Reviewers: mclow.lists, EricWF

Reviewed By: mclow.lists

Subscribers: ldionne, Quuxplusone, christof, mgorny, cfe-commits

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

llvm-svn: 338479

5 years agoWork around GCC miscompile exposed by r338464.
Richard Smith [Wed, 1 Aug 2018 02:27:18 +0000 (02:27 +0000)]
Work around GCC miscompile exposed by r338464.

See gcc.gnu.org/PR86769 for details of the bug.

llvm-svn: 338478

5 years ago[DebugInfo] Generate fixups as emitting DWARF .debug_line.
Hsiangkai Wang [Wed, 1 Aug 2018 02:18:06 +0000 (02:18 +0000)]
[DebugInfo] Generate fixups as emitting DWARF .debug_line.

It is necessary to generate fixups in .debug_line as relaxation is
enabled due to the address delta may be changed after relaxation.

DWARF will record the mappings of lines and addresses in
.debug_line section. It will encode the information using special
opcodes, standard opcodes and extended opcodes in Line Number
Program. I use DW_LNS_fixed_advance_pc to encode fixed length
address delta and DW_LNE_set_address to encode absolute address
to make it possible to generate fixups in .debug_line section.

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

llvm-svn: 338477

5 years ago[GlobalISel][IRTranslator] Use RPO traversal when visiting blocks to translate.
Amara Emerson [Wed, 1 Aug 2018 02:17:42 +0000 (02:17 +0000)]
[GlobalISel][IRTranslator] Use RPO traversal when visiting blocks to translate.

Previously we were just visiting the blocks in the function in IR order, which
is rather arbitrary. Therefore we wouldn't always visit defs before uses, but
the translation code relies on this assumption in some places.

Only codegen change seen in tests is an elision of a redundant copy.

Fixes PR38396

llvm-svn: 338476

5 years ago[libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since _LIBCPP_BUILDI...
Louis Dionne [Wed, 1 Aug 2018 02:08:59 +0000 (02:08 +0000)]
[libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since _LIBCPP_BUILDING_LIBRARY

Summary: As suggested by Marshall in https://reviews.llvm.org/D49914

Reviewers: mclow.lists, EricWF

Subscribers: christof, dexonsmith, cfe-commits

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

llvm-svn: 338475

5 years ago[analyzer] CallEvent: Add helper methods for obtaining the callee stack frame.
Artem Dergachev [Wed, 1 Aug 2018 01:58:15 +0000 (01:58 +0000)]
[analyzer] CallEvent: Add helper methods for obtaining the callee stack frame.

Newly added methods allow reasoning about the stack frame of the call (as
opposed to the stack frame on which the call was made, which was always
available) - obtain the stack frame context, obtain parameter regions - even if
the call is not going to be (or was not) inlined, i.e. even if the analysis
has never actually entered the stack frame.

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

llvm-svn: 338474

5 years agoSpeculative fix for buildbot failures after r338464.
Richard Smith [Wed, 1 Aug 2018 01:57:49 +0000 (01:57 +0000)]
Speculative fix for buildbot failures after r338464.

llvm-svn: 338473

5 years agoFirst half of C++17's splicing maps and sets
Erik Pilkington [Wed, 1 Aug 2018 01:33:38 +0000 (01:33 +0000)]
First half of C++17's splicing maps and sets

This commit adds a node handle type, (located in __node_handle), and adds
extract() and insert() members to all map and set types, as well as their
implementations in __tree and __hash_table.

The second half of this feature is adding merge() members, which splice nodes
in bulk from one container into another. This will be committed in a follow-up.

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

llvm-svn: 338472

5 years agoAMDGPU: Add clamp bit to dot builtins
Konstantin Zhuravlyov [Wed, 1 Aug 2018 01:32:21 +0000 (01:32 +0000)]
AMDGPU: Add clamp bit to dot builtins

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

llvm-svn: 338471

5 years agoAMDGPU: Add clamp bit to dot intrinsics
Konstantin Zhuravlyov [Wed, 1 Aug 2018 01:31:30 +0000 (01:31 +0000)]
AMDGPU: Add clamp bit to dot intrinsics

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

llvm-svn: 338470

5 years agoSimplify selectELFSectionForGlobal by pulling out the entry size
Eric Christopher [Wed, 1 Aug 2018 01:29:30 +0000 (01:29 +0000)]
Simplify selectELFSectionForGlobal by pulling out the entry size
determination for mergeable sections into a small static function.

llvm-svn: 338469

5 years agoTidy up logic around unique section name creation and remove a
Eric Christopher [Wed, 1 Aug 2018 01:03:34 +0000 (01:03 +0000)]
Tidy up logic around unique section name creation and remove a
mostly unused variable.

llvm-svn: 338468

5 years agoAvoid exposing name for range-based for '__range' variables in lifetime warnings.
Richard Smith [Wed, 1 Aug 2018 01:03:33 +0000 (01:03 +0000)]
Avoid exposing name for range-based for '__range' variables in lifetime warnings.

llvm-svn: 338467

5 years ago[JSONExporter] Try to appease buildbot. NFC.
Michael Kruse [Wed, 1 Aug 2018 00:48:01 +0000 (00:48 +0000)]
[JSONExporter] Try to appease buildbot. NFC.

The compiler does not seem to able move a local variable in the
function's return statement.

llvm-svn: 338466

5 years ago[MachineOutliner] Clean up subtarget handling.
Eli Friedman [Wed, 1 Aug 2018 00:37:20 +0000 (00:37 +0000)]
[MachineOutliner] Clean up subtarget handling.

Call shouldOutlineFromFunctionByDefault, isFunctionSafeToOutlineFrom,
getOutliningType, and getMachineOutlinerMBBFlags using the correct
TargetInstrInfo. And don't create a MachineFunction for a function
declaration.

The call to getOutliningCandidateInfo is still a little weird, but at
least the weirdness is explicitly called out.

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

llvm-svn: 338465

5 years ago[P0936R0] add [[clang::lifetimebound]] attribute
Richard Smith [Wed, 1 Aug 2018 00:33:25 +0000 (00:33 +0000)]
[P0936R0] add [[clang::lifetimebound]] attribute

This patch adds support for a new attribute, [[clang::lifetimebound]], that
indicates that the lifetime of a function result is related to one of the
function arguments. When walking an initializer to make sure that the lifetime
of the initial value is at least as long as the lifetime of the initialized
object, we step through parameters (including the implicit object parameter of
a non-static member function) that are marked with this attribute.

There's nowhere to write an attribute on the implicit object parameter, so in
lieu of that, it may be applied to a function type (where it appears
immediately after the cv-qualifiers and ref-qualifier, which is as close to a
declaration of the implicit object parameter as we have). I'm currently
modeling this in the AST as the attribute appertaining to the function type.

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

llvm-svn: 338464

5 years ago[PATCH] [SLC] Test simplification of pow() for vector types (NFC)
Evandro Menezes [Wed, 1 Aug 2018 00:30:43 +0000 (00:30 +0000)]
[PATCH] [SLC] Test simplification of pow() for vector types (NFC)

Add test case for the simplification of `pow()` for vector types that D50035
enables.

llvm-svn: 338463

5 years ago[Polly-ACC] Fix compilation after r338450. NFC.
Michael Kruse [Wed, 1 Aug 2018 00:27:29 +0000 (00:27 +0000)]
[Polly-ACC] Fix compilation after r338450. NFC.

llvm-svn: 338462

5 years ago[JSONExporter] Replace bundled Jsoncpp with llvm/Support/JSON.h. NFC.
Michael Kruse [Wed, 1 Aug 2018 00:15:16 +0000 (00:15 +0000)]
[JSONExporter] Replace bundled Jsoncpp with llvm/Support/JSON.h. NFC.

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

llvm-svn: 338461

5 years agoAndroid is an environment and we were comparing the android triple
Eric Christopher [Tue, 31 Jul 2018 23:53:24 +0000 (23:53 +0000)]
Android is an environment and we were comparing the android triple
against the OS rather than the environment. Also update other
uses of OS when we meant environment in the android local code.

NFC intended.

llvm-svn: 338460

5 years agoTidy up comment.
Eric Christopher [Tue, 31 Jul 2018 23:53:24 +0000 (23:53 +0000)]
Tidy up comment.

llvm-svn: 338459

5 years agoUse UnknownVendor rather than UnknownArch since they're in two different enums
Eric Christopher [Tue, 31 Jul 2018 23:53:23 +0000 (23:53 +0000)]
Use UnknownVendor rather than UnknownArch since they're in two different enums
and we're switching on vendor and not arch.

llvm-svn: 338458

5 years agoFinal bit of P0063 - make sure that aligned_alloc is available when the underlying...
Marshall Clow [Tue, 31 Jul 2018 23:39:12 +0000 (23:39 +0000)]
Final bit of P0063 - make sure that aligned_alloc is available when the underlying C library supports it

llvm-svn: 338457

5 years ago[compiler-rt] Add a routine to specify the mode used when creating profile dirs.
Matt Davis [Tue, 31 Jul 2018 23:37:24 +0000 (23:37 +0000)]
[compiler-rt] Add a routine to specify the mode used when creating profile dirs.

Summary:
This patch introduces `llvm_profile_set_dir_mode` and `llvm_profile_get_dir_mode` to
the compiler-rt profile API.

Originally, profile data was placed into a directory that was created with a hard-coded
mode value of 0755 (for non-win32 builds).  In certain cases, it can be helpful to create
directories with a different mode other than 0755.  This patch introduces set/get
routines to allow users to specify a desired mode.  The default remains at 0755.

Reviewers: void, probinson

Reviewed By: probinson

Subscribers: probinson, dberris, cfe-commits

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

llvm-svn: 338456

5 years ago[constexpr] Support for constant evaluation of __builtin_memcpy and
Richard Smith [Tue, 31 Jul 2018 23:35:09 +0000 (23:35 +0000)]
[constexpr] Support for constant evaluation of __builtin_memcpy and
__builtin_memmove (in non-type-punning cases).

This is intended to permit libc++ to make std::copy etc constexpr
without sacrificing the optimization that uses memcpy on
trivially-copyable types.

__builtin_strcpy and __builtin_wcscpy are not handled by this change.
They'd be straightforward to add, but we haven't encountered a need for
them just yet.

llvm-svn: 338455

5 years agoTest for the presence of a bunch of new macros for c++17. These macros come from...
Marshall Clow [Tue, 31 Jul 2018 23:29:06 +0000 (23:29 +0000)]
Test for the presence of a bunch of new macros for c++17. These macros come from C11. Part of P0063

llvm-svn: 338454

5 years ago[gcov] Add tests using switch, one with break clauses and one with fallthrough
Marco Castelluccio [Tue, 31 Jul 2018 23:26:50 +0000 (23:26 +0000)]
[gcov] Add tests using switch, one with break clauses and one with fallthrough

llvm-svn: 338453

5 years agoRevert r338354 "[ARM] Revert r337821"
Reid Kleckner [Tue, 31 Jul 2018 23:09:42 +0000 (23:09 +0000)]
Revert r338354 "[ARM] Revert r337821"

Disable ARMCodeGenPrepare by default again. It is causing verifier
failues in V8 that look like:

  Duplicate integer as switch case
  switch i32 %trunc, label %if.end13 [
    i32 0, label %cleanup36
    i32 0, label %if.then8
  ], !dbg !4981
  i32 0
  fatal error: error in backend: Broken function found, compilation aborted!

I will continue reducing the test case and send it along.

llvm-svn: 338452

5 years ago[CodeGen] Convert IslNodeBuilder::getNumberOfIterations to isl++. NFC.
Michael Kruse [Tue, 31 Jul 2018 23:01:50 +0000 (23:01 +0000)]
[CodeGen] Convert IslNodeBuilder::getNumberOfIterations to isl++. NFC.

llvm-svn: 338451

5 years ago[CodeGen] Convert IslNodeBuilder::createForSequential to isl++. NFC.
Michael Kruse [Tue, 31 Jul 2018 22:43:04 +0000 (22:43 +0000)]
[CodeGen] Convert IslNodeBuilder::createForSequential to isl++. NFC.

llvm-svn: 338450

5 years ago[CodeGen] Convert IslNodeBuilder::getUpperBound to isl++. NFC.
Michael Kruse [Tue, 31 Jul 2018 22:42:59 +0000 (22:42 +0000)]
[CodeGen] Convert IslNodeBuilder::getUpperBound to isl++. NFC.

llvm-svn: 338449

5 years ago[WebAssembly] Fix debug info tests after r338437.
David L. Jones [Tue, 31 Jul 2018 22:24:14 +0000 (22:24 +0000)]
[WebAssembly] Fix debug info tests after r338437.

After r338437, debug_ranges are no longer emitted. Previously, this was only
done for DWARF version 5 and above.

llvm-svn: 338448

5 years ago[DWARF] Support for .debug_addr (consumer)
Victor Leschuk [Tue, 31 Jul 2018 22:19:19 +0000 (22:19 +0000)]
[DWARF] Support for .debug_addr (consumer)

  This patch implements basic support for parsing
  and dumping DWARFv5 .debug_addr section.

llvm-svn: 338447

5 years ago[SLC] Refactor the simplication of pow() (NFC)
Evandro Menezes [Tue, 31 Jul 2018 22:11:02 +0000 (22:11 +0000)]
[SLC] Refactor the simplication of pow() (NFC)

Reword comments and minor code reformatting.

llvm-svn: 338446

5 years agoAllow oformat to accept format starting with elf as acceptable format. isOutputFormat...
Rumeet Dhindsa [Tue, 31 Jul 2018 21:58:26 +0000 (21:58 +0000)]
Allow oformat to accept format starting with elf as acceptable format. isOutputFormatBinary returns false in such case.

Example: --oformat elf64-x86-64

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

llvm-svn: 338445

5 years agoRevert r337635 "[Driver] Sanitizer support based on runtime library presence"
Reid Kleckner [Tue, 31 Jul 2018 21:57:35 +0000 (21:57 +0000)]
Revert r337635 "[Driver] Sanitizer support based on runtime library presence"

This change causes issues with distributed build systems, which may only
have compiler binaries without any runtime libraries. See discussion
about this on https://reviews.llvm.org/D15225.

llvm-svn: 338444

5 years ago[llvm-objcopy] Make --strip-debug strip .gdb_index
Fangrui Song [Tue, 31 Jul 2018 21:26:35 +0000 (21:26 +0000)]
[llvm-objcopy] Make --strip-debug strip .gdb_index

Summary:
See binutils-gdb/bfd/elf.c, GNU objcopy also strips .stab* (STABS)
.line* (DWARF 1) .gnu.linkonce.wi.* (linkonce section for .debug_info) but
I'm not sure we need to be compatible with it.

Reviewers: dblaikie, alexshap, jakehehrlich, jhenderson

Reviewed By: alexshap, jakehehrlich

Subscribers: aprantl, JDevlieghere, jakehehrlich, llvm-commits

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

llvm-svn: 338443

5 years agoRevert r338431: "Add DebugCounters to DivRemPairs"
George Burgess IV [Tue, 31 Jul 2018 21:18:44 +0000 (21:18 +0000)]
Revert r338431: "Add DebugCounters to DivRemPairs"

This reverts r338431; the test it added is making buildbots unhappy.
Locally, I can repro the failure on reverse-iteration builds.

llvm-svn: 338442

5 years ago[analyzer] Fix eliding the same destructor twice due to buggy default arguments.
Artem Dergachev [Tue, 31 Jul 2018 21:17:40 +0000 (21:17 +0000)]
[analyzer] Fix eliding the same destructor twice due to buggy default arguments.

Because of incomplete support for CXXDefaultArgExpr, we cannot yet commit to
asserting that the same destructor won't be elided twice.

Suppress the assertion failure for now. Proper support is still an open problem.

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

llvm-svn: 338441

5 years ago[lld] Fix test RUN commands so they don't fail when run in a read-only filesystem.
David L. Jones [Tue, 31 Jul 2018 21:15:58 +0000 (21:15 +0000)]
[lld] Fix test RUN commands so they don't fail when run in a read-only filesystem.

Some test setups run tests in a read-only path, which means that opening the
default output path (a.out) for write will fail. This change adds appropriate -o
flags so the tests will not fail spuriously.

llvm-svn: 338440

5 years ago[CFG] [analyzer] NFC: Enumerate construction context layer kinds.
Artem Dergachev [Tue, 31 Jul 2018 21:12:42 +0000 (21:12 +0000)]
[CFG] [analyzer] NFC: Enumerate construction context layer kinds.

This is a refactoring patch; no functional change intended.

The common part of ConstructionContextLayer and ConstructedObjectKey is
factored out into a new structure, ConstructionContextItem.

Various sub-kinds of ConstructionContextItem are enumerated in order to
provide richer information about construction contexts.

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

llvm-svn: 338439

5 years ago[serialization] PR34728: Don't assume that only a suffix of template
Richard Smith [Tue, 31 Jul 2018 21:01:53 +0000 (21:01 +0000)]
[serialization] PR34728: Don't assume that only a suffix of template
parameters can have default arguments.

At least for function templates and class template partial
specializations, it's possible for a template parameter with a default
argument to be followed by a non-pack template parameter with no default
argument, and this case was not properly handled here.

Testcase by Steve O'Brien!

llvm-svn: 338438

5 years ago[DWARF] Do not create a .debug_ranges section when no ranges are needed.
Wolfgang Pieb [Tue, 31 Jul 2018 20:56:32 +0000 (20:56 +0000)]
[DWARF] Do not create a .debug_ranges section when no ranges are needed.

Reviewers: aprantl

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

llvm-svn: 338437

5 years ago[CFG] [analyzer] Implement function argument construction contexts.
Artem Dergachev [Tue, 31 Jul 2018 20:45:53 +0000 (20:45 +0000)]
[CFG] [analyzer] Implement function argument construction contexts.

In r330377 and r338425 we have already identified what constitutes function
argument constructors and added stubs in order to prevent confusing them
with other temporary object constructors.

Now we implement a ConstructionContext sub-class to carry all the necessary
information about the construction site, namely call expression and argument
index.

On the analyzer side, the patch interacts with the recently implemented
pre-C++17 copy elision support in an interesting manner. If on the CFG side we
didn't find a construction context for the elidable constructor, we build
the CFG as if the elidable constructor is not elided, and the non-elided
constructor within it is a simple temporary. But the same problem may occur
in the analyzer: if the elidable constructor has a construction context but
the analyzer doesn't implement such context yet, the analyzer should also
try to skip copy elision and still inline the non-elided temporary constructor.
This was implemented by adding a "roll back" mechanism: when elision fails,
roll back the changes and proceed as if it's a simple temporary. The approach
is wonky, but i'm fine with that as long as it's merely a defensive mechanism
that should eventually go away once all construction contexts become supported.

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

llvm-svn: 338436

5 years agoAMDGPU: Split amdgcn/r600 fminnum/fmaxnum tests
Matt Arsenault [Tue, 31 Jul 2018 20:38:42 +0000 (20:38 +0000)]
AMDGPU: Split amdgcn/r600 fminnum/fmaxnum tests

R600 breaks on too many things to usefully test changes
with ieee_mode on vs. off.

llvm-svn: 338435

5 years agoELF: Add libcall symbols to the link when LTO is being used.
Peter Collingbourne [Tue, 31 Jul 2018 20:36:17 +0000 (20:36 +0000)]
ELF: Add libcall symbols to the link when LTO is being used.

If any of our inputs are bitcode files, the LTO code generator may create
references to certain library functions that might not be explicit in the
bitcode file's symbol table. If any of those library functions are defined
in a bitcode file in an archive member, we need to arrange to use LTO to
compile those archive members by adding them to the link beforehand.

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

llvm-svn: 338434

5 years ago[analyzer] Move InnerPointerChecker out of alpha.
Reka Kovacs [Tue, 31 Jul 2018 20:27:11 +0000 (20:27 +0000)]
[analyzer] Move InnerPointerChecker out of alpha.

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

llvm-svn: 338433

5 years ago[OpenCL] Forbid size dependent types used as kernel arguments
Alexey Sotkin [Tue, 31 Jul 2018 20:26:43 +0000 (20:26 +0000)]
[OpenCL] Forbid size dependent types used as kernel arguments

Summary:
Size_t, intptr_t, uintptr_t and ptrdiff_t cannot be used as kernel
arguments, according to OpenCL Specification s6.9k:
The size in bytes of these types are implementation-defined and in
addition can also be different for the OpenCL device and the host
processor making it difficult to allocate buffer objects to be passed
as arguments to a kernel declared as pointer to these types.

Patch by: Andrew Savonichev

Reviewers: Anastasia, yaxunl

Subscribers: yaxunl, Anastasia, cfe-commits

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

llvm-svn: 338432

5 years agoAdd DebugCounters to DivRemPairs
George Burgess IV [Tue, 31 Jul 2018 20:07:46 +0000 (20:07 +0000)]
Add DebugCounters to DivRemPairs

For people who don't use DebugCounters, NFCI.

Patch by Zhizhou Yang!

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

llvm-svn: 338431

5 years ago[llvm-mca] Update the help text to reflect "physical" registers. NFC.
Matt Davis [Tue, 31 Jul 2018 20:05:08 +0000 (20:05 +0000)]
[llvm-mca] Update the help text to reflect "physical" registers. NFC.

llvm-svn: 338430

5 years ago[SystemZ] Fix bad assert composition.
Jonas Paulsson [Tue, 31 Jul 2018 19:58:42 +0000 (19:58 +0000)]
[SystemZ]  Fix bad assert composition.

Use '&&' before the string instead of '||'

llvm-svn: 338429

5 years agoDAG: Correct pointer type used for stack slot
Matt Arsenault [Tue, 31 Jul 2018 19:51:20 +0000 (19:51 +0000)]
DAG: Correct pointer type used for stack slot

Correct the address space for the inserted argument
stack slot.

AMDGPU seems to not do anything with this information,
so I don't think this was breaking anything.

llvm-svn: 338428

5 years ago[OpenCL] Check for invalid kernel arguments in array types
Alexey Sotkin [Tue, 31 Jul 2018 19:47:19 +0000 (19:47 +0000)]
[OpenCL] Check for invalid kernel arguments in array types

Summary:
OpenCL specification forbids use of several types as kernel arguments.
This patch improves existing diagnostic to look through arrays.

Patch by: Andrew Savonichev

Reviewers: Anastasia, yaxunl

Subscribers: yaxunl, Anastasia, cfe-commits

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

llvm-svn: 338427

5 years ago[CFG] [analyzer] Add construction contexts for returning C++ objects in ObjC++.
Artem Dergachev [Tue, 31 Jul 2018 19:46:14 +0000 (19:46 +0000)]
[CFG] [analyzer] Add construction contexts for returning C++ objects in ObjC++.

Like any normal funciton, Objective-C message can return a C++ object
in Objective-C++. Such object would require a construction context.

This patch, therefore, is an extension of r327343 onto Objective-C++.

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

llvm-svn: 338426

5 years ago[CFG] [analyzer] Add stubs for constructor and message argument constructors.
Artem Dergachev [Tue, 31 Jul 2018 19:39:37 +0000 (19:39 +0000)]
[CFG] [analyzer] Add stubs for constructor and message argument constructors.

CFG now correctly identifies construction context for temporaries constructed
for the purpose of passing into a function as an argument.

Such context is still not fully implemented because the information it provides
is not rich enough: it doens't contain information about argument index.
It will be addresssed later.

This patch is an extension of r330377 to C++ construct-expressions and
Objective-C message expressions which aren't call-expressions but require
similar handling. C++ new-expressions with placement arguments still remain to
be handled.

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

llvm-svn: 338425

5 years ago[DWARF] Change a test to ensure the creation of a __debug_ranges section.
Wolfgang Pieb [Tue, 31 Jul 2018 19:37:29 +0000 (19:37 +0000)]
[DWARF] Change a test to ensure the creation of a __debug_ranges section.

Reviewer: aprantl
llvm-svn: 338424

5 years ago[CodeView] Add coverage test for r338308 (Fixed crash in type merging)
Alexandre Ganea [Tue, 31 Jul 2018 19:30:03 +0000 (19:30 +0000)]
[CodeView] Add coverage test for r338308 (Fixed crash in type merging)

llvm-svn: 338423

5 years ago[analyzer] Reuse some code in simplifySVal().
Artem Dergachev [Tue, 31 Jul 2018 19:29:25 +0000 (19:29 +0000)]
[analyzer] Reuse some code in simplifySVal().

No functional change intended.

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

llvm-svn: 338422

5 years agoAMDGPU: Break 64-bit arguments into 32-bit pieces
Matt Arsenault [Tue, 31 Jul 2018 19:29:04 +0000 (19:29 +0000)]
AMDGPU: Break 64-bit arguments into 32-bit pieces

llvm-svn: 338421

5 years ago[analyzer] Don't try to simplify mixed Loc/NonLoc expressions.
Artem Dergachev [Tue, 31 Jul 2018 19:26:34 +0000 (19:26 +0000)]
[analyzer] Don't try to simplify mixed Loc/NonLoc expressions.

This fix is similar to r337769 and addresses a regression caused by r337167.

When an operation between a nonloc::LocAsInteger and a non-pointer symbol
is performed, the LocAsInteger-specific part of information is lost.
When the non-pointer symbol is collapsing into a constant, we cannot easily
re-evaluate the result, because we need to recover the missing
LocAsInteger-specific information (eg., integer type, or the very fact that
this pointer was at some point converted to an integer).

Add one more defensive check to prevent crashes on trying to simplify a
SymSymExpr with different Loc-ness of operands.

Differential Revision:

llvm-svn: 338420

5 years agoimport timespec and timespec_get into namespace std if we're under c++17 or later...
Marshall Clow [Tue, 31 Jul 2018 19:25:00 +0000 (19:25 +0000)]
import timespec and timespec_get into namespace std if we're under c++17 or later AND the underlying C library has them. Fixes PR#38220, but doesn't implement all of P0063 yet.

llvm-svn: 338419

5 years agoAMDGPU: Split wide vectors of i16/f16 into 32-bit regs on calls
Matt Arsenault [Tue, 31 Jul 2018 19:17:47 +0000 (19:17 +0000)]
AMDGPU: Split wide vectors of i16/f16 into 32-bit regs on calls

This improves code for the same reasons as scalarizing 32-bit
element vectors.

llvm-svn: 338418

5 years ago[CodeView] Minimal support for S_UNAMESPACE records
Alexandre Ganea [Tue, 31 Jul 2018 19:15:50 +0000 (19:15 +0000)]
[CodeView] Minimal support for S_UNAMESPACE records

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

llvm-svn: 338417

5 years agoAMDGPU: Scalarize vector argument types to calls
Matt Arsenault [Tue, 31 Jul 2018 19:05:14 +0000 (19:05 +0000)]
AMDGPU: Scalarize vector argument types to calls

When lowering calling conventions, prefer to decompose vectors
into the constitute register types. This avoids artifical constraints
to satisfy a wide super-register.

This improves code quality because now optimizations don't need to
deal with the super-register constraint. For example the immediate
folding code doesn't deal with 4 component reg_sequences, so by
breaking the register down earlier the existing immediate folding
code is able to work.

This also avoids the need for the shader input processing code
to manually split vector types.

llvm-svn: 338416

5 years ago[llvm-mca][docs] Replace "temporary" with "physical registers". NFC.
Matt Davis [Tue, 31 Jul 2018 18:59:46 +0000 (18:59 +0000)]
[llvm-mca][docs] Replace "temporary" with "physical registers". NFC.

llvm-svn: 338415

5 years agoFix riscv32-toolchain.c with CLANG_DEFAULT_CXX_STDLIB
Jonas Hahnfeld [Tue, 31 Jul 2018 18:47:48 +0000 (18:47 +0000)]
Fix riscv32-toolchain.c with CLANG_DEFAULT_CXX_STDLIB

This configuration was (again) broken after r338385 because Clang
might be configured to always use libc++.

llvm-svn: 338414

5 years ago[OPENMP] Change linkage of offloading symbols to support dropping
Alexey Bataev [Tue, 31 Jul 2018 18:27:42 +0000 (18:27 +0000)]
[OPENMP] Change linkage of offloading symbols to support dropping
offload targets.

Changed the linkage of omp_offloading.img_start.<triple> and omp_offloading.img_end.<triple> symbols from external to external weak to allow dropping of some targets during linking.

llvm-svn: 338413

5 years ago[X86] WriteBSWAP sched classes are reg-reg only.
Simon Pilgrim [Tue, 31 Jul 2018 18:24:24 +0000 (18:24 +0000)]
[X86] WriteBSWAP sched classes are reg-reg only.

Don't declare them as X86SchedWritePair when the folded class will never be used.

Note: MOVBE (load/store endian conversion) instructions tend to have a very different behaviour to BSWAP.
llvm-svn: 338412

5 years agoIntroduce a new test macro TEST_HAS_C11_FEATURES which is set when the underlying...
Marshall Clow [Tue, 31 Jul 2018 18:23:57 +0000 (18:23 +0000)]
Introduce a new test macro TEST_HAS_C11_FEATURES which is set when the underlying C library has C11 features. In C++17, we use those features. <__config> defines a similar macro, _LIBCPP_HAS_C11_FEATURES, but we don't want to use that in the library-independent parts of the tests, so define the new one. Also add a libc++-specific test to make sure the two stay in sync.

llvm-svn: 338411

5 years ago[llvm-mca][docs] Improve the "How LLVM-MCA works" section.
Andrea Di Biagio [Tue, 31 Jul 2018 18:19:15 +0000 (18:19 +0000)]
[llvm-mca][docs] Improve the "How LLVM-MCA works" section.

llvm-svn: 338410

5 years agoSimplify. NFC.
Rui Ueyama [Tue, 31 Jul 2018 18:13:36 +0000 (18:13 +0000)]
Simplify. NFC.

llvm-svn: 338409

5 years agoRevert "[DebugInfo] Generate DWARF debug information for labels."
Vlad Tsyrklevich [Tue, 31 Jul 2018 18:10:37 +0000 (18:10 +0000)]
Revert "[DebugInfo] Generate DWARF debug information for labels."

This reverts commits r338390 and r338398, they were causing LSan
failures on the ASan bot.

llvm-svn: 338408

5 years ago[X86][SSE] Use ISD::MULHU for constant/non-zero ISD::SRL lowering (PR38151)
Simon Pilgrim [Tue, 31 Jul 2018 18:05:56 +0000 (18:05 +0000)]
[X86][SSE] Use ISD::MULHU for constant/non-zero ISD::SRL lowering (PR38151)

As was done for vector rotations, we can efficiently use ISD::MULHU for vXi8/vXi16 ISD::SRL lowering.

Shift-by-zero cases are still problematic (mainly on v32i8 due to extra AND/ANDN/OR or VPBLENDVB blend masks but v8i16/v16i16 aren't great either if PBLENDW fails) so I've limited this first patch to known non-zero cases if we can't easily use PBLENDW.

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

llvm-svn: 338407

5 years agoMake ICF log output order deterministic.
Rui Ueyama [Tue, 31 Jul 2018 18:04:58 +0000 (18:04 +0000)]
Make ICF log output order deterministic.

This patch does the same thing as r338153 for COFF.
Note that this patch affects only the order of log messages.
The output file is already deterministic.

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

llvm-svn: 338406

5 years ago[COFF, ARM64] Enable SEH for ARM64 Windows
Mandeep Singh Grang [Tue, 31 Jul 2018 17:42:05 +0000 (17:42 +0000)]
[COFF, ARM64] Enable SEH for ARM64 Windows

Reviewers: rnk, mstorsjo, ssijaric, haripul, TomTan

Reviewed By: rnk

Subscribers: kristof.beyls, chrib, cfe-commits

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

llvm-svn: 338405

5 years ago[llvm-mca][x86] Add 32-bit instruction resource tests
Simon Pilgrim [Tue, 31 Jul 2018 17:33:08 +0000 (17:33 +0000)]
[llvm-mca][x86] Add 32-bit instruction resource tests

These aren't exhaustive, but cover some instructions that are only available in 32-bit mode (where would we be without good BCD math performance?).

llvm-svn: 338404

5 years agoResubmit r338340 "[MS Demangler] Better demangling of template arguments."
Zachary Turner [Tue, 31 Jul 2018 17:16:44 +0000 (17:16 +0000)]
Resubmit r338340 "[MS Demangler] Better demangling of template arguments."

This broke the build with GCC, but has since been fixed.

llvm-svn: 338403

5 years ago[X86] Add pattern matching for PMADDUBSW
Craig Topper [Tue, 31 Jul 2018 17:12:08 +0000 (17:12 +0000)]
[X86] Add pattern matching for PMADDUBSW

Summary:
Similar to D49636, but for PMADDUBSW. This instruction has the additional complexity that the addition of the two products saturates to 16-bits rather than wrapping around. And one operand is treated as signed and the other as unsigned.

A C example that triggers this pattern

```
static const int N = 128;

int8_t A[2*N];
uint8_t B[2*N];
int16_t C[N];

void foo() {
  for (int i = 0; i != N; ++i)
    C[i] = MIN(MAX((int16_t)A[2*i]*(int16_t)B[2*i] + (int16_t)A[2*i+1]*(int16_t)B[2*i+1], -32768), 32767);
}
```

Reviewers: RKSimon, spatel, zvi

Reviewed By: RKSimon, zvi

Subscribers: llvm-commits

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

llvm-svn: 338402

5 years ago[X86] Add test cases that could use PMADDUBSW.
Craig Topper [Tue, 31 Jul 2018 17:12:06 +0000 (17:12 +0000)]
[X86] Add test cases that could use PMADDUBSW.

llvm-svn: 338401

5 years ago[X86] Preserve more liveness information in emitStackProbeInline
Francis Visoiu Mistrih [Tue, 31 Jul 2018 16:41:12 +0000 (16:41 +0000)]
[X86] Preserve more liveness information in emitStackProbeInline

This commit fixes two issues with the liveness information after the
call:

1) The code always spills RCX and RDX if InProlog == true, which results
in an use of undefined phys reg.
2) FinalReg, JoinReg, RoundedReg, SizeReg are not added as live-ins to
the basic blocks that use them, therefore they are seen undefined.

https://llvm.org/PR38376

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

llvm-svn: 338400

5 years ago[OPENMP] Prevent problems with linking of the static variables.
Alexey Bataev [Tue, 31 Jul 2018 16:40:15 +0000 (16:40 +0000)]
[OPENMP] Prevent problems with linking of the static variables.

No need to change the linkage, we can avoid the problem using special variable. That points to the original variable and, thus, prevent some of the optimizations that might break the compilation.

llvm-svn: 338399

5 years ago[DebugInfo] Fix build failed in 'clang-cmake-armv8-full'.
Hsiangkai Wang [Tue, 31 Jul 2018 16:22:09 +0000 (16:22 +0000)]
[DebugInfo] Fix build failed in 'clang-cmake-armv8-full'.

Builder clang-cmake-armv8-full failed due to the assembly 'comment'
notation is not '#' in the target. So, I use CHECK-SAME to avoid to
check the comment notation in the same line in the test case.

llvm-svn: 338398

5 years ago[Dominators] Make slow walks shorter
Jakub Kuderski [Tue, 31 Jul 2018 15:53:10 +0000 (15:53 +0000)]
[Dominators] Make slow walks shorter

Summary:
When DFS numbers are not yet calculated for a dominator tree, we have to walk it up to say whether one node dominates some other.

This patch makes the slow walks shorter by only walking until the level of the node we check against is reached. This is because a node cannot possibly dominate something higher in its tree.

When running opt with -O3, the patch results in:
* 25% fewer loop iterations for `opt` (fullLTO)
* 30% fewer loop iterations for sqlite

Reviewers: brzycki, asbirlea, chandlerc, NutshellySima, grosser

Reviewed By: NutshellySima

Subscribers: mehdi_amini, dexonsmith, llvm-commits

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

llvm-svn: 338396

5 years agoFix InstCombine address space assert
Ewan Crawford [Tue, 31 Jul 2018 15:53:03 +0000 (15:53 +0000)]
Fix InstCombine address space assert

Workaround bug where the InstCombine pass was asserting on the IR added in lit
test, where we have a bitcast instruction after a GEP from an addrspace cast.

The second bitcast in the test was getting combined into
`bitcast <16 x i32>* %0 to <16 x i32> addrspace(3)*`, which looks like it should
be an addrspace cast instruction instead. Otherwise if control flow is allowed
to continue as it is now we create a GEP instruction
`<badref> = getelementptr inbounds <16 x i32>, <16 x i32>* %0, i32 0`. However
because the type of this instruction doesn't match the address space we hit an
assert when replacing the bitcast with that GEP.

```
void llvm::Value::doRAUW(llvm::Value*, bool): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed.
```

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

llvm-svn: 338395

5 years ago[llvm-mca][docs] Always use `llvm-mca` in place of `MCA`.
Andrea Di Biagio [Tue, 31 Jul 2018 15:29:10 +0000 (15:29 +0000)]
[llvm-mca][docs] Always use `llvm-mca` in place of `MCA`.

llvm-svn: 338394

5 years ago[clang-tidy] add all clang-tidy modules to plugin
Jonas Toth [Tue, 31 Jul 2018 15:23:49 +0000 (15:23 +0000)]
[clang-tidy] add all clang-tidy modules to plugin

Summary:
This patch addresses PR38359 and adds all existing clang-tidy
modules to the plugin that can be used together with libclang.

Reviewers: alexfh, aaron.ballman, hokein, ilya-biryukov

Reviewed By: alexfh

Subscribers: srhines, mgorny, xazax.hun, cfe-commits

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

llvm-svn: 338393