platform/upstream/llvm.git
7 years ago[X86][AVX512] Add support for VBMI VPERMV3 target shuffle combines
Simon Pilgrim [Sun, 20 Nov 2016 15:24:38 +0000 (15:24 +0000)]
[X86][AVX512] Add support for VBMI VPERMV3 target shuffle combines

llvm-svn: 287496

7 years ago[X86][AVX512] Add support for VBMI VPERMV target shuffle combines
Simon Pilgrim [Sun, 20 Nov 2016 15:05:45 +0000 (15:05 +0000)]
[X86][AVX512] Add support for VBMI VPERMV target shuffle combines

llvm-svn: 287495

7 years ago[X86][AVX512] Add some initial VBMI target shuffle combine tests
Simon Pilgrim [Sun, 20 Nov 2016 14:45:46 +0000 (14:45 +0000)]
[X86][AVX512] Add some initial VBMI target shuffle combine tests

llvm-svn: 287494

7 years ago[X86][AVX512VL] Removed duplicate operation action
Simon Pilgrim [Sun, 20 Nov 2016 14:19:29 +0000 (14:19 +0000)]
[X86][AVX512VL] Removed duplicate operation action

Basic AVX512F already declared uint_to_fp v4i32 as legal

llvm-svn: 287493

7 years agoStrip trailing whitespace
Simon Pilgrim [Sun, 20 Nov 2016 14:05:23 +0000 (14:05 +0000)]
Strip trailing whitespace

llvm-svn: 287492

7 years ago[X86][AVX512F] Add support for uint_to_fp v2i32 to v2f64 on AVX512F-only targets
Simon Pilgrim [Sun, 20 Nov 2016 14:03:23 +0000 (14:03 +0000)]
[X86][AVX512F] Add support for uint_to_fp v2i32 to v2f64 on AVX512F-only targets

Use 512-bit instructions (we already do something similar for uint_to_fp v4i32 to v4f64)

llvm-svn: 287491

7 years agoFix comment typos. NFC.
Simon Pilgrim [Sun, 20 Nov 2016 13:47:59 +0000 (13:47 +0000)]
Fix comment typos. NFC.

Identified by Pedro Giffuni in PR27636.

llvm-svn: 287490

7 years agoFix spelling mistakes in Tools/Tests comments. NFC.
Simon Pilgrim [Sun, 20 Nov 2016 13:31:13 +0000 (13:31 +0000)]
Fix spelling mistakes in Tools/Tests comments. NFC.

Identified by Pedro Giffuni in PR27636.

llvm-svn: 287489

7 years agoFix spelling mistakes in Transforms comments. NFC.
Simon Pilgrim [Sun, 20 Nov 2016 13:19:49 +0000 (13:19 +0000)]
Fix spelling mistakes in Transforms comments. NFC.

Identified by Pedro Giffuni in PR27636.

llvm-svn: 287488

7 years agoFix spelling mistakes in SelectionDAG comments. NFC.
Simon Pilgrim [Sun, 20 Nov 2016 13:14:57 +0000 (13:14 +0000)]
Fix spelling mistakes in SelectionDAG comments. NFC.

Identified by Pedro Giffuni in PR27636.

llvm-svn: 287487

7 years agoFix comment typos. NFC.
Simon Pilgrim [Sun, 20 Nov 2016 13:10:51 +0000 (13:10 +0000)]
Fix comment typos. NFC.

Identified by Pedro Giffuni in PR27636.

llvm-svn: 287486

7 years ago[X86] RegCall - Handling long double arguments
Oren Ben Simhon [Sun, 20 Nov 2016 11:06:07 +0000 (11:06 +0000)]
[X86] RegCall - Handling long double arguments

The change is part of RegCall calling convention support for LLVM.
Long double (f80) requires special treatment as the first f80 parameter is saved in FP0 (floating point stack).
This review present the change and the corresponding tests.

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

llvm-svn: 287485

7 years ago[X86][InlineAsm]Test commit.
Coby Tayree [Sun, 20 Nov 2016 09:31:11 +0000 (09:31 +0000)]
[X86][InlineAsm]Test commit.
Fixing a wrong comment on X86AsmParser.cpp::ParseZ: "true" --> "false"

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

llvm-svn: 287484

7 years agoAdd doxygen comments to immintrin.h's intrinsics.
Ekaterina Romanova [Sun, 20 Nov 2016 08:35:05 +0000 (08:35 +0000)]
Add doxygen comments to immintrin.h's intrinsics.

The doxygen comments are automatically generated based on Sony's intrinsics docu
ment.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream. This patch was internally reviewed by Charles Li.

llvm-svn: 287483

7 years agoFix file name resolution in nested response files
Serge Pavlov [Sun, 20 Nov 2016 06:25:07 +0000 (06:25 +0000)]
Fix file name resolution in nested response files

If a response file in construct `@file` was specified by relative name,
constructs `@file` nested within it were resolved incorrectly if the
flag RelativeNames in call to ExpandResponseFile was set to true.
This feature is used in configuration files, tests for it are in
respective change (see D24933).

llvm-svn: 287482

7 years agoUse auto for obvious types.
Rui Ueyama [Sun, 20 Nov 2016 02:43:44 +0000 (02:43 +0000)]
Use auto for obvious types.

llvm-svn: 287481

7 years agoDo not expose ICF class from the file.
Rui Ueyama [Sun, 20 Nov 2016 02:39:59 +0000 (02:39 +0000)]
Do not expose ICF class from the file.

Also this patch uses file-scope functions instead of class member function.

Now that ICF class is not visible from outside, InputSection class
can no longer be "friend" of it. So I removed the friend relation
and just make it expose the features to public.

llvm-svn: 287480

7 years agoExceptionDemo: remove some undefined behaviour
Saleem Abdulrasool [Sun, 20 Nov 2016 02:36:38 +0000 (02:36 +0000)]
ExceptionDemo: remove some undefined behaviour

The casting based reading of the LSDA could attempt to read unsuitably aligned
data.  Avoid that case by explicitly using a memcpy.  A similar approach is used
in libc++abi to address the same UB.

llvm-svn: 287479

7 years agoExceptionDemo: prefer headers over redeclarations
Saleem Abdulrasool [Sun, 20 Nov 2016 02:36:36 +0000 (02:36 +0000)]
ExceptionDemo: prefer headers over redeclarations

Rather than redeclaring the interfaces for exceptions, prefer using the
`unwind.h` header.  This is vended by at least gcc and clang, and can also be
found by an external unwinding library (e.g. libunwind).  Doing this simplifies
the example to the exception handling itself.  Minor tweaks are the result of
_Unwind_Context_t not being defined, which is just a typedef for struct
_Unwind_Context *.  NFC.

llvm-svn: 287478

7 years ago[bpf] add BPF disassembler
Alexei Starovoitov [Sun, 20 Nov 2016 02:25:00 +0000 (02:25 +0000)]
[bpf] add BPF disassembler

add BPF disassembler, so tools like llvm-objdump can be used:
$ llvm-objdump -d -no-show-raw-insn ./sockex1_kern.o

./sockex1_kern.o: file format ELF64-BPF

Disassembly of section socket1:
bpf_prog1:
       0: r6 = r1
       8: r0 = *(u8 *)skb[23]
      10: *(u32 *)(r10 - 4) = r0
      18: r1 = *(u32 *)(r6 + 4)
      20: if r1 != 4 goto 8
      28: r2 = r10
      30: r2 += -4

ld_imm64 (the only 16-byte insn) and special ld_abs/ld_ind instructions
had to be treated in a special way. The decoders for the rest of the insns
are automatically generated.

Add tests to cover new functionality.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 287477

7 years agoAttempt to fix big-endian buildbots.
Rui Ueyama [Sun, 20 Nov 2016 01:41:28 +0000 (01:41 +0000)]
Attempt to fix big-endian buildbots.

llvm-svn: 287476

7 years agoStyle fix. NFC.
Rui Ueyama [Sun, 20 Nov 2016 01:15:56 +0000 (01:15 +0000)]
Style fix. NFC.

llvm-svn: 287475

7 years agoFix buildbot.
Rui Ueyama [Sun, 20 Nov 2016 01:13:22 +0000 (01:13 +0000)]
Fix buildbot.

llvm-svn: 287474

7 years agoSHA1: unroll loop in hashBlock.
Rui Ueyama [Sun, 20 Nov 2016 01:03:22 +0000 (01:03 +0000)]
SHA1: unroll loop in hashBlock.

This code is taken from public domain.
https://github.com/jsonn/src/blob/trunk/common/lib/libc/hash/sha1/sha1.c

I wrote a sha1 command and ran it on my Xeon E5-2680 v2 2.80GHz machine.
Here is a result. The new hash function is 37% faster than before.

 Performance counter stats for './llvm-sha1-old /ssd/build/bin/lld' (10 runs):

       6640.503687 task-clock (msec)         #    1.001 CPUs utilized            ( +-  0.03% )
                54 context-switches          #    0.008 K/sec                    ( +-  5.03% )
                 5 cpu-migrations            #    0.001 K/sec                    ( +- 31.73% )
           183,803 page-faults               #    0.028 M/sec                    ( +-  0.00% )
    18,527,954,113 cycles                    #    2.790 GHz                      ( +-  0.03% )
     4,993,237,485 stalled-cycles-frontend   #   26.95% frontend cycles idle     ( +-  0.11% )
   <not supported> stalled-cycles-backend
    50,217,149,423 instructions              #    2.71  insns per cycle
                                             #    0.10  stalled cycles per insn  ( +-  0.00% )
     6,094,322,337 branches                  #  917.750 M/sec                    ( +-  0.00% )
        11,778,239 branch-misses             #    0.19% of all branches          ( +-  0.01% )

       6.634017401 seconds time elapsed                                          ( +-  0.03% )

 Performance counter stats for './llvm-sha1-new /ssd/build/bin/lld' (10 runs):

       4167.062720 task-clock (msec)         #    1.001 CPUs utilized            ( +-  0.02% )
                52 context-switches          #    0.012 K/sec                    ( +- 16.45% )
                 7 cpu-migrations            #    0.002 K/sec                    ( +- 32.20% )
           183,804 page-faults               #    0.044 M/sec                    ( +-  0.00% )
    11,626,611,958 cycles                    #    2.790 GHz                      ( +-  0.02% )
     4,491,897,976 stalled-cycles-frontend   #   38.63% frontend cycles idle     ( +-  0.05% )
   <not supported> stalled-cycles-backend
    24,320,180,617 instructions              #    2.09  insns per cycle
                                             #    0.18  stalled cycles per insn  ( +-  0.00% )
     1,574,674,576 branches                  #  377.886 M/sec                    ( +-  0.00% )
        11,769,693 branch-misses             #    0.75% of all branches          ( +-  0.00% )

       4.163251552 seconds time elapsed                                          ( +-  0.02% )

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

llvm-svn: 287473

7 years agoDemangle: remove references to allocator for default allocator
Saleem Abdulrasool [Sun, 20 Nov 2016 00:20:27 +0000 (00:20 +0000)]
Demangle: remove references to allocator for default allocator

The demangler had stopped using a custom allocator but had not been updated to
remove the use of the explicit allocator passing.  This removes that as we do
not need to do anything special here anymore.  This just makes the code more
compact.  NFC.

llvm-svn: 287472

7 years agoDemangle: remove unnecessary typedef for std::vector
Saleem Abdulrasool [Sun, 20 Nov 2016 00:20:25 +0000 (00:20 +0000)]
Demangle: remove unnecessary typedef for std::vector

We could create a local typedef for std::vector called Vector.  Inline the use
of std::vector rather than use the typedef.  NFC.

llvm-svn: 287471

7 years agoDemangle: replace custom typedef for std::string with std::string
Saleem Abdulrasool [Sun, 20 Nov 2016 00:20:23 +0000 (00:20 +0000)]
Demangle: replace custom typedef for std::string with std::string

We created a local typedef for `std::basic_string<char, std::char_traits<char>>`
which is just `std::string`.  Remove the local typedef and propagate the type
information through the rest of the demangler.  NFC.

llvm-svn: 287470

7 years agoDemangle: use direct member initialization (NFC)
Saleem Abdulrasool [Sun, 20 Nov 2016 00:20:20 +0000 (00:20 +0000)]
Demangle: use direct member initialization (NFC)

Prefer direct member initialization over the explicit out-of-line initialization
for the construction of the local type.  NFC.

llvm-svn: 287469

7 years agoRemove a file that is too short to be an independent file.
Rui Ueyama [Sat, 19 Nov 2016 23:26:41 +0000 (23:26 +0000)]
Remove a file that is too short to be an independent file.

We have a .cpp and a .h for parseDynamicList(). This patch
moves the function to DriverUtil.cpp.

llvm-svn: 287468

7 years agoRemove unused #include.
Rui Ueyama [Sat, 19 Nov 2016 23:18:43 +0000 (23:18 +0000)]
Remove unused #include.

llvm-svn: 287467

7 years agoRefactor ICF.
Rui Ueyama [Sat, 19 Nov 2016 23:14:23 +0000 (23:14 +0000)]
Refactor ICF.

In order to use forEachGroup in the final loop in ICF::run,
I changed some function parameter types.

llvm-svn: 287466

7 years agobuiltins: Allow building windows arm functions for mingw
Martin Storsjo [Sat, 19 Nov 2016 21:22:38 +0000 (21:22 +0000)]
builtins: Allow building windows arm functions for mingw

When building with clang/LLVM in MSVC mode, the msvcrt libraries contain
these functions.

When building in a mingw environment, we need to provide them somehow,
e.g. via compiler-rt.

The aeabi divmod functions work in the same way as the corresponding
__rt_*div* functions for windows, but their parameters are swapped.
The functions for converting float to integer and vice versa are the
same as their aeabi equivalents, only with different function names.

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

llvm-svn: 287465

7 years ago[ARM|ASAN] Disabling more unstable ASAN tests
Renato Golin [Sat, 19 Nov 2016 21:19:19 +0000 (21:19 +0000)]
[ARM|ASAN] Disabling more unstable ASAN tests

We're seeying these errors with GCC and Clang on different systems, while
some other identical OSs on different boards fail. Like many other ASAN
tests, there seem to be no easy way to investigate this other than someone
familiar with the sanitizer code and the ARM libraries.

At least, for now, we'll silence the bots. I'll create a bugzilla entry.

llvm-svn: 287464

7 years ago[CMake] Fixing clang standalone build
Chris Bieneman [Sat, 19 Nov 2016 21:14:59 +0000 (21:14 +0000)]
[CMake] Fixing clang standalone build

I broke this in r287406 and r287407.

llvm-svn: 287463

7 years agoGive some helper classes/functions internal linkage. NFC.
Benjamin Kramer [Sat, 19 Nov 2016 20:44:26 +0000 (20:44 +0000)]
Give some helper classes/functions internal linkage. NFC.

llvm-svn: 287462

7 years ago[X86][SSE] Improve PSHUFB lowering from either input
Simon Pilgrim [Sat, 19 Nov 2016 20:41:48 +0000 (20:41 +0000)]
[X86][SSE] Improve PSHUFB lowering from either input

Canonicalization may leave the zeroable vector in the first input.

llvm-svn: 287461

7 years agoUse std::equal instead of hand-written loops.
Rui Ueyama [Sat, 19 Nov 2016 20:15:55 +0000 (20:15 +0000)]
Use std::equal instead of hand-written loops.

llvm-svn: 287460

7 years ago[X86][AVX512] Add VPERMV/VPERMV3 v64i8 byte shuffles on avx512vbmi targets
Simon Pilgrim [Sat, 19 Nov 2016 20:12:34 +0000 (20:12 +0000)]
[X86][AVX512] Add VPERMV/VPERMV3 v64i8 byte shuffles on avx512vbmi targets

llvm-svn: 287459

7 years agoRemove alignment from ctors/dtors lists in an attempt to placate LTO.
John McCall [Sat, 19 Nov 2016 20:12:25 +0000 (20:12 +0000)]
Remove alignment from ctors/dtors lists in an attempt to placate LTO.

llvm-svn: 287458

7 years agoRestore a comment that was accidentally changed.
Rui Ueyama [Sat, 19 Nov 2016 19:26:52 +0000 (19:26 +0000)]
Restore a comment that was accidentally changed.

llvm-svn: 287457

7 years agoUse Optional<std::string> instead of "" to represent a failure.
Rui Ueyama [Sat, 19 Nov 2016 19:23:58 +0000 (19:23 +0000)]
Use Optional<std::string> instead of "" to represent a failure.

llvm-svn: 287456

7 years agoMake buildSysrootedPath file-scoped.
Rui Ueyama [Sat, 19 Nov 2016 19:23:56 +0000 (19:23 +0000)]
Make buildSysrootedPath file-scoped.

This patch also changes its return type to simplify callers.

llvm-svn: 287455

7 years agoSimplify "missing argument" error message.
Rui Ueyama [Sat, 19 Nov 2016 18:49:38 +0000 (18:49 +0000)]
Simplify "missing argument" error message.

We do not have an option taking more than one arguments,
so we can just say "missing argument" instead of "missing argument(s)".

llvm-svn: 287454

7 years ago[ThinLTO] Fix crash when importing an opaque type
Mehdi Amini [Sat, 19 Nov 2016 18:44:16 +0000 (18:44 +0000)]
[ThinLTO] Fix crash when importing an opaque type

It seems that because ThinLTO does not import the full module,
some invariant of the type mapper are broken.

In Monolithic LTO, we import every globals: when calling
IRLinker::copyFunctionProto() on @foo(), we end-up calling
TypeMapTy::get(FTy) on the type of @foo(), which will map
%0 and record the destination as opaque.

ThinLTO skips this because @foo is not imported and goes directly
to the next stage.

Next we call computeTypeMapping() that map the types for each
globals, and ends up checking for type isomorphism, and may add
type mapping. However it doesn't record if there was an opaque
destination type that was resolved.

Instead of lazily "discovering" opaque type in the destination
module on the go, we change the TypeFinder to eagerly record all
types and not only the named ones.

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

llvm-svn: 287453

7 years agoSplit getFdeEncoding.
Rui Ueyama [Sat, 19 Nov 2016 18:44:09 +0000 (18:44 +0000)]
Split getFdeEncoding.

llvm-svn: 287452

7 years agoFix typo in error message.
Rui Ueyama [Sat, 19 Nov 2016 18:34:55 +0000 (18:34 +0000)]
Fix typo in error message.

llvm-svn: 287451

7 years ago[ThinLTO] Implement -pass-remarks-output in ThinLTOCodeGenerator
Mehdi Amini [Sat, 19 Nov 2016 18:20:05 +0000 (18:20 +0000)]
[ThinLTO] Implement -pass-remarks-output in ThinLTOCodeGenerator

Summary:
This will also be added to the LTO API, right now this will
bring ThinLTO on par with Monolithic LTO on Darwin.

Reviewers: anemet

Subscribers: tejohnson, llvm-commits

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

llvm-svn: 287450

7 years agoChange setDiagnosticsOutputFile to take a unique_ptr from a raw pointer (NFC)
Mehdi Amini [Sat, 19 Nov 2016 18:19:41 +0000 (18:19 +0000)]
Change setDiagnosticsOutputFile to take a unique_ptr from a raw pointer (NFC)

Summary:
This makes it explicit that ownership is taken. Also replace all `new`
with make_unique<> at call sites.

Reviewers: anemet

Subscribers: llvm-commits

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

llvm-svn: 287449

7 years ago[ELF] - Exit on --version call.
George Rimar [Sat, 19 Nov 2016 18:14:24 +0000 (18:14 +0000)]
[ELF] - Exit on --version call.

GNU linkers disagree here.
Though both -version and -v are mentioned
in help to print the version information, GNU ld just normally exits,
while gold can continue linking. We are compatible with ld.bfd here.

This fixes PR31057.

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

llvm-svn: 287448

7 years ago[X86][AVX512] Add avx512vbmi tests
Simon Pilgrim [Sat, 19 Nov 2016 18:12:48 +0000 (18:12 +0000)]
[X86][AVX512] Add avx512vbmi tests

llvm-svn: 287447

7 years agoSimplify. NFC.
Rui Ueyama [Sat, 19 Nov 2016 18:05:58 +0000 (18:05 +0000)]
Simplify. NFC.

llvm-svn: 287446

7 years agoChange filler type from ArrayRef<uint8_t> to uint32_t.
Rui Ueyama [Sat, 19 Nov 2016 18:05:56 +0000 (18:05 +0000)]
Change filler type from ArrayRef<uint8_t> to uint32_t.

Filler expressions in linker script "=fillexp" are always handled
as 32-bit integers. Thus the new type is more natural.

llvm-svn: 287445

7 years ago[X86][AVX512] Added some more complex v64i8 shuffles
Simon Pilgrim [Sat, 19 Nov 2016 17:50:14 +0000 (17:50 +0000)]
[X86][AVX512] Added some more complex v64i8 shuffles

llvm-svn: 287444

7 years ago[X86] Simplify some code a little by removing a dulicate variable and combinining...
Craig Topper [Sat, 19 Nov 2016 17:33:17 +0000 (17:33 +0000)]
[X86] Simplify some code a little by removing a dulicate variable and combinining two if statements. NFCI

llvm-svn: 287443

7 years agoTry again to fix unused variable warning on lld-x86_64-darwin13 after r287439.
Daniel Sanders [Sat, 19 Nov 2016 14:47:41 +0000 (14:47 +0000)]
Try again to fix unused variable warning on lld-x86_64-darwin13 after r287439.

The previous attempt didn't work. I assume LLVM_ATTRIBUTE_UNUSED isn't
available on that machine.

llvm-svn: 287442

7 years agoTry to fix unused variable warning on lld-x86_64-darwin13 after r287439.
Daniel Sanders [Sat, 19 Nov 2016 13:50:32 +0000 (13:50 +0000)]
Try to fix unused variable warning on lld-x86_64-darwin13 after r287439.

Whether the variable is used or not depends on NDEBUG.

llvm-svn: 287440

7 years agoCheck that emitted instructions meet their predicates on all targets except ARM,...
Daniel Sanders [Sat, 19 Nov 2016 13:05:44 +0000 (13:05 +0000)]
Check that emitted instructions meet their predicates on all targets except ARM, Mips, and X86.

Summary:
* ARM is omitted from this patch because this check appears to expose bugs in this target.
* Mips is omitted from this patch because this check either detects bugs or deliberate
  emission of instructions that don't satisfy their predicates. One deliberate
  use is the SYNC instruction where the version with an operand is correctly
  defined as requiring MIPS32 while the version without an operand is defined
  as an alias of 'SYNC 0' and requires MIPS2.
* X86 is omitted from this patch because it doesn't use the tablegen-erated
  MCCodeEmitter infrastructure.

Patches for ARM and Mips will follow.

Depends on D25617

Reviewers: tstellarAMD, jmolloy

Subscribers: wdng, jmolloy, aemerson, rengolin, arsenm, jyknight, nemanjai, nhaehnle, tstellarAMD, llvm-commits

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

llvm-svn: 287439

7 years ago[tablegen] Merge duplicate definitions of getMinimalTypeForRange. NFC.
Daniel Sanders [Sat, 19 Nov 2016 12:21:34 +0000 (12:21 +0000)]
[tablegen] Merge duplicate definitions of getMinimalTypeForRange. NFC.

Summary: Depends on D25614

Reviewers: qcolombet

Subscribers: qcolombet, beanz, mgorny, llvm-commits

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

llvm-svn: 287438

7 years agoIntroduce a helper class for building complex constant initializers. NFC.
John McCall [Sat, 19 Nov 2016 08:17:24 +0000 (08:17 +0000)]
Introduce a helper class for building complex constant initializers.  NFC.

I've adopted this in most of the places it makes sense, but v-tables
and CGObjCMac will need a second pass.

llvm-svn: 287437

7 years agoDoxygen comments for avxintrin.h.
Ekaterina Romanova [Sat, 19 Nov 2016 04:59:08 +0000 (04:59 +0000)]
Doxygen comments for avxintrin.h.

Added doxygen comments to avxintrin.h's intrinsics. As of now, all the intrinsics in this file that were documented by Sony's intrinsics guide should have corresponding doxygen comments.

Note: The doxygen comments are automatically generated based on Sony's intrinsic
s document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.

Reviewed by Wolfgang Pieb.

llvm-svn: 287436

7 years agoFix stdint/cstdint modules
Eric Fiselier [Sat, 19 Nov 2016 03:29:03 +0000 (03:29 +0000)]
Fix stdint/cstdint modules

llvm-svn: 287435

7 years ago[CMake] llvm-lto2 depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 03:19:58 +0000 (03:19 +0000)]
[CMake] llvm-lto2 depends on intrinsics_gen

llvm-lto2.cpp has the following include chain:

llvm/LTO/Caching.h
llvm/LTO/LTO.h
llvm/CodeGen/Analysis.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-lto2 needs to depend on intrinsics_gen.

llvm-svn: 287434

7 years ago[CMake] opt depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 03:18:50 +0000 (03:18 +0000)]
[CMake] opt depends on intrinsics_gen

AnalysisWrappers.cpp has the following include chain:

llvm/Analysis/CallGraph.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means opt needs to depend on intrinsics_gen.

llvm-svn: 287433

7 years ago[CMake] llvm-nm depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 03:16:33 +0000 (03:16 +0000)]
[CMake] llvm-nm depends on intrinsics_gen

llvm-nm.cpp has the following include chain:

llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-nm needs to depend on intrinsics_gen.

llvm-svn: 287432

7 years ago[CMake] llvm-link depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:36:28 +0000 (02:36 +0000)]
[CMake] llvm-link depends on intrinsics_gen

llvm-link.cpp has the following include chain:

llvm/Bitcode/BitcodeWriter.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-link needs to depend on intrinsics_gen.

llvm-svn: 287431

7 years ago[CMake] llvm-extract depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:33:57 +0000 (02:33 +0000)]
[CMake] llvm-extract depends on intrinsics_gen

llvm-extract.cpp has the following include chain:

llvm/Bitcode/BitcodeWriterPass.h
llvm/IR/PassManager.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-extract needs to depend on intrinsics_gen.

llvm-svn: 287430

7 years ago[CMake] llvm-dwp depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:33:42 +0000 (02:33 +0000)]
[CMake] llvm-dwp depends on intrinsics_gen

llvm-dwp.cpp has the following include chain:

llvm/CodeGen/AsmPrinter.h
llvm/CodeGen/MachineFunctionPass.h
llvm/CodeGen/MachineFunction.h
llvm/CodeGen/MachineBasicBlock.h
llvm/CodeGen/MachineInstr.h
llvm/Analysis/AliasAnalysis.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-dwp needs to depend on intrinsics_gen.

llvm-svn: 287429

7 years ago[CMake] llvm-dis depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:31:14 +0000 (02:31 +0000)]
[CMake] llvm-dis depends on intrinsics_gen

llvm-dis.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-dis needs to depend on intrinsics_gen.

llvm-svn: 287428

7 years ago[CMake] llvm-diff depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:28:18 +0000 (02:28 +0000)]
[CMake] llvm-diff depends on intrinsics_gen

llvm-diff.cpp has the following include chain:

llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-diff needs to depend on intrinsics_gen.

llvm-svn: 287427

7 years ago[CMake] llvm-stress depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:25:54 +0000 (02:25 +0000)]
[CMake] llvm-stress depends on intrinsics_gen

llvm-stress.cpp has the following include chain:

llvm/Analysis/CallGraphSCCPass.h
llvm/Analysis/CallGraph.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-stress needs to depend on intrinsics_gen.

llvm-svn: 287426

7 years ago[CMake] bugpoint-passes depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:20:59 +0000 (02:20 +0000)]
[CMake] bugpoint-passes depends on intrinsics_gen

TestPasses.cpp has the following include chain:

llvm/IR/InstVisitor.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means bugpoint-passes needs to depend on intrinsics_gen.

llvm-svn: 287425

7 years ago[CMake] llvm-bcanalyzer depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:17:12 +0000 (02:17 +0000)]
[CMake] llvm-bcanalyzer depends on intrinsics_gen

llvm-bcanalyzer.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-bcanalyzer needs to depend on intrinsics_gen.

llvm-svn: 287424

7 years ago[CMake] llvm-as depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:15:04 +0000 (02:15 +0000)]
[CMake] llvm-as depends on intrinsics_gen

llvm-as.cpp has the following include chain:

llvm/Bitcode/BitcodeWriter.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-as needs to depend on intrinsics_gen.

llvm-svn: 287423

7 years ago[CMake] llc depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:12:03 +0000 (02:12 +0000)]
[CMake] llc depends on intrinsics_gen

llc.cpp has the following include chain:

llvm/Analysis/TargetLibraryInfo.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llc needs to depend on intrinsics_gen.

llvm-svn: 287422

7 years ago[CMake] lli-child-target depends on intrinsics gen
Chris Bieneman [Sat, 19 Nov 2016 02:09:51 +0000 (02:09 +0000)]
[CMake] lli-child-target depends on intrinsics gen

Messed up in r287420, it isn't just lli, but also but lli-child-target that need to depend on intrinsics_gen.

llvm-svn: 287421

7 years ago[CMake] lli depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:05:19 +0000 (02:05 +0000)]
[CMake] lli depends on intrinsics_gen

ChildTarget.cpp has the following include chain:

llvm/ExecutionEngine/Orc/OrcABISupport.h
llvm/ExecutionEngine/Orc/IndirectionUtils.h
llvm/IR/IRBuilder.h
llvm/IR/ConstantFolder.h
llvm/IR/InstrTypes.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means lli needs to depend on intrinsics_gen.

llvm-svn: 287420

7 years ago[CMake] llvm-dsymutil depends on intrinsics_gen
Chris Bieneman [Sat, 19 Nov 2016 02:02:46 +0000 (02:02 +0000)]
[CMake] llvm-dsymutil depends on intrinsics_gen

DwarfLinker.cpp has the following include chain:

llvm/CodeGen/AsmPrinter.h
llvm/CodeGen/MachineFunctionPass.h
llvm/CodeGen/MachineFunction.h
llvm/CodeGen/MachineBasicBlock.h
llvm/CodeGen/MachineInstr.h
llvm/Analysis/AliasAnalysis.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-dsymutil needs to depend on intrinsics_gen.

llvm-svn: 287419

7 years agoMark test as unsupported in C++03
Eric Fiselier [Sat, 19 Nov 2016 01:38:00 +0000 (01:38 +0000)]
Mark test as unsupported in C++03

llvm-svn: 287417

7 years ago[AVR] Remove a bunch of unused variables
Dylan McKay [Sat, 19 Nov 2016 01:33:42 +0000 (01:33 +0000)]
[AVR] Remove a bunch of unused variables

llvm-svn: 287416

7 years ago[CMake] Apply sandbox profile to target not directory
Chris Bieneman [Sat, 19 Nov 2016 01:32:09 +0000 (01:32 +0000)]
[CMake] Apply sandbox profile to target not directory

When LLVM_DEPENDENCY_DEBUGGING=On we should apply the sandbox only on the target, not the directory. This is important for directories that create more than one target, or for nested directories.

llvm-svn: 287415

7 years ago[AVR] Remove a variable which was unused in release mode
Dylan McKay [Sat, 19 Nov 2016 01:14:44 +0000 (01:14 +0000)]
[AVR] Remove a variable which was unused in release mode

In release mode where assertions are not enabled, this caused an 'unused
variable' warning.

llvm-svn: 287414

7 years ago[libcxx] Implement locale.h to fix modules build
Eric Fiselier [Sat, 19 Nov 2016 01:14:15 +0000 (01:14 +0000)]
[libcxx] Implement locale.h to fix modules build

Summary:
Because `locale.h` isn't part of the libc++ modules the class definitions it provides are exported as part of `__locale` (since it happens to be build first). This breaks `<clocale>` which exports `std::lconv` without including `<__locale>`.

This patch implements `locale.h` to fix this issue, it also adds support for testing libc++ with modules.

Reviewers: mclow.lists, rsmith, EricWF

Subscribers: cfe-commits

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

llvm-svn: 287413

7 years agoFix some accidental Prints of StringRefs that snuck in.
Zachary Turner [Sat, 19 Nov 2016 00:50:29 +0000 (00:50 +0000)]
Fix some accidental Prints of StringRefs that snuck in.

llvm-svn: 287412

7 years agoSema: As of MSVC 2015, a user-declared move operation causes the deletion of both...
Peter Collingbourne [Sat, 19 Nov 2016 00:30:56 +0000 (00:30 +0000)]
Sema: As of MSVC 2015, a user-declared move operation causes the deletion of both copy operations.

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

llvm-svn: 287411

7 years ago[Sema] Don't allow applying address-of operator to a call to a function
Akira Hatanaka [Sat, 19 Nov 2016 00:13:03 +0000 (00:13 +0000)]
[Sema] Don't allow applying address-of operator to a call to a function
with __unknown_anytype return type.

When the following code is compiled, Sema infers that the type of
__unknown_anytype is double:

extern __unknown_anytype func();
double *d = (double*)&func();

This triggers an assert in CodeGenFunction::EmitCallExprLValue because
it doesn't expect to see a call to a function with a non-reference
scalar return type.

This commit prevents the assert by making VisitUnaryAddrOf error out if
the address-of operator is applied to a call to a function with
__unknown_anytype return type.

rdar://problem/20287610

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

llvm-svn: 287410

7 years agoFix some build errors.
Zachary Turner [Fri, 18 Nov 2016 23:32:37 +0000 (23:32 +0000)]
Fix some build errors.

llvm-svn: 287409

7 years ago[CMake] NFC. Updating CMake dependency specifications
Chris Bieneman [Fri, 18 Nov 2016 23:31:53 +0000 (23:31 +0000)]
[CMake] NFC. Updating CMake dependency specifications

This patch updates a bunch of places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system.

llvm-svn: 287408

7 years ago[CMake] clang depends on intrinsics_gen
Chris Bieneman [Fri, 18 Nov 2016 23:31:16 +0000 (23:31 +0000)]
[CMake] clang depends on intrinsics_gen

cc1_main.cpp has the following include chain:

llvm/LinkAllPasses.h
llvm/Analysis/AliasSetTracker.h
llvm/Analysis/AliasAnalysis.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means clang needs to depend on intrinsics_gen.

llvm-svn: 287407

7 years ago[CMake] clang-offload-bundler depends on intrinsics_gen
Chris Bieneman [Fri, 18 Nov 2016 23:31:14 +0000 (23:31 +0000)]
[CMake] clang-offload-bundler depends on intrinsics_gen

ClangOffloadBundler.cpp has the following include chain:

llvm/Bitcode/BitcodeWriter.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means clang-offload-bundler needs to depend on intrinsics_gen.

llvm-svn: 287406

7 years ago[CMake] verify-uselistorder depends on intrinsics_gen
Chris Bieneman [Fri, 18 Nov 2016 23:30:58 +0000 (23:30 +0000)]
[CMake] verify-uselistorder depends on intrinsics_gen

verify-uselistorder.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means verify-uselistorder needs to depend on intrinsics_gen.

llvm-svn: 287405

7 years ago[CMake] sanstats depends on intrinsics_gen
Chris Bieneman [Fri, 18 Nov 2016 23:30:39 +0000 (23:30 +0000)]
[CMake] sanstats depends on intrinsics_gen

sanstats.cpp has the following include chain:

llvm/Transforms/Utils/SanitizerStats.h
llvm/IR/IRBuilder.h
llvm/IR/ConstantFolder.h
llvm/IR/InstrTypes.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means sanstats needs to depend on intrinsics_gen.

llvm-svn: 287404

7 years ago[lit] When setting SDKROOT on Darwin, use '--sdk macosx' to find the right SDK path.
Kuba Mracek [Fri, 18 Nov 2016 23:25:57 +0000 (23:25 +0000)]
[lit] When setting SDKROOT on Darwin, use '--sdk macosx' to find the right SDK path.

This will make sure that we find an actual path in case you have Command Line Tools installed.

llvm-svn: 287403

7 years ago[CMake] bugpoint depends on intrinsics_gen
Chris Bieneman [Fri, 18 Nov 2016 23:25:30 +0000 (23:25 +0000)]
[CMake] bugpoint depends on intrinsics_gen

CrashDebugger.cpp has the following include chain:

llvm/Analysis/TargetTransformInfo.h
llvm/IR/IntrinsicInst.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means bugpoint needs to depend on intrinsics_gen.

llvm-svn: 287402

7 years agoConvert CommandHistory functions to StringRef.
Zachary Turner [Fri, 18 Nov 2016 23:22:42 +0000 (23:22 +0000)]
Convert CommandHistory functions to StringRef.

llvm-svn: 287401

7 years ago[InstCombine] add tests to show likely unwanted select widening; NFC
Sanjay Patel [Fri, 18 Nov 2016 23:22:00 +0000 (23:22 +0000)]
[InstCombine] add tests to show likely unwanted select widening; NFC

This is a prerequisite patch for D26556:
https://reviews.llvm.org/D26556

...because there was no direct coverage for these folds (which in some cases are adding instructions).

llvm-svn: 287400

7 years ago[CMake] llvm-split depends on intrinsics_gen
Chris Bieneman [Fri, 18 Nov 2016 23:20:38 +0000 (23:20 +0000)]
[CMake] llvm-split depends on intrinsics_gen

llvm-split.cpp has the following include chain:

llvm/Bitcode/BitcodeWriter.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-split needs to depend on intrinsics_gen.

llvm-svn: 287399

7 years ago[CMake] llvm-lto depends on intrinsics_gen
Chris Bieneman [Fri, 18 Nov 2016 23:20:35 +0000 (23:20 +0000)]
[CMake] llvm-lto depends on intrinsics_gen

llvm-lto.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-lto needs to depend on intrinsics_gen.

llvm-svn: 287398

7 years agoRemoving myself from CODE_OWNERS, and distributing those duties among other members...
Enrico Granata [Fri, 18 Nov 2016 23:18:11 +0000 (23:18 +0000)]
Removing myself from CODE_OWNERS, and distributing those duties among other members of the community

That's All, Folks

llvm-svn: 287397

7 years ago[CMake] llvm-ar depends on intrinsics_gen
Chris Bieneman [Fri, 18 Nov 2016 23:04:27 +0000 (23:04 +0000)]
[CMake] llvm-ar depends on intrinsics_gen

llvm-ar.cpp has the following include chain:

llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-ar needs to depend on intrinsics_gen.

llvm-svn: 287395

7 years ago[CMake] llvm-profdata depends on intrinsics_gen
Chris Bieneman [Fri, 18 Nov 2016 23:04:15 +0000 (23:04 +0000)]
[CMake] llvm-profdata depends on intrinsics_gen

llvm-profdata.cpp has the following include chain:

llvm/ProfileData/SampleProfReader.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-profdata needs to depend on intrinsics_gen.

llvm-svn: 287394