OSDN Git Service

android-x86/external-llvm.git
7 years ago[globalisel][tablegen] Change Expected<bool> to Error and rename functions.
Daniel Sanders [Thu, 30 Mar 2017 09:36:33 +0000 (09:36 +0000)]
[globalisel][tablegen] Change Expected<bool> to Error and rename functions.

Functions that still return Expected<X> are now called createAndImport*()

Changing the return type was requested in the review comments for r299001

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

7 years agoMake naming in Host.h in line with coding standards.
Kristof Beyls [Thu, 30 Mar 2017 09:31:59 +0000 (09:31 +0000)]
Make naming in Host.h in line with coding standards.

Based on post-commit review comments by Chandler Carruth on
https://reviews.llvm.org/D31236. Thanks!

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

7 years agoRefactor getHostCPUName to allow testing on non-native hardware.
Kristof Beyls [Thu, 30 Mar 2017 07:24:49 +0000 (07:24 +0000)]
Refactor getHostCPUName to allow testing on non-native hardware.

This refactors getHostCPUName so that for the architectures that get the
host cpu info on linux from /proc/cpuinfo, the /proc/cpuinfo parsing
logic is present in the build, even if it wasn't built on a linux system
for that architecture.

Since the code is present in the build, we can then test that code also
on other systems, i.e. we don't need to have buildbots setup for all
architectures on linux to be able to test this. Instead, developers will
test this as part of the regression test run.

As an example, a few unit tests are added to test getHostCPUName for ARM
running linux. A unit test is preferred over a lit-based test, since the
expectation is that in the future, the functionality here will grow over
what can be tested with "llc -mcpu=native".

This is a preparation step to enable implementing the range of
improvements discussed on PR30516, such as adding AArch64 support,
support for big.LITTLE systems, reducing code duplication.

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

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

7 years ago[APInt] Remove references to integerPartWidth outside of APFloat implentation.
Craig Topper [Thu, 30 Mar 2017 05:49:03 +0000 (05:49 +0000)]
[APInt] Remove references to integerPartWidth outside of APFloat implentation.

Turns out integerPartWidth only explicitly defines the width of the tc functions in the APInt class. Functions that aren't used by APInt implementation itself. Many places in the code base already assume APInt is made up of 64-bit pieces. Explicitly assuming 64-bit here doesn't make that situation much worse. A full audit would need to be done if it ever changes.

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

7 years ago[libFuzzer] remove a stale flag from tests, run value-profile-strncmp.test longer...
Kostya Serebryany [Thu, 30 Mar 2017 04:22:20 +0000 (04:22 +0000)]
[libFuzzer] remove a stale flag from tests, run value-profile-strncmp.test longer (hopefully, will fix the OSX bot)

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

7 years ago[DAGCombine] A shuffle of a splat is always the splat itself
Zvi Rackover [Thu, 30 Mar 2017 01:42:57 +0000 (01:42 +0000)]
[DAGCombine]  A shuffle of a splat is always the splat itself

Summary:
Add a simplification:
shuffle (splat-shuffle), undef, M --> splat-shuffle

Fixes pr32449

Patch by Sanjay Patel

Reviewers: eli.friedman, RKSimon, spatel

Reviewed By: spatel

Subscribers: llvm-commits

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

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

7 years ago[libFuzzer] best effort support for -fsanitize-coverage=trace-pc instrumentation...
Kostya Serebryany [Thu, 30 Mar 2017 01:27:20 +0000 (01:27 +0000)]
[libFuzzer] best effort support for -fsanitize-coverage=trace-pc instrumentation. It is less efficient and precise than -fsanitize-coverage=trace-pc-guard, but still works

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

7 years agoIf the DIUnit has flags passed on it then have DW_AT_producer be a combination of...
Eric Christopher [Wed, 29 Mar 2017 23:34:27 +0000 (23:34 +0000)]
If the DIUnit has flags passed on it then have DW_AT_producer be a combination of DICompileUnit::Producer and Flags.
The darwin behavior is unchanged and will continue to use DW_AT_APPLE_flags.

Patch by Zhizhou Yang

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

7 years ago[codeview] Fix buggy BeginIndexMapSize assertion
Reid Kleckner [Wed, 29 Mar 2017 22:51:22 +0000 (22:51 +0000)]
[codeview] Fix buggy BeginIndexMapSize assertion

This assert is just trying to test that processing each record adds
exactly one entry to the index map. The assert logic was wrong when the
first record in the type stream was a field list.

I've simplified the code by moving the LF_FIELDLIST-specific logic into
the callback for that record type.

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

7 years ago[CodeGen] clean up and add tests for scalar and-of-setcc; NFC
Sanjay Patel [Wed, 29 Mar 2017 21:58:52 +0000 (21:58 +0000)]
[CodeGen] clean up and add tests for scalar and-of-setcc; NFC

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

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

7 years ago[X86IselLowering] Remove extraneous semicolon. NFCI.
Davide Italiano [Wed, 29 Mar 2017 21:34:58 +0000 (21:34 +0000)]
[X86IselLowering] Remove extraneous semicolon. NFCI.

Unbreaks the build with GCC -Werror.

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

7 years ago[DAGCombiner] Remove else after return. NFCI.
Davide Italiano [Wed, 29 Mar 2017 19:39:46 +0000 (19:39 +0000)]
[DAGCombiner] Remove else after return. NFCI.

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

7 years agoRe-land: "Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]"
Adrian McCarthy [Wed, 29 Mar 2017 19:27:08 +0000 (19:27 +0000)]
Re-land: "Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]"

This should work on all platforms now that r299006 has landed.  Tested locally
on Windows and Linux.

This moves exe symbol-specific method implementations out of NativeRawSymbol
into a concrete subclass. Also adds implementations for hasCTypes and
hasPrivateSymbols and a simple test to ensure the native reader can access the
summary information for the executable from the PDB.

Original Differential Revision: https://reviews.llvm.org/D31059

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

7 years agoAdd ifunc support to ModuleSymbolTable.
Rafael Espindola [Wed, 29 Mar 2017 19:26:26 +0000 (19:26 +0000)]
Add ifunc support to ModuleSymbolTable.

Do that by creating a global_values, which is similar to
global_objects, but also iterates over aliases and ifuncs.

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

7 years ago[InstCombine] Correct the check for vector GEPs
Matthew Simpson [Wed, 29 Mar 2017 18:23:08 +0000 (18:23 +0000)]
[InstCombine] Correct the check for vector GEPs

Some of the GEP combines (e.g., descaling) can't handle vector GEPs. We have an
existing check that attempts to bail out if given a vector GEP. However, the
check only tests the GEP's pointer operand. A GEP results in a vector of
pointers if at least one of its operands is vector-typed (e.g., its pointer
operand could be a scalar, but its index could be a vector). We should just
check the type of the GEP itself. This should fix PR32414.

Reference: https://bugs.llvm.org/show_bug.cgi?id=32414
Differential Revision: https://reviews.llvm.org/D31470

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

7 years ago[DAGCombiner] unify type checks and add asserts; NFCI
Sanjay Patel [Wed, 29 Mar 2017 18:08:01 +0000 (18:08 +0000)]
[DAGCombiner] unify type checks and add asserts; NFCI

We had a mix of type checks and usage that wasn't very clear.

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

7 years agollvm-pdbdump: If we don't change the color, don't reset the color.
Adrian McCarthy [Wed, 29 Mar 2017 17:11:27 +0000 (17:11 +0000)]
llvm-pdbdump: If we don't change the color, don't reset the color.

The -output-color option was successful at suppressing color changes, but
was still allowing color resets.

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

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

7 years ago[X86] Tidied up comment - we don't custom lower add/sub i64 on i686 anymore. NFCI.
Simon Pilgrim [Wed, 29 Mar 2017 15:41:58 +0000 (15:41 +0000)]
[X86] Tidied up comment - we don't custom lower add/sub i64 on i686 anymore. NFCI.

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

7 years ago[DAGCombiner] reduce code duplication by rearranging checks; NFCI
Sanjay Patel [Wed, 29 Mar 2017 15:37:33 +0000 (15:37 +0000)]
[DAGCombiner] reduce code duplication by rearranging checks; NFCI

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

7 years ago[tablegen][globalisel] Convert the SelectionDAG importer to a tree walking approach...
Daniel Sanders [Wed, 29 Mar 2017 15:37:18 +0000 (15:37 +0000)]
[tablegen][globalisel] Convert the SelectionDAG importer to a tree walking approach. NFC

Summary:
But don't actually inspect the tree any deeper than we already do. This
change is NFC but the next one will enable full traversal of the
source/destination patterns.

Depends on D30535

Reviewers: t.p.northover, qcolombet, aditya_nandakumar, rovka, ab

Subscribers: igorb, dberris, llvm-commits, kristof.beyls

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

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

7 years agoSpelling mistakes in comments. NFCI.
Simon Pilgrim [Wed, 29 Mar 2017 15:27:24 +0000 (15:27 +0000)]
Spelling mistakes in comments. NFCI.

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

7 years ago[MachineVerifier] Drop a spurious const
Sven van Haastregt [Wed, 29 Mar 2017 15:25:06 +0000 (15:25 +0000)]
[MachineVerifier] Drop a spurious const

As of r298987 the argument is a value that we std::move, so it
shouldn't be const anymore.

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

7 years agoCleanup in preparation for D30703. NFCI
Filipe Cabecinhas [Wed, 29 Mar 2017 14:42:27 +0000 (14:42 +0000)]
Cleanup in preparation for D30703. NFCI

Make the enumerators follow the coding convention and start with OW_...

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

7 years agoFix GettingStarted.rst statement.
Rafael Espindola [Wed, 29 Mar 2017 14:27:38 +0000 (14:27 +0000)]
Fix GettingStarted.rst statement.

Patch by Wei-Ren Chen!

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

7 years agoRemove unused argument.
Rafael Espindola [Wed, 29 Mar 2017 14:20:38 +0000 (14:20 +0000)]
Remove unused argument.

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

7 years ago[X86][AVX2] Prevent unary interleaving patterns from calling lowerVectorShuffleAsSpli...
Simon Pilgrim [Wed, 29 Mar 2017 13:00:00 +0000 (13:00 +0000)]
[X86][AVX2] Prevent unary interleaving patterns from calling lowerVectorShuffleAsSplitOrBlend (PR32453)

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

7 years ago[AMDGPU] Tidy up computeKnownBitsForTargetNode/ComputeNumSignBitsForTargetNode argume...
Simon Pilgrim [Wed, 29 Mar 2017 12:09:25 +0000 (12:09 +0000)]
[AMDGPU] Tidy up computeKnownBitsForTargetNode/ComputeNumSignBitsForTargetNode arguments. NFCI.

Based on comment in D31249.

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

7 years ago[X86][MMX] Added generic sitofp test to compare against existing cvtdq2ps test.
Simon Pilgrim [Wed, 29 Mar 2017 10:47:18 +0000 (10:47 +0000)]
[X86][MMX] Added generic sitofp test to compare against existing cvtdq2ps test.

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

7 years ago[X86] Removed old comment. NFCI.
Simon Pilgrim [Wed, 29 Mar 2017 10:44:51 +0000 (10:44 +0000)]
[X86] Removed old comment. NFCI.

No longer makes sense as the previous opcode mnemonic it was referring to is long gone.

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

7 years ago[MachineVerifier] Avoid reference to nullptr
Sven van Haastregt [Wed, 29 Mar 2017 09:08:25 +0000 (09:08 +0000)]
[MachineVerifier] Avoid reference to nullptr

Instantiation of the MachineVerifierPass through
PassInfo::getNormalCtor would yield a segfault since the default
constructor of the MachineVerifierPass takes a reference to nullptr.

Patch by Simone Pellegrini.

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

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

7 years agoMove the x86 cpu feature rtm from Haswell to Skylake matching clang commit r298956.
Eric Christopher [Wed, 29 Mar 2017 07:40:44 +0000 (07:40 +0000)]
Move the x86 cpu feature rtm from Haswell to Skylake matching clang commit r298956.

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

7 years ago[AVX-512] Remove explicit KMOVWrk from isel patterns. COPY_TO_REGCLASS to GR32 is...
Craig Topper [Wed, 29 Mar 2017 07:31:56 +0000 (07:31 +0000)]
[AVX-512] Remove explicit KMOVWrk from isel patterns. COPY_TO_REGCLASS to GR32 is enough.

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

7 years ago[AVX-512] Remove explicit KMOVWrk/KMOVWKr instructions from patterns where we can...
Craig Topper [Wed, 29 Mar 2017 06:55:28 +0000 (06:55 +0000)]
[AVX-512] Remove explicit KMOVWrk/KMOVWKr instructions from patterns where we can just use COPY_TO_REGCLASS instead.

This will result in a KMOVW or KMOVD being emitted during register allocation. And in at least some cases this might allow the register coalescer to remove the copy all together.

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

7 years ago[XRay] Update FDR log reader to be aware of buffer sizes per thread.
Dean Michael Berris [Wed, 29 Mar 2017 06:10:12 +0000 (06:10 +0000)]
[XRay] Update FDR log reader to be aware of buffer sizes per thread.

Summary:
It is problematic for this reader that it expects to read data from
several threads, but the header or message format does not define
framing. Since the buffers are reused, we can't rely on skipping
zeroed out data as a synchronization method either.

There is an argument that this is not version compatible with the format
the reader expected previously. I argue that since the writer wrote garbage
past the end of buffer record, there is no currently working reader to
compromise.

The corresponding writer change is posted to D31384.

Reviewers: dberris, pelikan

Reviewed By: dberris

Subscribers: llvm-commits

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

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

7 years ago[XRay][tools] Handle "no subcommand" case for llvm-xray
Dean Michael Berris [Wed, 29 Mar 2017 04:55:45 +0000 (04:55 +0000)]
[XRay][tools] Handle "no subcommand" case for llvm-xray

Summary:
Currently the llvm-xray commandline tool fails to handle the case for
when no subcommand is provided in a graceful manner. This fixes that to
print the help message explaining the subcommands and the available
options.

Reviewers: pcc, pelikan

Subscribers: llvm-commits

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

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

7 years ago[SDAG] Remove -enable-fmf-dag
Adam Nemet [Tue, 28 Mar 2017 23:46:14 +0000 (23:46 +0000)]
[SDAG] Remove -enable-fmf-dag

This is no longer needed as spotted by Sanjay in
https://reviews.llvm.org/D31165.

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

7 years ago[SDAG] Handle VectorReduction in SDNodeFlags::intersectWith
Adam Nemet [Tue, 28 Mar 2017 23:46:12 +0000 (23:46 +0000)]
[SDAG] Handle VectorReduction in SDNodeFlags::intersectWith

Spotted by Sanjay in https://reviews.llvm.org/D31165

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

7 years ago[SDAG] Add AllowContract to SNodeFlags
Adam Nemet [Tue, 28 Mar 2017 23:46:08 +0000 (23:46 +0000)]
[SDAG] Add AllowContract to SNodeFlags

Properly propagate the FMF from the LLVM IR to this flag.

This is toward moving fp-contraction=fast from an LLVM TargetOption to a
FastMathFlag in order to fix PR25721.

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

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

7 years agoMore accurate header inclusions. NFC.
Peter Collingbourne [Tue, 28 Mar 2017 23:35:34 +0000 (23:35 +0000)]
More accurate header inclusions. NFC.

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

7 years ago[AVX-512] Add test case that was supposed to go with r298957.
Craig Topper [Tue, 28 Mar 2017 23:29:35 +0000 (23:29 +0000)]
[AVX-512] Add test case that was supposed to go with r298957.

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

7 years ago[AVX-512] Punt on fast-isel of truncates to i1 when AVX512 is enabled.
Craig Topper [Tue, 28 Mar 2017 23:20:37 +0000 (23:20 +0000)]
[AVX-512] Punt on fast-isel of truncates to i1 when AVX512 is enabled.

We should be masking the value and emitting a register copy like we do in non-fast isel. Instead we were just updating the value map and emitting nothing.

After r298928 we started seeing cases where we would create a copy from GR8 to GR32 because the source register in a VK1 to GR32 copy was replaced by the GR8 going into a truncate.

This fixes PR32451.

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

7 years ago[PPC] In PPCBoolRetToInt change the bool value to i64 if the target is ppc64
Guozhi Wei [Tue, 28 Mar 2017 22:55:01 +0000 (22:55 +0000)]
[PPC] In PPCBoolRetToInt change the bool value to i64 if the target is ppc64

In PPCBoolRetToInt bool value is changed to i32 type. On ppc64 it may introduce an extra zero extension for the return value. This patch changes the integer type to i64 to avoid the zero extension on ppc64.

This patch fixed PR32442.

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

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

7 years ago[DAGCombiner] reduce code duplication with local variables; NFCI
Sanjay Patel [Tue, 28 Mar 2017 22:45:53 +0000 (22:45 +0000)]
[DAGCombiner] reduce code duplication with local variables; NFCI

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

7 years agoAdd a similar test for tailcall optimization as in r270287 for aarch64.
Eric Christopher [Tue, 28 Mar 2017 22:37:43 +0000 (22:37 +0000)]
Add a similar test for tailcall optimization as in r270287 for aarch64.

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

7 years agoLTO: Replace InputFile::Symbol::getFlags() with predicate accessors. NFC.
Peter Collingbourne [Tue, 28 Mar 2017 22:31:35 +0000 (22:31 +0000)]
LTO: Replace InputFile::Symbol::getFlags() with predicate accessors. NFC.

This makes the predicates independent of the flag representation
and makes the code a little easier to read.

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

7 years ago[DAG] fix formatting; NFC
Sanjay Patel [Tue, 28 Mar 2017 22:25:25 +0000 (22:25 +0000)]
[DAG] fix formatting; NFC

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

7 years ago[DAGCombiner] remove redundant conditions and duplicated code; NFCI
Sanjay Patel [Tue, 28 Mar 2017 22:22:50 +0000 (22:22 +0000)]
[DAGCombiner] remove redundant conditions and duplicated code; NFCI

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

7 years ago[AMDGPU] Boost unroll threshold for loops reading local memory
Stanislav Mekhanoshin [Tue, 28 Mar 2017 22:13:51 +0000 (22:13 +0000)]
[AMDGPU] Boost unroll threshold for loops reading local memory

This is less important than increase threshold for private memory,
but still brings performance improvements in a wide range of tests.
Unrolling more for local memory serves three purposes: it allows
to combine ds operations if offset becomes static, saves registers
used for offsets in case of static offsets, and allows better lds
latency hiding.

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

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

7 years ago[AMDGPU] Fix recorded region boundaries in max-occupancy scheduler
Stanislav Mekhanoshin [Tue, 28 Mar 2017 21:48:54 +0000 (21:48 +0000)]
[AMDGPU] Fix recorded region boundaries in max-occupancy scheduler

This is incorrect to record region boundaries before scheduling,
it may change after scheduling. As a result second pass may see less
instructions to schedule than it should.

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

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

7 years ago[DAGCombiner] rename variables in foldAndOfSetCCs for easier reading; NFCI
Sanjay Patel [Tue, 28 Mar 2017 21:40:41 +0000 (21:40 +0000)]
[DAGCombiner] rename variables in foldAndOfSetCCs for easier reading; NFCI

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

7 years ago[X86][MMX] Match MMX fp_to_sint conversions from XMM registers
Simon Pilgrim [Tue, 28 Mar 2017 21:32:11 +0000 (21:32 +0000)]
[X86][MMX] Match MMX fp_to_sint conversions from XMM registers

We currently perform the various fp_to_sint XMM conversion and then transfer to the MMX register (on 32-bit via the stack).

This patch improves support for MOVDQ2Q XMM to MMX transfers and adds the XMM->MMX fp_to_sint direct conversion patterns. The SSE2 specifications are the same as for XMM->XMM and XMM->MMX rounding/exceptions/etc.

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

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

7 years agoFix crashing on TargetCustom PseudoSourceValues
Matt Arsenault [Tue, 28 Mar 2017 20:33:12 +0000 (20:33 +0000)]
Fix crashing on TargetCustom PseudoSourceValues

Default to something more reasonable if printCustom isn't implemented.

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

7 years ago[DAGCombiner] clean up foldAndOfSetCCs; NFCI
Sanjay Patel [Tue, 28 Mar 2017 20:28:16 +0000 (20:28 +0000)]
[DAGCombiner] clean up foldAndOfSetCCs; NFCI

1. Fix bogus comment.
2. Early exit to reduce indent.
3. Change node pointer param to what it really is: an SDLoc.

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

7 years ago[IR] Add AllowContract to FastMathFlags
Adam Nemet [Tue, 28 Mar 2017 20:11:52 +0000 (20:11 +0000)]
[IR] Add AllowContract to FastMathFlags

-ffp-contract=fast does not currently work with LTO because it's passed as a
TargetOption to the backend rather than in the IR. This adds it to
FastMathFlags.

This is toward fixing PR25721

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

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

7 years ago[DAGCombiner] add helper function for and-of-setcc folds; NFC
Sanjay Patel [Tue, 28 Mar 2017 19:58:46 +0000 (19:58 +0000)]
[DAGCombiner] add helper function for and-of-setcc folds; NFC

This is just a cut and paste followed by clang-format. Clean up to follow.

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

7 years agoAdd support for -fno-builtin to LTO and ThinLTO to libLTO
Mehdi Amini [Tue, 28 Mar 2017 18:55:44 +0000 (18:55 +0000)]
Add support for -fno-builtin to LTO and ThinLTO to libLTO

Reviewers: tejohnson, pcc

Subscribers: Prazek, dexonsmith, llvm-commits

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

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

7 years ago[AMDGPU] Split -amdgpu-early-inline-all option
Stanislav Mekhanoshin [Tue, 28 Mar 2017 18:23:24 +0000 (18:23 +0000)]
[AMDGPU] Split -amdgpu-early-inline-all option

Previously it was covered by the internalization. It turns out we cannot
run internalizer in FE, it break separate compilation tests. Thus early
inliner gets its own option.

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

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

7 years ago[x86] use VPMOVMSK to replace memcmp libcalls for 32-byte equality
Sanjay Patel [Tue, 28 Mar 2017 17:23:49 +0000 (17:23 +0000)]
[x86] use VPMOVMSK to replace memcmp libcalls for 32-byte equality

Follow-up to:
https://reviews.llvm.org/rL298775

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

7 years agoRevert "Dont emit Mapping symbols for sections that contain only data."
Weiming Zhao [Tue, 28 Mar 2017 17:15:11 +0000 (17:15 +0000)]
Revert "Dont emit Mapping symbols for sections that contain only data."

It breaks some lld tests.

This reverts commit 3a50eea6d9732ab40e9a7aebe6be777b53a8b35c.

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

7 years ago[SDAG] Deal with deleted node in PromoteIntShiftOp
Nirav Dave [Tue, 28 Mar 2017 17:09:49 +0000 (17:09 +0000)]
[SDAG] Deal with deleted node in PromoteIntShiftOp

Deal with case that initial node is deleted during dag-combine leading
to an assertional failure in promoteIntShiftOp.

Fixes PR32420.

Reviewers: spatel, RKSimon

Subscribers: llvm-commits

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

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

7 years agoAdd reproducer test for pr32449. NFC.
Zvi Rackover [Tue, 28 Mar 2017 16:45:23 +0000 (16:45 +0000)]
Add reproducer test for pr32449. NFC.

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

7 years ago[X86][AVX2] Add support for combining v16i16 shuffles to VPBLENDW
Simon Pilgrim [Tue, 28 Mar 2017 16:40:38 +0000 (16:40 +0000)]
[X86][AVX2] Add support for combining v16i16 shuffles to VPBLENDW

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

7 years ago[AVX-512] Fix accidental uses of AH/BH/CH/DH after copies to/from mask registers
Craig Topper [Tue, 28 Mar 2017 16:35:29 +0000 (16:35 +0000)]
[AVX-512] Fix accidental uses of AH/BH/CH/DH after copies to/from mask registers

We've had several bugs(PR32256, PR32241) recently that resulted from usages of AH/BH/CH/DH either before or after a copy to/from a mask register.

This ultimately occurs because we create COPY_TO_REGCLASS with VK1 and GR8. Then in CopyToFromAsymmetricReg in X86InstrInfo we find a 32-bit super register for the GR8 to emit the KMOV with. But as these tests are demonstrating, its possible for the GR8 register to be a high register and we end up doing an accidental extra or insert from bits 15:8.

I think the best way forward is to stop making copies directly between mask registers and GR8/GR16. Instead I think we should restrict to only copies between mask registers and GR32/GR64 and use EXTRACT_SUBREG/INSERT_SUBREG to handle the conversion from GR32 to GR16/8 or vice versa.

Unfortunately, this complicates fastisel a bit more now to create the subreg extracts where we used to create GR8 copies. We can probably make a helper function to bring down the repitition.

This does result in KMOVD being used for copies when BWI is available because we don't know the original mask register size. This caused a lot of deltas on tests because we have to split the checks for KMOVD vs KMOVW based on BWI.

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

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

7 years ago[x86] add separate check prefix for SSE; NFC
Sanjay Patel [Tue, 28 Mar 2017 15:55:50 +0000 (15:55 +0000)]
[x86] add separate check prefix for SSE; NFC

We want to check each test on each target, so we need another prefix
when SSE and AVX diverge (as they will if we handle 32-byte and higher).

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

7 years ago[X86][SSE] Refactored shuffle BLEND combining to make future 16i16 support easier...
Simon Pilgrim [Tue, 28 Mar 2017 15:50:23 +0000 (15:50 +0000)]
[X86][SSE] Refactored shuffle BLEND combining to make future 16i16 support easier. NFCI.

Call the matchVectorShuffleAsBlend test as early as possible.

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

7 years ago[SDAG] Avoid deleted SDNodes PromoteIntBinOp
Nirav Dave [Tue, 28 Mar 2017 15:41:12 +0000 (15:41 +0000)]
[SDAG] Avoid deleted SDNodes PromoteIntBinOp

Reorder work in PromoteIntBinOp to prevent stale (deleted) nodes from
being used.

Fixes PR32340 and PR32345.

Reviewers: hfinkel, dbabokin

Subscribers: llvm-commits

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

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

7 years ago[SDAG] Fix Stale SDNode usage in visitAND
Nirav Dave [Tue, 28 Mar 2017 14:11:20 +0000 (14:11 +0000)]
[SDAG] Fix Stale SDNode usage in visitAND

Reorder CombineTo Calls to prevent potential use of deleted node.
Fixes PR32372.

Reviewers: jnspaulsson, RKSimon, uweigand, jonpa

Reviewed By: jonpa

Subscribers: jonpa, llvm-commits

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

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

7 years ago[x86] add AVX2 run to show 256-bit opportunity; NFC
Sanjay Patel [Tue, 28 Mar 2017 13:46:50 +0000 (13:46 +0000)]
[x86] add AVX2 run to show 256-bit opportunity; NFC

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

7 years agoFix signed/unsigned comparison warning
Simon Pilgrim [Tue, 28 Mar 2017 13:40:09 +0000 (13:40 +0000)]
Fix signed/unsigned comparison warning

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

7 years ago[SDAG] Minor cleanup of variable usage. NFC.
Nirav Dave [Tue, 28 Mar 2017 13:39:50 +0000 (13:39 +0000)]
[SDAG] Minor cleanup of variable usage. NFC.

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

7 years ago[X86][SSE] Begin merging vector shuffle to BLEND for lowering and combining.
Simon Pilgrim [Tue, 28 Mar 2017 13:05:48 +0000 (13:05 +0000)]
[X86][SSE] Begin merging vector shuffle to BLEND for lowering and combining.

Split off matchVectorShuffleAsBlend from lowerVectorShuffleAsBlend for reuse in combining.

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

7 years agoWdocumentation fix
Simon Pilgrim [Tue, 28 Mar 2017 12:29:09 +0000 (12:29 +0000)]
Wdocumentation fix

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

7 years ago[X86][SSE] Set second operand to undef instead of first operand in unary shuffle...
Simon Pilgrim [Tue, 28 Mar 2017 12:16:42 +0000 (12:16 +0000)]
[X86][SSE] Set second operand to undef instead of first operand in unary shuffle combines.

Copy isn't necessary after the matchVectorShuffleWithUNPCK refactor and undef value will make some future undef/zero handling easier.

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

7 years agoStrip trailing whitespace
Simon Pilgrim [Tue, 28 Mar 2017 11:15:17 +0000 (11:15 +0000)]
Strip trailing whitespace

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

7 years ago[AArch64] [Assembler] option to disable negative immediate conversions
Sanne Wouda [Tue, 28 Mar 2017 10:02:56 +0000 (10:02 +0000)]
[AArch64] [Assembler] option to disable negative immediate conversions

Summary:
Similar to the ARM target in https://reviews.llvm.org/rL298380, this
patch adds identical infrastructure for disabling negative immediate
conversions, and converts the existing aliases to the new infrastucture.

Reviewers: rengolin, javed.absar, olista01, SjoerdMeijer, samparker

Reviewed By: samparker

Subscribers: samparker, aemerson, llvm-commits

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

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

7 years ago[GlobalISel][X86] support G_FRAME_INDEX instruction selection.
Igor Breger [Tue, 28 Mar 2017 09:35:06 +0000 (09:35 +0000)]
[GlobalISel][X86] support G_FRAME_INDEX instruction selection.

    Summary:
    G_LOAD/G_STORE, add alternative RegisterBank mapping.
    For G_LOAD, Fast and Greedy mode choose the same RegisterBank mapping (GprRegBank ) for the G_GLOAD + G_FADD , can't get rid of cross register bank copy GprRegBank->VecRegBank.

    Reviewers: zvi, rovka, qcolombet, ab

    Reviewed By: zvi

    Subscribers: llvm-commits, dberris, kristof.beyls, eladcohen, guyblank

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

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

7 years ago[InstCombine] For select rule, use positive check of constant int for select operand...
Anna Thomas [Tue, 28 Mar 2017 09:32:24 +0000 (09:32 +0000)]
[InstCombine] For select rule, use positive check of constant int for select operand. NFCI

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

7 years agorename instcombine test file. NFC
Anna Thomas [Tue, 28 Mar 2017 08:34:07 +0000 (08:34 +0000)]
rename instcombine test file. NFC

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

7 years ago[AMDGPU] Update SI scheduler colorHighLatenciesGroups
Valery Pykhtin [Tue, 28 Mar 2017 07:19:48 +0000 (07:19 +0000)]
[AMDGPU] Update SI scheduler colorHighLatenciesGroups

Depends on rL298896: MachineScheduler/ScheduleDAG: Add support for GetSubGraph

Patch by Axel Davy (axel.davy@normalesup.org)

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

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

7 years agoDont emit Mapping symbols for sections that contain only data.
Weiming Zhao [Tue, 28 Mar 2017 05:40:36 +0000 (05:40 +0000)]
Dont emit Mapping symbols for sections that contain only data.

Summary:
Dont emit mapping symbols for sections that contain only data.

Patched by Shankar Easwaran <shankare@codeaurora.org>

Reviewers: rengolin, peter.smith, weimingz, kparzysz, t.p.northover

Reviewed By: t.p.northover

Subscribers: t.p.northover, llvm-commits

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

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

7 years ago[APInt] Reformat tc functions to put opening curly braces on the end of the previous...
Craig Topper [Tue, 28 Mar 2017 05:32:55 +0000 (05:32 +0000)]
[APInt] Reformat tc functions to put opening curly braces on the end of the previous line. NFC

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

7 years ago[APInt] Remove an anonymous namespace around static functions. NFC
Craig Topper [Tue, 28 Mar 2017 05:32:53 +0000 (05:32 +0000)]
[APInt] Remove an anonymous namespace around static functions. NFC

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

7 years ago[APInt] Combine variable declaration and initialization where possible in the tc...
Craig Topper [Tue, 28 Mar 2017 05:32:52 +0000 (05:32 +0000)]
[APInt] Combine variable declaration and initialization where possible in the tc functions. NFCI

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

7 years ago[APInt] Use 'unsigned' instead of 'unsigned int' in the interface to the APInt tc...
Craig Topper [Tue, 28 Mar 2017 05:32:48 +0000 (05:32 +0000)]
[APInt] Use 'unsigned' instead of 'unsigned int' in the interface to the APInt tc functions. This is more consistent with the rest of the codebase. NFC

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

7 years agoMachineScheduler/ScheduleDAG: Add support for GetSubGraph
Valery Pykhtin [Tue, 28 Mar 2017 05:12:31 +0000 (05:12 +0000)]
MachineScheduler/ScheduleDAG: Add support for GetSubGraph

Patch by Axel Davy (axel.davy@normalesup.org)

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

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

7 years agoCodeGen : Check LLVM_ENABLE_DUMP definition for dumpMachineInstrRangeWithSlotIndex.
Junmo Park [Tue, 28 Mar 2017 04:14:25 +0000 (04:14 +0000)]
CodeGen : Check LLVM_ENABLE_DUMP definition for dumpMachineInstrRangeWithSlotIndex.

Summary:
Add missing check routine for dumpMachineInstrRangeWithSlotIndex including LLVM_DUMP_METHOD.

Reviewers: bkramer

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

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

7 years ago[APInt] Move the single word cases of the bitwise operators inline.
Craig Topper [Tue, 28 Mar 2017 04:00:47 +0000 (04:00 +0000)]
[APInt] Move the single word cases of the bitwise operators inline.

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

7 years agoRevert "[asan] Delay creation of asan ctor."
Alex Shlyapnikov [Mon, 27 Mar 2017 23:11:50 +0000 (23:11 +0000)]
Revert "[asan] Delay creation of asan ctor."

Speculative revert. Some libfuzzer tests are affected.

This reverts commit r298731.

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

7 years agoRevert "[asan] Put ctor/dtor in comdat."
Alex Shlyapnikov [Mon, 27 Mar 2017 23:11:47 +0000 (23:11 +0000)]
Revert "[asan] Put ctor/dtor in comdat."

Speculative revert, some libfuzzer tests are affected.

This reverts commit r298756.

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

7 years agoRemove an oddly unnecessary temporary.
Eric Christopher [Mon, 27 Mar 2017 22:40:51 +0000 (22:40 +0000)]
Remove an oddly unnecessary temporary.

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

7 years ago[ARM] Mark falky test unsupported until we find the cause
Renato Golin [Mon, 27 Mar 2017 22:38:43 +0000 (22:38 +0000)]
[ARM] Mark falky test unsupported until we find the cause

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

7 years ago[libfuzzer] Remove XFAIL for OutOfMemory test.
Juergen Ributzka [Mon, 27 Mar 2017 22:33:05 +0000 (22:33 +0000)]
[libfuzzer] Remove XFAIL for OutOfMemory test.

This test is now passing on Darwin.

See rdar://problem/31282257.

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

7 years agoImprove machine schedulers for in-order processors
Javed Absar [Mon, 27 Mar 2017 20:46:37 +0000 (20:46 +0000)]
Improve machine schedulers for in-order processors

This patch enables schedulers to specify instructions that
cannot be issued with any other instructions.
It also fixes BeginGroup/EndGroup.

Reviewed by: Andrew Trick
Differential Revision: https://reviews.llvm.org/D30744

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

7 years agoAdd the error handling for Mach-O dyld compact lazy bind, weak bind and
Kevin Enderby [Mon, 27 Mar 2017 20:09:23 +0000 (20:09 +0000)]
Add the error handling for Mach-O dyld compact lazy bind, weak bind and
rebase entry errors and test cases for each of the error checks.

Also verified with Nick Kledzik that a BIND_OPCODE_SET_ADDEND_SLEB
opcode is legal in a lazy bind table, so code that had that as an error
check was removed.

With MachORebaseEntry and MachOBindEntry classes now returning
an llvm::Error in all cases for malformed input the variables Malformed
and logic to set use them is no longer needed and has been removed
from those classes.

Also in a few places, removed the redundant Done assignment to true
when also calling moveToEnd() as it does that assignment.

This only leaves the dyld compact export entries left to have
error handling yet to be added for the dyld compact info.

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

7 years ago[LV] Transform truncations of non-primary induction variables
Matthew Simpson [Mon, 27 Mar 2017 20:07:38 +0000 (20:07 +0000)]
[LV] Transform truncations of non-primary induction variables

The vectorizer tries to replace truncations of induction variables with new
induction variables having the smaller type. After r295063, this optimization
was applied to all integer induction variables, including non-primary ones.
When optimizing the truncation of a non-primary induction variable, we still
need to transform the new induction so that it has the correct start value.
This should fix PR32419.

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

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

7 years ago[APInt] Move operator=(uint64_t) inline as its pretty simple and is often used with...
Craig Topper [Mon, 27 Mar 2017 20:07:31 +0000 (20:07 +0000)]
[APInt] Move operator=(uint64_t) inline as its pretty simple and is often used with small constants that the compiler can optimize.

While there recognize that we only need to clearUnusedBits on the single word case.

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

7 years ago[TableGen] Print #nnn as a name of an non-native reg unit with id nnn
Krzysztof Parzyszek [Mon, 27 Mar 2017 19:08:24 +0000 (19:08 +0000)]
[TableGen] Print #nnn as a name of an non-native reg unit with id nnn

When using -debug with -gen-register-info, tablegen will crash when
trying to print a name of a non-native register unit. This patch only
affects the debug information generated while running llvm-tblgen,
and has no impact on the compilable code coming out of it.

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

7 years ago[AMDGPU] SISched: Detect dependency types between blocks
Valery Pykhtin [Mon, 27 Mar 2017 18:22:39 +0000 (18:22 +0000)]
[AMDGPU] SISched: Detect dependency types between blocks

Patch by Axel Davy (axel.davy@normalesup.org)

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

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

7 years ago[Support] Avoid concurrency hazard in signal handler registration
Bruno Cardoso Lopes [Mon, 27 Mar 2017 18:21:31 +0000 (18:21 +0000)]
[Support] Avoid concurrency hazard in signal handler registration

Several static functions from the signal API can be invoked
simultaneously; RemoveFileOnSignal for instance can be called indirectly
by multiple parallel loadModule() invocations, which might lead to
the assertion:

Assertion failed: (NumRegisteredSignals < array_lengthof(RegisteredSignalInfo) && "Out of space for signal handlers!"),
  function RegisterHandler, file /llvm/lib/Support/Unix/Signals.inc, line 105.

RemoveFileOnSignal calls RegisterHandlers(), which isn't currently
mutex protected, leading to the behavior above. This potentially affect
a few other users of RegisterHandlers() too.

rdar://problem/30381224

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

7 years ago[APInt] Move operator&=(uint64_t) inline and use memset to clear the upper words.
Craig Topper [Mon, 27 Mar 2017 18:16:17 +0000 (18:16 +0000)]
[APInt] Move operator&=(uint64_t) inline and use memset to clear the upper words.

This method is pretty new and probably isn't use much in the code base so this should have a negligible size impact. The OR and XOR operators are already inline.

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