OSDN Git Service

android-x86/external-llvm.git
7 years agoRetire LLVM_BINDIR and friends. They haven't been provided with actual
Joerg Sonnenberger [Sat, 1 Oct 2016 08:03:55 +0000 (08:03 +0000)]
Retire LLVM_BINDIR and friends. They haven't been provided with actual
values since the switch to cmake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283026 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] add fuzzer test for libxml2, finds https://bugzilla.gnome.org/show_bug...
Kostya Serebryany [Sat, 1 Oct 2016 07:37:40 +0000 (07:37 +0000)]
[libFuzzer] add fuzzer test for libxml2, finds https://bugzilla.gnome.org/show_bug.cgi?id=751631

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283024 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_STRTOQ
Joerg Sonnenberger [Sat, 1 Oct 2016 07:35:08 +0000 (07:35 +0000)]
GC HAVE_STRTOQ

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283023 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRetire bugpoint's -R. hack.
Joerg Sonnenberger [Sat, 1 Oct 2016 07:34:18 +0000 (07:34 +0000)]
Retire bugpoint's -R. hack.

It got disconnected during the cmake conversion. For Miscompilation.cpp,
it was purely advisory for the user and the ToolRunner.cpp version was
trying to compensate for libs and bins in the same directory, which
hasn't been the case for a very long time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283022 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] fix a recent bugs (buffer overflow)
Kostya Serebryany [Sat, 1 Oct 2016 07:13:25 +0000 (07:13 +0000)]
[libFuzzer] fix a recent bugs (buffer overflow)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283021 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Cleanup patterns for using VMOVDDUP for broadcasts.
Craig Topper [Sat, 1 Oct 2016 07:11:24 +0000 (07:11 +0000)]
[X86] Cleanup patterns for using VMOVDDUP for broadcasts.

-Remove OptForSize. Not all of the backend follows the same rules for creating broadcasts and there is no conflicting pattern.
-Don't stop selecting VEX VMOVDDUP when AVX512 is supported. We need VLX for EVEX VMOVDDUP.
-Only use VMOVDDUP for v2i64 broadcasts if AVX2 is not supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283020 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "Use StringRef instead of raw pointer in TargetRegistry API (NFC)"
Mehdi Amini [Sat, 1 Oct 2016 07:08:23 +0000 (07:08 +0000)]
Revert "Use StringRef instead of raw pointer in TargetRegistry API (NFC)"

This reverts commit r283017. Creates an infinite loop somehow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283019 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef instead of raw pointers in MCAsmInfo/MCInstrInfo APIs (NFC)
Mehdi Amini [Sat, 1 Oct 2016 06:46:33 +0000 (06:46 +0000)]
Use StringRef instead of raw pointers in MCAsmInfo/MCInstrInfo APIs (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283018 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef instead of raw pointer in TargetRegistry API (NFC)
Mehdi Amini [Sat, 1 Oct 2016 06:25:30 +0000 (06:25 +0000)]
Use StringRef instead of raw pointer in TargetRegistry API (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283017 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef instead of raw pointer in ExecutionEngine
Mehdi Amini [Sat, 1 Oct 2016 06:22:04 +0000 (06:22 +0000)]
Use StringRef instead of raw pointer in ExecutionEngine

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283016 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add EVEX versions of VPBROADCASTW patterns with truncated i32 loads.
Craig Topper [Sat, 1 Oct 2016 06:01:23 +0000 (06:01 +0000)]
[AVX-512] Add EVEX versions of VPBROADCASTW patterns with truncated i32 loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283015 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add VLX command lines to 128 and 256-bit shufffle tests.
Craig Topper [Sat, 1 Oct 2016 06:01:18 +0000 (06:01 +0000)]
[AVX-512] Add VLX command lines to 128 and 256-bit shufffle tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283014 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef in Datalayout API (NFC)
Mehdi Amini [Sat, 1 Oct 2016 05:57:55 +0000 (05:57 +0000)]
Use StringRef in Datalayout API (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283013 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoDIFlags: use StringRef instead of raw pointer (NFC)
Mehdi Amini [Sat, 1 Oct 2016 05:57:50 +0000 (05:57 +0000)]
DIFlags: use StringRef instead of raw pointer (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283012 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "Use StringRef in Datalayout API (NFC)"
Mehdi Amini [Sat, 1 Oct 2016 05:12:48 +0000 (05:12 +0000)]
Revert "Use StringRef in Datalayout API (NFC)"

This reverts commit r283009. Bots are broken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283011 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef in Datalayout API (NFC)
Mehdi Amini [Sat, 1 Oct 2016 04:17:59 +0000 (04:17 +0000)]
Use StringRef in Datalayout API (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283009 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef in Pass Info/Support API (NFC)
Mehdi Amini [Sat, 1 Oct 2016 04:03:30 +0000 (04:03 +0000)]
Use StringRef in Pass Info/Support API (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283008 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef in CommandLine Options handling (NFC)
Mehdi Amini [Sat, 1 Oct 2016 03:43:20 +0000 (03:43 +0000)]
Use StringRef in CommandLine Options handling (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283007 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef instead of raw pointer in MachinePassRegistry (NFC)
Mehdi Amini [Sat, 1 Oct 2016 03:19:41 +0000 (03:19 +0000)]
Use StringRef instead of raw pointer in MachinePassRegistry (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283006 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef in TLI instead of raw pointer (NFC)
Mehdi Amini [Sat, 1 Oct 2016 03:10:48 +0000 (03:10 +0000)]
Use StringRef in TLI instead of raw pointer (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283005 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef in Pass/PassManager APIs (NFC)
Mehdi Amini [Sat, 1 Oct 2016 02:56:57 +0000 (02:56 +0000)]
Use StringRef in Pass/PassManager APIs (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283004 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "AMDGPU: Don't use offen if it is 0"
Mehdi Amini [Sat, 1 Oct 2016 02:35:24 +0000 (02:35 +0000)]
Revert "AMDGPU: Don't use offen if it is 0"

This reverts commit r282999.
Tests are not passing: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/20038

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283003 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove getTargetTriple and update all uses to use the Triple off
Eric Christopher [Sat, 1 Oct 2016 01:50:33 +0000 (01:50 +0000)]
Remove getTargetTriple and update all uses to use the Triple off
of the TargetMachine. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283002 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoStop calling getTargetTriple off of the AsmPrinter and constructing a
Eric Christopher [Sat, 1 Oct 2016 01:50:29 +0000 (01:50 +0000)]
Stop calling getTargetTriple off of the AsmPrinter and constructing a
TargetTriple, just grab it off of the TargetMachine. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283001 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove TargetTriple from AArch64MCInstLower as it's used in few places
Eric Christopher [Sat, 1 Oct 2016 01:50:25 +0000 (01:50 +0000)]
Remove TargetTriple from AArch64MCInstLower as it's used in few places
and can be pulled from the TargetMachine. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283000 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Don't use offen if it is 0
Matt Arsenault [Sat, 1 Oct 2016 01:37:15 +0000 (01:37 +0000)]
AMDGPU: Don't use offen if it is 0

This removes many re-initializations of a base register to 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282999 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef in LTOCodegenerator (NFC)
Mehdi Amini [Sat, 1 Oct 2016 01:18:23 +0000 (01:18 +0000)]
Use StringRef in LTOCodegenerator (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282998 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef in LTOModule implementation (NFC)
Mehdi Amini [Sat, 1 Oct 2016 01:18:16 +0000 (01:18 +0000)]
Use StringRef in LTOModule implementation (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282997 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUse StringRef in Triple API (NFC)
Mehdi Amini [Sat, 1 Oct 2016 01:16:22 +0000 (01:16 +0000)]
Use StringRef in Triple API (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282996 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] implement the -shrink=1 option that tires to make elements of the corpus...
Kostya Serebryany [Sat, 1 Oct 2016 01:04:29 +0000 (01:04 +0000)]
[libFuzzer] implement the -shrink=1 option that tires to make elements of the corpus smaller, off by default

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282995 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[MC] Prevent out of order HashDirective lexing in AsmLexer.
Nirav Dave [Sat, 1 Oct 2016 00:42:32 +0000 (00:42 +0000)]
[MC] Prevent out of order HashDirective lexing in AsmLexer.

To lex hash directives we peek ahead to find component tokens, create a
unified token, and unlex the peeked tokens so the parser does not need
to parse the tokens then. Make sure we do not to lex another hash
directive during peek operation.

This fixes PR28921.

Reviewers: rnk, loladiro

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282992 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ASAN] Add the binder globals on Darwin to llvm.compiler.used to avoid LTO dead-stripping
Mehdi Amini [Sat, 1 Oct 2016 00:05:34 +0000 (00:05 +0000)]
[ASAN] Add the binder globals on Darwin to llvm.compiler.used to avoid LTO dead-stripping

The binder is in a specific section that "reverse" the edges in a
regular dead-stripping: the binder is live as long as a global it
references is live.

This is a big hammer that prevents LLVM from dead-stripping these,
while still allowing linker dead-stripping (with special knowledge
of the section).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282988 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] remove some experimental code
Kostya Serebryany [Fri, 30 Sep 2016 23:29:27 +0000 (23:29 +0000)]
[libFuzzer] remove some experimental code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282983 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[llvm-objdump] Switch to a range loop. NFCI.
Davide Italiano [Fri, 30 Sep 2016 23:22:42 +0000 (23:22 +0000)]
[llvm-objdump] Switch to a range loop. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282982 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoScheduleDAGInstrs: Cleanup, use range based for; NFC
Matthias Braun [Fri, 30 Sep 2016 23:08:07 +0000 (23:08 +0000)]
ScheduleDAGInstrs: Cleanup, use range based for; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282979 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] fix openssl fuzzer tests when running on a machine w/o openssl installed
Kostya Serebryany [Fri, 30 Sep 2016 22:35:08 +0000 (22:35 +0000)]
[libFuzzer] fix openssl fuzzer tests when running on a machine w/o openssl installed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282972 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] remove unused option
Kostya Serebryany [Fri, 30 Sep 2016 22:29:57 +0000 (22:29 +0000)]
[libFuzzer] remove unused option

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282971 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SEH] Emit the parent frame offset label even if there are no funclets
Reid Kleckner [Fri, 30 Sep 2016 22:10:12 +0000 (22:10 +0000)]
[SEH] Emit the parent frame offset label even if there are no funclets

This avoids errors about references to undefined local labels from
unreferenced filter functions.

Fixes (sort of) PR30431

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282967 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Use the helper functions for the checks
Quentin Colombet [Fri, 30 Sep 2016 21:46:21 +0000 (21:46 +0000)]
[AArch64][RegisterBankInfo] Use the helper functions for the checks

This makes sure the helper functions work as expected.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282961 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Rename getValueMappingIdx to getValueMapping
Quentin Colombet [Fri, 30 Sep 2016 21:46:19 +0000 (21:46 +0000)]
[AArch64][RegisterBankInfo] Rename getValueMappingIdx to getValueMapping

We don't return index, we return the actual ValueMapping.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282960 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Compress the ValueMapping table a bit.
Quentin Colombet [Fri, 30 Sep 2016 21:46:17 +0000 (21:46 +0000)]
[AArch64][RegisterBankInfo] Compress the ValueMapping table a bit.

We don't need to have singleton ValueMapping on their own, we can just
reuse one of the elements of the 3-ops mapping.
This allows even more code sharing.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282959 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Refactor the code to access AArch64::ValMapping
Quentin Colombet [Fri, 30 Sep 2016 21:46:15 +0000 (21:46 +0000)]
[AArch64][RegisterBankInfo] Refactor the code to access AArch64::ValMapping

Use a helper function to access ValMapping. This should make the code
easier to understand and maintain.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282958 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Rename getRegBankIdx to getRegBankIdxOffset
Quentin Colombet [Fri, 30 Sep 2016 21:46:12 +0000 (21:46 +0000)]
[AArch64][RegisterBankInfo] Rename getRegBankIdx to getRegBankIdxOffset

The function name did not make it clear that the returned value was an
offset to apply to a register bank index.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282957 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Use the static opds mapping for alt mappings
Quentin Colombet [Fri, 30 Sep 2016 21:45:56 +0000 (21:45 +0000)]
[AArch64][RegisterBankInfo] Use the static opds mapping for alt mappings

Avoid to rely on the dynamically allocated operands mapping for the
alternative mapping.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282956 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] move common parts of shell scripts into a separate file
Kostya Serebryany [Fri, 30 Sep 2016 21:12:30 +0000 (21:12 +0000)]
[libFuzzer] move common parts of shell scripts into a separate file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282954 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libfuzzer] sancov documentation update
Mike Aizatsky [Fri, 30 Sep 2016 21:07:04 +0000 (21:07 +0000)]
[libfuzzer] sancov documentation update

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282953 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoNFC Add const
Piotr Padlewski [Fri, 30 Sep 2016 21:05:55 +0000 (21:05 +0000)]
NFC Add const

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282952 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoNFC fix class members initialization
Piotr Padlewski [Fri, 30 Sep 2016 21:05:52 +0000 (21:05 +0000)]
NFC fix class members initialization

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282951 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoNFC fix doxygen comments
Piotr Padlewski [Fri, 30 Sep 2016 21:05:49 +0000 (21:05 +0000)]
NFC fix doxygen comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282950 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoDo not pass a superblock to PDBFileBuilder.
Rui Ueyama [Fri, 30 Sep 2016 20:52:12 +0000 (20:52 +0000)]
Do not pass a superblock to PDBFileBuilder.

When we create a PDB file using PDBFileBuilder, the information
in the superblock, such as the size of the resulting file, is not
available.

Previously, PDBFileBuilder::initialize took a superblock assuming
that all the members of the struct are correct. That is useful when
you want to restore the exact information from a YAML file, but
that's probably the only use case in which that is useful.
When we are creating a PDB file on the fly, we have to backfill the
members.

This patch redefines PDBFileBuilder::initialize to take only a
block size. Now all the other members are left as default values,
so that they'll be updated when commit() is called.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282944 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoPass a filename instead of a msf::WritableStream to PDBFileBuilder::commit.
Rui Ueyama [Fri, 30 Sep 2016 20:34:44 +0000 (20:34 +0000)]
Pass a filename instead of a msf::WritableStream to PDBFileBuilder::commit.

WritableStream needs the exact file size to open a file, but
until we fix the final layout of a PDB file, we don't know the
size of the file.

This patch changes the parameter type of PDBFileBuilder::commit
to solve that chiecken-and-egg problem. Now the function opens
a file after fixing the layout, so it can create a file with the
exact size.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282940 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSort LLVM_VERSION_INFO
Joerg Sonnenberger [Fri, 30 Sep 2016 20:34:02 +0000 (20:34 +0000)]
Sort LLVM_VERSION_INFO

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282939 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC left-over from workarounds for missing pid_t and size_t
Joerg Sonnenberger [Fri, 30 Sep 2016 20:32:42 +0000 (20:32 +0000)]
GC left-over from workarounds for missing pid_t and size_t

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282938 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC ENABLE_PIC
Joerg Sonnenberger [Fri, 30 Sep 2016 20:30:25 +0000 (20:30 +0000)]
GC ENABLE_PIC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282936 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE___DSO_HANDLE
Joerg Sonnenberger [Fri, 30 Sep 2016 20:29:19 +0000 (20:29 +0000)]
GC HAVE___DSO_HANDLE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282935 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoCorrectly expand HOST_LINK_VERSION.
Joerg Sonnenberger [Fri, 30 Sep 2016 20:28:42 +0000 (20:28 +0000)]
Correctly expand HOST_LINK_VERSION.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282934 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix expansion of HAVE_SYS_MMAN_H
Joerg Sonnenberger [Fri, 30 Sep 2016 20:27:41 +0000 (20:27 +0000)]
Fix expansion of HAVE_SYS_MMAN_H

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282933 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_LINK_EXPORT_DYNAMIC.
Joerg Sonnenberger [Fri, 30 Sep 2016 20:26:31 +0000 (20:26 +0000)]
GC HAVE_LINK_EXPORT_DYNAMIC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282932 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_MMAP and HAVE_MMAP_FILE
Joerg Sonnenberger [Fri, 30 Sep 2016 20:24:54 +0000 (20:24 +0000)]
GC HAVE_MMAP and HAVE_MMAP_FILE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282931 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSpell comment consistently with other library comments.
Joerg Sonnenberger [Fri, 30 Sep 2016 20:24:21 +0000 (20:24 +0000)]
Spell comment consistently with other library comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282930 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSort LINK_POLLY_INTO_TOOLS.
Joerg Sonnenberger [Fri, 30 Sep 2016 20:21:35 +0000 (20:21 +0000)]
Sort LINK_POLLY_INTO_TOOLS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282929 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC STDC_HEADERS.
Joerg Sonnenberger [Fri, 30 Sep 2016 20:19:02 +0000 (20:19 +0000)]
GC STDC_HEADERS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282928 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoDeal with the (historic) MAP_ANONYMOUS vs MAP_ANON directly by using CPP
Joerg Sonnenberger [Fri, 30 Sep 2016 20:17:23 +0000 (20:17 +0000)]
Deal with the (historic) MAP_ANONYMOUS vs MAP_ANON directly by using CPP
to check for the former, don't depend on (dangling) HAVE_MMAP_ANONYMOUS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282925 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRetire NEED_DEV_ZERO_FOR_MMAP. It should be needed only on outdated
Joerg Sonnenberger [Fri, 30 Sep 2016 20:16:01 +0000 (20:16 +0000)]
Retire NEED_DEV_ZERO_FOR_MMAP. It should be needed only on outdated
systems. It wasn't even hooked up in cmake, so problems on such systems
would be visible with 3.9 release already.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282924 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoHAVE_LINK_R is not the only reason why this needs config.h.
Joerg Sonnenberger [Fri, 30 Sep 2016 20:11:21 +0000 (20:11 +0000)]
HAVE_LINK_R is not the only reason why this needs config.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282923 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_LIBDL, HAVE_LIBM and HAVE_LIBOLE32
Joerg Sonnenberger [Fri, 30 Sep 2016 20:09:45 +0000 (20:09 +0000)]
GC HAVE_LIBDL, HAVE_LIBM and HAVE_LIBOLE32

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282922 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSort HAVE_LIBEDIT.
Joerg Sonnenberger [Fri, 30 Sep 2016 20:08:36 +0000 (20:08 +0000)]
Sort HAVE_LIBEDIT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282921 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoX86: Allow conditional tail calls in Win64 "leaf" functions (PR26302)
Hans Wennborg [Fri, 30 Sep 2016 20:07:35 +0000 (20:07 +0000)]
X86: Allow conditional tail calls in Win64 "leaf" functions (PR26302)

We can't use Jcc to leave a Win64 function in general, because that
confuses the unwinder. However, for "leaf" functions, that is, functions
where the return address is always on top of the stack and which don't
have unwind info, it's OK.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282920 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTurn ENABLE_CRASH_OVERRIDES into a 0/1 definition.
Joerg Sonnenberger [Fri, 30 Sep 2016 20:06:19 +0000 (20:06 +0000)]
Turn ENABLE_CRASH_OVERRIDES into a 0/1 definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282919 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoConvert ENABLE_BACKTRACES into a 0/1 definition.
Joerg Sonnenberger [Fri, 30 Sep 2016 20:04:24 +0000 (20:04 +0000)]
Convert ENABLE_BACKTRACES into a 0/1 definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282918 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC TIME_WITH_SYS_TIME and TM_IN_SYS_TIME
Joerg Sonnenberger [Fri, 30 Sep 2016 19:59:58 +0000 (19:59 +0000)]
GC TIME_WITH_SYS_TIME and TM_IN_SYS_TIME

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282917 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC STAT_MACROS_BROKEN.
Joerg Sonnenberger [Fri, 30 Sep 2016 19:58:44 +0000 (19:58 +0000)]
GC STAT_MACROS_BROKEN.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282915 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC NEED_USCORE.
Joerg Sonnenberger [Fri, 30 Sep 2016 19:57:54 +0000 (19:57 +0000)]
GC NEED_USCORE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282914 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTurn LLVM_USE_OPROFILE into a 0/1 definition.
Joerg Sonnenberger [Fri, 30 Sep 2016 19:55:37 +0000 (19:55 +0000)]
Turn LLVM_USE_OPROFILE into a 0/1 definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282909 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTurn LLVM_USE_INTEL_JITEVENTS into a 0/1 definition.
Joerg Sonnenberger [Fri, 30 Sep 2016 19:54:25 +0000 (19:54 +0000)]
Turn LLVM_USE_INTEL_JITEVENTS into a 0/1 definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282908 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTurn LLVM_ENABLE_ABI_BREAKING_CHECKS into a 0/1 definition like
Joerg Sonnenberger [Fri, 30 Sep 2016 19:52:27 +0000 (19:52 +0000)]
Turn LLVM_ENABLE_ABI_BREAKING_CHECKS into a 0/1 definition like
LLVM_ENABLE_THREADS. Include llvm-config.h explicitly in headers to make
sure that the definition is available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282907 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] allow non-splat folds of select cond (ext X), C
Sanjay Patel [Fri, 30 Sep 2016 19:49:22 +0000 (19:49 +0000)]
[InstCombine] allow non-splat folds of select cond (ext X), C

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282906 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert test change in r282894 as it's broken in some platforms.
Dehao Chen [Fri, 30 Sep 2016 19:25:23 +0000 (19:25 +0000)]
Revert test change in r282894 as it's broken in some platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282903 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Coroutines] Part15c: Fix coro-split to correctly handle definitions between coro...
Gor Nishanov [Fri, 30 Sep 2016 19:24:19 +0000 (19:24 +0000)]
[Coroutines] Part15c: Fix coro-split to correctly handle definitions between coro.save and coro.suspend

Summary:
In the case below, %Result.i19 is defined between coro.save and coro.suspend and used after coro.suspend. We need to correctly place such a value into the coroutine frame.

```
  %save = call token @llvm.coro.save(i8* null)
  %Result.i19 = getelementptr inbounds %"struct.lean_future<int>::Awaiter", %"struct.lean_future<int>::Awaiter"* %ref.tmp7, i64 0, i32 0
  %suspend = call i8 @llvm.coro.suspend(token %save, i1 false)
  switch i8 %suspend, label %exit [
    i8 0, label %await.ready
    i8 1, label %exit
  ]
await.ready:
  %val = load i32, i32* %Result.i19

```

Reviewers: majnemer

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282902 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] add tests for non-splat select(ext)
Sanjay Patel [Fri, 30 Sep 2016 19:15:41 +0000 (19:15 +0000)]
[InstCombine] add tests for non-splat select(ext)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282901 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Coroutines] Part15b: Fix dbg information handling in coro-split.
Gor Nishanov [Fri, 30 Sep 2016 19:05:06 +0000 (19:05 +0000)]
[Coroutines] Part15b: Fix dbg information handling in coro-split.

Summary:
Without the fix, if there was a function inlined into the coroutine with debug information, CloneFunctionInto(NewF, &F, VMap, /*ModuleLevelChanges=*/true, Returns); would duplicate all of the debug information including the DICompileUnit.

We know use VMap to indicate that debug metadata for a File, Unit and FunctionType should not be duplicated when we creating clones that will become f.resume, f.destroy and f.cleanup.

Reviewers: majnemer

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282899 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Coroutines] Part 15a: Lower coro.subfn.addr in CoroCleanup
Gor Nishanov [Fri, 30 Sep 2016 18:41:35 +0000 (18:41 +0000)]
[Coroutines] Part 15a: Lower coro.subfn.addr in CoroCleanup

Summary: Not all coro.subfn.addr intrinsics can be eliminated in CoroElide through devirtualization. Those that remain need to be lowered in CoroCleanup.

Reviewers: majnemer

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282897 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoclean up tests and auto-generate checks
Sanjay Patel [Fri, 30 Sep 2016 18:37:34 +0000 (18:37 +0000)]
clean up tests and auto-generate checks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282896 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agocmake: Install the OCaml libraries into a more correct path
Michal Gorny [Fri, 30 Sep 2016 18:34:23 +0000 (18:34 +0000)]
cmake: Install the OCaml libraries into a more correct path

Add a OCAML_INSTALL_PATH variable that can be used to control
the install path for OCaml libraries. The new variable defaults to
${OCAML_STDLIB_PATH}, i.e. the OCaml library path obtained from
the OCaml compiler. Install libraries into "llvm" subdirectory.

This fixes two issues:

1. OCaml library directories differ between systems, and 'lib/ocaml' is
incorrect e.g. on amd64 Gentoo where OCaml is installed
in 'lib64/ocaml'. Therefore, obtain the library path from the OCaml
compiler using 'ocamlc -where' (which is already used to set
OCAML_STDLIB_PATH), which is the method used commonly in OCaml packages.

2. The top-level directory is reserved for the standard library, and has
precedence over local directory in search path. As a result, OCaml
preferred the files installed along with previous LLVM version over the
source tree when building a new version, resulting in two versions being
mixed during the build. The new layout is used commonly by other OCaml
packages, and findlib is able to find the LLVM libraries successfully.

Bug: https://bugs.gentoo.org/559134
Bug: https://bugs.gentoo.org/559624

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282895 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUpdate loop unroller cost model to make sure debug info does not affect optimization...
Dehao Chen [Fri, 30 Sep 2016 18:30:04 +0000 (18:30 +0000)]
Update loop unroller cost model to make sure debug info does not affect optimization decisions.

Summary: Debug info should *not* affect optimization decisions. This patch updates loop unroller cost model to make it not affected by debug info.

Reviewers: davidxl, mzolotukhin

Subscribers: haicheng, llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282894 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] add a fuzzer test that finds CVE-2015-3193
Kostya Serebryany [Fri, 30 Sep 2016 18:16:16 +0000 (18:16 +0000)]
[libFuzzer] add a fuzzer test that finds CVE-2015-3193

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282892 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] add tests for select X, (ext X), C
Sanjay Patel [Fri, 30 Sep 2016 18:10:14 +0000 (18:10 +0000)]
[InstCombine] add tests for select X, (ext X), C

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282891 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[WebAssembly] Make register stackification more conservative
Derek Schuff [Fri, 30 Sep 2016 18:02:54 +0000 (18:02 +0000)]
[WebAssembly] Make register stackification more conservative

Register stackification currently checks VNInfo for changes. Make that
more accurate by testing each intervening instruction for any other defs
to the same virtual register.

Patch by Jacob Gravelle

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282886 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Object] Define Archive::isEmpty().
Rui Ueyama [Fri, 30 Sep 2016 17:54:31 +0000 (17:54 +0000)]
[Object] Define Archive::isEmpty().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282884 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[asan] Support dynamic shadow address instrumentation
Etienne Bergeron [Fri, 30 Sep 2016 17:46:32 +0000 (17:46 +0000)]
[asan] Support dynamic shadow address instrumentation

Summary:
This patch is adding the support for a shadow memory with
dynamically allocated address range.

The compiler-rt needs to export a symbol containing the shadow
memory range.

This is required to support ASAN on windows 64-bits.

Reviewers: kcc, rnk, vitalybuka

Subscribers: zaks.anna, kubabrecka, dberris, llvm-commits, chrisha

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282881 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] Choose VMCNT, EXPCNT, LGKMCNT masks and shifts based on the isa version
Konstantin Zhuravlyov [Fri, 30 Sep 2016 17:01:40 +0000 (17:01 +0000)]
[AMDGPU] Choose VMCNT, EXPCNT, LGKMCNT masks and shifts based on the isa version

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282877 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] Ask subtarget if waitcnt instruction is needed before barrier instruction
Konstantin Zhuravlyov [Fri, 30 Sep 2016 16:50:36 +0000 (16:50 +0000)]
[AMDGPU] Ask subtarget if waitcnt instruction is needed before barrier instruction

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282875 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] Do not run scalar optimization passes at "-O0"
Konstantin Zhuravlyov [Fri, 30 Sep 2016 16:39:24 +0000 (16:39 +0000)]
[AMDGPU] Do not run scalar optimization passes at "-O0"

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282873 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoCVP. Turn marking adds as no wrap on by default (was turned off by 279082)
Artur Pilipenko [Fri, 30 Sep 2016 16:20:08 +0000 (16:20 +0000)]
CVP. Turn marking adds as no wrap on by default (was turned off by 279082)

With 282650 in tree extra no wrap on adds doesn't cause regressions anymore. Reenable the optimzation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282872 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoResubmit "Add llvm::enumerate() to STLExtras."
Zachary Turner [Fri, 30 Sep 2016 15:43:59 +0000 (15:43 +0000)]
Resubmit "Add llvm::enumerate() to STLExtras."

The CL was originally failing due to the use of some C++14
specific features, so I've removed those.  Hopefully this will
satisfy the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282867 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Build all scalar steps for non-uniform induction variables
Matthew Simpson [Fri, 30 Sep 2016 15:13:52 +0000 (15:13 +0000)]
[LV] Build all scalar steps for non-uniform induction variables

When building the steps for scalar induction variables, we previously attempted
to determine if all the scalar users of the induction variable were uniform. If
they were, we would only emit the step corresponding to vector lane zero. This
optimization was too aggressive. We generally don't know the entire set of
induction variable users that will be scalar. We have
isScalarAfterVectorization, but this is only a conservative estimate of the
instructions that will be scalarized. Thus, an induction variable may have
scalar users that aren't already known to be scalar. To avoid emitting unused
steps, we can only check that the induction variable is uniform. This should
fix PR30542.

Reference: https://llvm.org/bugs/show_bug.cgi?id=30542

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282863 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add the ELF object file writer
Dylan McKay [Fri, 30 Sep 2016 14:09:20 +0000 (14:09 +0000)]
[AVR] Add the ELF object file writer

Summary: This adds the ELF32 writer for AVR.

Reviewers: kparzysz

Subscribers: beanz, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282856 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[RegAllocGreedy] Attempt to split unspillable live intervals"
Dylan McKay [Fri, 30 Sep 2016 14:05:15 +0000 (14:05 +0000)]
Revert "[RegAllocGreedy] Attempt to split unspillable live intervals"

It was accidentally committed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282855 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add the assembly instruction printer
Dylan McKay [Fri, 30 Sep 2016 14:01:50 +0000 (14:01 +0000)]
[AVR] Add the assembly instruction printer

Summary:
This change adds the AVR assembly instruction printer.

No tests are included in this patch. I have left them downstream so we can
add them once `llc` successfully runs (there's very few components left
to upstream until this).

Reviewers: arsenm, kparzysz

Subscribers: wdng, beanz, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282854 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[RegAllocGreedy] Attempt to split unspillable live intervals
Dylan McKay [Fri, 30 Sep 2016 13:59:20 +0000 (13:59 +0000)]
[RegAllocGreedy] Attempt to split unspillable live intervals

Summary:
Previously, when allocating unspillable live ranges, we would never
attempt to split. We would always bail out and try last ditch graph
recoloring.

This patch changes this by attempting to split all live intervals before
performing recoloring.

This fixes LLVM bug PR14879.

I can't add test cases for any backends other than AVR because none of
them have small enough register classes to trigger the bug.

Reviewers: qcolombet

Subscribers: MatzeB

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282852 91177308-0d34-0410-b5e6-96231b3b80d8