OSDN Git Service

android-x86/external-llvm.git
7 years agoARM: try to fix GCC 4.8 compilation again after r286881.
Tim Northover [Mon, 14 Nov 2016 20:31:53 +0000 (20:31 +0000)]
ARM: try to fix GCC 4.8 compilation again after r286881.

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

7 years agoRecommit: ARM: sort register lists by encoding in push/pop instructions.
Tim Northover [Mon, 14 Nov 2016 20:28:24 +0000 (20:28 +0000)]
Recommit: ARM: sort register lists by encoding in push/pop instructions.

For example we were producing

    push {r8, r10, r11, r4, r5, r7, lr}

This is misleading (r4, r5 and r7 are actually pushed before the rest), and
other components (stack folding recently) often forget to deal with the extra
complexity coming from the different order, leading to miscompiles. Finally, we
warn about our own code in -no-integrated-as mode without this, which is really
not a good idea.

Fixed usage of std::sort so that we (hopefully) use instantiations that
actually exist in GCC 4.8.

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

7 years ago[AArch64] Change some pointers to references. NFC.
Geoff Berry [Mon, 14 Nov 2016 19:59:11 +0000 (19:59 +0000)]
[AArch64] Change some pointers to references. NFC.

Follow-up change to r286875.

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

7 years ago[X86] Tests exhibiting bad parial reloading behavior. NFC.
Michael Kuperstein [Mon, 14 Nov 2016 19:58:11 +0000 (19:58 +0000)]
[X86] Tests exhibiting bad parial reloading behavior. NFC.

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

7 years ago[AArch64] Split 0 vector stores into scalar store pairs.
Geoff Berry [Mon, 14 Nov 2016 19:39:04 +0000 (19:39 +0000)]
[AArch64] Split 0 vector stores into scalar store pairs.

Summary:
Replace a splat of zeros to a vector store by scalar stores of WZR/XZR.
The load store optimizer pass will merge them to store pair stores.
This should be better than a movi to create the vector zero followed by
a vector store if the zero constant is not re-used, since one
instructions and one register live range will be removed.

For example, the final generated code should be:

  stp xzr, xzr, [x0]

instead of:

  movi v0.2d, #0
  str q0, [x0]

Reviewers: t.p.northover, mcrosier, MatzeB, jmolloy

Subscribers: aemerson, rengolin, llvm-commits

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

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

7 years ago[AArch64] Factor out transform code from split16BStore. NFC.
Geoff Berry [Mon, 14 Nov 2016 19:39:00 +0000 (19:39 +0000)]
[AArch64] Factor out transform code from split16BStore.  NFC.

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

7 years ago[ThinLTO] Only promote exported locals as marked in index
Teresa Johnson [Mon, 14 Nov 2016 19:21:41 +0000 (19:21 +0000)]
[ThinLTO] Only promote exported locals as marked in index

Summary:
We have always speculatively promoted all renamable local values
(except const non-address taken variables) for both the exporting
and importing module. We would then internalize them back based on
the ThinLink results if they weren't actually exported. This is
inefficient, and results in unnecessary renames. It also meant we
had to check the non-renamability of a value in the summary, which
was already checked during function importing analysis in the ThinLink.

Made renameModuleForThinLTO (which does the promotion/renaming) instead
use the index when exporting, to avoid unnecessary renames/promotions.
For importing modules, we can simply promoted all values as any local
we import by definition is exported and needs promotion.

This required changes to the method used by the FunctionImport pass
(only invoked from 'opt' for testing) and when invoked from llvm-link,
since neither does a ThinLink. We simply conservatively mark all locals
in the index as promoted, which preserves the current aggressive
promotion behavior.

I also needed to change an llvm-lto based test where we had previously
been aggressively promoting values that weren't importable (aliasees),
but now will not promote.

Reviewers: mehdi_amini

Subscribers: llvm-commits

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

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

7 years ago[libFuzzer] replace 'auto' with 'auto *' to better follow the LLVM style
Kostya Serebryany [Mon, 14 Nov 2016 19:21:38 +0000 (19:21 +0000)]
[libFuzzer] replace 'auto' with 'auto *' to better follow the LLVM style

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

7 years agoRevert: r286868 - Test commit
Daniel Sanders [Mon, 14 Nov 2016 19:10:56 +0000 (19:10 +0000)]
Revert: r286868 - Test commit

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

7 years agoTest commit
Daniel Sanders [Mon, 14 Nov 2016 19:09:33 +0000 (19:09 +0000)]
Test commit

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

7 years agoRevert "ARM: sort register lists by encoding in push/pop instructions."
Tim Northover [Mon, 14 Nov 2016 19:05:28 +0000 (19:05 +0000)]
Revert "ARM: sort register lists by encoding in push/pop instructions."

This reverts commit 286866. It broke a bot, something to do with exactly which
templates std::sort accepts.

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

7 years agoARM: sort register lists by encoding in push/pop instructions.
Tim Northover [Mon, 14 Nov 2016 19:02:17 +0000 (19:02 +0000)]
ARM: sort register lists by encoding in push/pop instructions.

For example we were producing

    push {r8, r10, r11, r4, r5, r7, lr}

This is misleading (r4, r5 and r7 are actually pushed before the rest), and
other components (stack folding recently) often forget to deal with the extra
complexity coming from the different order, leading to miscompiles. Finally, we
warn about our own code in -no-integrated-as mode without this, which is really
not a good idea.

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

7 years agoGive SLP vectorizer credit where it's due.
Michael Kuperstein [Mon, 14 Nov 2016 19:01:59 +0000 (19:01 +0000)]
Give SLP vectorizer credit where it's due.

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

7 years ago[PPC] Add intrinsic mapping to the xscvhpsp instruction
Sean Fertile [Mon, 14 Nov 2016 18:43:59 +0000 (18:43 +0000)]
[PPC] Add intrinsic mapping to the xscvhpsp instruction

add an intrinsic to expose the 'VSX Scalar Convert Half-Precision to
Single-Precision' instruction.

Differential review: https://reviews.llvm.org/D26536

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

7 years ago[opt-viewer] Don't fail with remarks without debug location
Adam Nemet [Mon, 14 Nov 2016 18:38:48 +0000 (18:38 +0000)]
[opt-viewer] Don't fail with remarks without debug location

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

7 years agoAMDGPU/SI: Support data types other than V4f32 in image intrinsics
Changpeng Fang [Mon, 14 Nov 2016 18:33:18 +0000 (18:33 +0000)]
AMDGPU/SI: Support data types other than V4f32 in image intrinsics

Summary:
  Extend image intrinsics to support data types of V1F32 and V2F32.

  TODO: we should define a mapping table to change the opcode for data type of V2F32 but just one channel is active,
  even though such case should be very rare.

Reviewers:
  tstellarAMD

Differential Revision:
  http://reviews.llvm.org/D26472

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

7 years ago[X86] Adding reproducer for pr30981
Zvi Rackover [Mon, 14 Nov 2016 18:10:44 +0000 (18:10 +0000)]
[X86] Adding reproducer for pr30981

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

7 years ago[PDB] Add documentation for the DBI Stream.
Zachary Turner [Mon, 14 Nov 2016 17:59:28 +0000 (17:59 +0000)]
[PDB] Add documentation for the DBI Stream.

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

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

7 years ago[PDB] Add documentation for the PDB Stream.
Zachary Turner [Mon, 14 Nov 2016 17:59:21 +0000 (17:59 +0000)]
[PDB] Add documentation for the PDB Stream.

https://reviews.llvm.org/D26516

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

7 years agoUse _Unwind_Backtrace on Apple platforms.
Bob Wilson [Mon, 14 Nov 2016 17:56:18 +0000 (17:56 +0000)]
Use _Unwind_Backtrace on Apple platforms.

Darwin's backtrace() function does not work with sigaltstack (which was
enabled when available with r270395) — it does a sanity check to make
sure that the current frame pointer is within the expected stack area
(which it is not when using an alternate stack) and gives up otherwise.
The alternative of _Unwind_Backtrace seems to work fine on macOS, so use
that when backtrace() fails. Note that we then use backtrace_symbols_fd()
with the addresses from _Unwind_Backtrace, but I’ve tested that and it
also seems to work fine. rdar://problem/28646552

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

7 years agoTypo
Adrian Prantl [Mon, 14 Nov 2016 17:26:32 +0000 (17:26 +0000)]
Typo

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

7 years agoRestore "[ThinLTO] Prevent exporting of locals used/defined in module level asm"
Teresa Johnson [Mon, 14 Nov 2016 17:12:32 +0000 (17:12 +0000)]
Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm"

This restores the rest of r286297 (part was restored in r286475).
Specifically, it restores the part requiring adding a dependency from
the Analysis to Object library (downstream use changed to correctly
model split BitReader vs BitWriter libraries).

Original description of this part of patch follows:

Module level asm may also contain defs of values. We need to prevent
export of any refs to local values defined in module level asm (e.g. a
ref in normal IR), since that also requires renaming/promotion of the
local. To do that, the summary index builder looks at all values in the
module level asm string that are not marked Weak or Global, which is
exactly the set of locals that are defined. A summary is created for
each of these local defs and flagged as NoRename.

This required adding handling to the BitcodeWriter to look at GV
declarations to see if they have a summary (rather than skipping them
all).

Finally, added an assert to IRObjectFile::CollectAsmUndefinedRefs to
ensure that an MCAsmParser is available, otherwise the module asm parse
would silently fail. Initialized the asm parser in the opt tool for use
in testing this fix.

Fixes PR30610.

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

7 years ago[Hexagon] Remove unsafe load instructions that affect Stack Slot Coloring
Sumanth Gundapaneni [Mon, 14 Nov 2016 17:11:00 +0000 (17:11 +0000)]
[Hexagon] Remove unsafe load instructions that affect Stack Slot Coloring

The Stack slot coloring pass removes a store that is followed by a load
that deal with the same stack slot. The function isLoadFromStackSlot
is supposed to consider the loads that have no side-effects. This
patch fixed the issue by removing the unsafe loads from this function
Eg:
%vreg0<def> = L2_loadruh_io <fi#15>, 0
S2_storeri_io <fi#15>, 0, %vreg0

In this case, we load an unsigned extended half word and store this in to
the same stack slot. The Stack slot coloring pass considers safe to remove
the store. This patch marked all the non-vector byte and half word loads as
unsafe.

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

7 years agoHandle non-inlined clang::Type::getAs specializations in extract_symbols.py
Stephan Bergmann [Mon, 14 Nov 2016 17:07:09 +0000 (17:07 +0000)]
Handle non-inlined clang::Type::getAs specializations in extract_symbols.py

The existing logic was to discard any symbols representing function template
instantiations, as the definitions were assumed to be inline. But there are
three explicit specializations of clang::Type::getAs that are only defined in
Clang's lib/AST/Type.cpp, and at least the plugin used by the LibreOffice build
(https://wiki.documentfoundation.org/Development/Clang_plugins) uses those
functions.

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

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

7 years ago[ThinLTO] Make inline assembly handling more efficient in summary
Teresa Johnson [Mon, 14 Nov 2016 16:40:19 +0000 (16:40 +0000)]
[ThinLTO] Make inline assembly handling more efficient in summary

Summary:
The change in r285513 to prevent exporting of locals used in
inline asm added all locals in the llvm.used set to the reference
set of functions containing inline asm. Since these locals were marked
NoRename, this automatically prevented importing of the function.

Unfortunately, this caused an explosion in the summary reference lists
in some cases. In my particular example, it happened for a large protocol
buffer generated C++ file, where many of the generated functions
contained an inline asm call. It was exacerbated when doing a ThinLTO
PGO instrumentation build, where the PGO instrumentation included
thousands of private __profd_* values that were added to llvm.used.

We really only need to include a single llvm.used local (NoRename) value
in the reference list of a function containing inline asm to block it
being imported. However, it seems cleaner to add a flag to the summary
that explicitly describes this situation, which is what this patch does.

Reviewers: mehdi_amini

Subscribers: llvm-commits

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

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

7 years ago[CostModel][X86] Added mul costs for vXi8 vectors
Simon Pilgrim [Mon, 14 Nov 2016 15:54:24 +0000 (15:54 +0000)]
[CostModel][X86] Added mul costs for vXi8 vectors

More realistic v16i8/v32i8/v64i8 MUL costs - we have to extend to vXi16, use PMULLW and then truncate the result

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

7 years ago[X86][AVX] Fixed v16i16/v32i8 ADD/SUB costs on AVX1 subtargets
Simon Pilgrim [Mon, 14 Nov 2016 14:45:16 +0000 (14:45 +0000)]
[X86][AVX] Fixed v16i16/v32i8 ADD/SUB costs on AVX1 subtargets

Add explicit v16i16/v32i8 ADD/SUB costs, matching the costs of v4i64/v8i32 - they were missing for some reason.

This has side effects on the LV max bandwidth tests (AVX1 now prefers 128-bit vectors vs AVX2 which still prefers 256-bit)

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

7 years ago[PPC] add intrinsics for vec extract exp/significand and vec test data class.
Sean Fertile [Mon, 14 Nov 2016 14:42:37 +0000 (14:42 +0000)]
[PPC] add intrinsics for vec extract exp/significand and vec test data class.

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

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

7 years agoReverting r285406, which was a temporary workaround to get one of the documentation...
Aaron Ballman [Mon, 14 Nov 2016 13:33:51 +0000 (13:33 +0000)]
Reverting r285406, which was a temporary workaround to get one of the documentation bots upgraded to something newer than GCC 4.7. This restores the check for GCC 4.8.

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

7 years agoRevert "llvm-strings: support printing the filename"
Renato Golin [Mon, 14 Nov 2016 13:09:24 +0000 (13:09 +0000)]
Revert "llvm-strings: support printing the filename"

Also,

Revert "test: remove the archive before modifying it"
Revert "test: explicitly use gnu format"

This reverts commits r286778, r286729 and r286767, as they are randomly failing
on many bots (AArch64, x86_64).

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

7 years agoRemove redundant condition (PR28352) NFCI.
Simon Pilgrim [Mon, 14 Nov 2016 12:00:46 +0000 (12:00 +0000)]
Remove redundant condition (PR28352) NFCI.

We were already testing is the op was not a leaf, so need to then test if it was a leaf (added it to the assert instead).

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

7 years ago[InlineCost] Remove skew when calculating call costs
James Molloy [Mon, 14 Nov 2016 11:14:41 +0000 (11:14 +0000)]
[InlineCost] Remove skew when calculating call costs

When calculating the cost of a call instruction we were applying a heuristic penalty as well as the cost of the instruction itself.

However, when calculating the benefit from inlining we weren't discounting the equivalent penalty for the call instruction that would be removed! This caused skew in the calculation and meant we wouldn't inline in the following, trivial case:

  int g() {
    h();
  }
  int f() {
    g();
  }

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

7 years agoRemove redundant condition (PR28800) NFCI.
Simon Pilgrim [Mon, 14 Nov 2016 10:40:23 +0000 (10:40 +0000)]
Remove redundant condition (PR28800) NFCI.

'A || (!A && B)' is equivalent to 'A || B':

(LoopCycle > DefCycle) || (LoopCycle <= DefCycle && LoopStage <= DefStage)
-->
(LoopCycle > DefCycle) || (LoopStage <= DefStage)

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

7 years agoGlobalISel: Fix indentation. NFC
Diana Picus [Mon, 14 Nov 2016 10:25:43 +0000 (10:25 +0000)]
GlobalISel: Fix indentation. NFC

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

7 years ago[JumpThreading] Prevent non-deterministic use lists
Pablo Barrio [Mon, 14 Nov 2016 10:24:26 +0000 (10:24 +0000)]
[JumpThreading] Prevent non-deterministic use lists

Summary:
Unfolding selects was previously done with the help of a vector
of pointers that was then sorted to be able to remove duplicates.
As this sorting depends on the memory addresses, it was
non-deterministic. A SetVector is used now so that duplicates are
removed without the need of sorting first.

Reviewers: mgrang, efriedma

Subscribers: llvm-commits

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

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

7 years agoGlobalISel: Fix typos. NFC
Diana Picus [Mon, 14 Nov 2016 10:22:18 +0000 (10:22 +0000)]
GlobalISel: Fix typos. NFC

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

7 years agoAdd explicit (void) cast to unused unique_ptr::release() results
Eric Fiselier [Mon, 14 Nov 2016 07:26:17 +0000 (07:26 +0000)]
Add explicit (void) cast to unused unique_ptr::release() results

Summary:
This patch adds explicit `(void)` casts to discarded `release()` calls to suppress -Wunused-result.

This patch fixes *all* warnings are generated as a result of [applying `[[nodiscard]]`  within libc++](https://reviews.llvm.org/D26596).
Similar fixes were applied to Clang in r286796.

Reviewers: chandlerc, dberris

Subscribers: llvm-commits

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

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

7 years agoDemangle: only demangle mangled symbols
Saleem Abdulrasool [Mon, 14 Nov 2016 04:54:47 +0000 (04:54 +0000)]
Demangle: only demangle mangled symbols

Only attempt to demangle symbols which have the itanium C++ prefix of `_Z`.
This ensures that we do not treat any symbol name as a managled named.  We would
previously treat a C function `f` as a mangled name and decode that to `float`
incorrectly.

While it is easy to add tests for this, Mehdi recommended against introducing
tests for the demangler as libc++abi should cover the testing.

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

7 years ago[AVX-512] Add suffixless aliases for EVEX encoded vcvtsi2ss/vcvtsi2sd/vcvtusi2ss...
Craig Topper [Mon, 14 Nov 2016 02:46:58 +0000 (02:46 +0000)]
[AVX-512] Add suffixless aliases for EVEX encoded vcvtsi2ss/vcvtsi2sd/vcvtusi2ss/vcvtusi2sd. This matches the VEX behavior.

Fixes another problem from PR28850.

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

7 years ago[X86] Cleanup 'x' and 'y' mnemonic suffixes for vcvtpd2dq/vcvttpd2dq/vcvtpd2ps and...
Craig Topper [Mon, 14 Nov 2016 01:53:29 +0000 (01:53 +0000)]
[X86] Cleanup 'x' and 'y' mnemonic suffixes for vcvtpd2dq/vcvttpd2dq/vcvtpd2ps and similar instructions.

-Don't print the 'x' suffix for the 128-bit reg/mem VEX encoded instructions in Intel syntax. This is consistent with the EVEX versions.
-Don't print the 'y' suffix for the 256-bit reg/reg VEX encoded instructions in Intel or AT&T syntax. This is consistent with the EVEX versions.
-Allow the 'x' and 'y' suffixes to be used for the reg/mem forms when we're assembling using Intel syntax.
-Allow the 'x' and 'y' suffixes on the reg/reg EVEX encoded instructions in Intel or AT&T syntax. This is consistent with what VEX was already allowing.

This should fix at least some of PR28850.

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

7 years ago[AVX-512] Remove and autoupgrade masked dword/qword variable shift intrinsics to...
Craig Topper [Mon, 14 Nov 2016 01:53:22 +0000 (01:53 +0000)]
[AVX-512] Remove and autoupgrade masked dword/qword variable shift intrinsics to the new unmasked versions and selects.

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

7 years ago[LangRef] Drop misleading anecdote
Sanjoy Das [Sun, 13 Nov 2016 23:40:40 +0000 (23:40 +0000)]
[LangRef] Drop misleading anecdote

`shl nsw i8 1, i8 8` is poison, but `mul i8 1, i8 128` is not.

This was discussed previously here:
http://lists.llvm.org/pipermail/llvm-dev/2015-April/084195.html.  From
the discussion, it was not clear which semantics we want for `shl`, but
for now at least make the language reference more accurate.

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

7 years agotest: remove the archive before modifying it
Saleem Abdulrasool [Sun, 13 Nov 2016 20:43:41 +0000 (20:43 +0000)]
test: remove the archive before modifying it

The archive may already exist when not doing a clean test run.  The dirty state
can cause a test failure.  Remove the archive first.

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

7 years agollvm-cxxfilt: support reading from stdin
Saleem Abdulrasool [Sun, 13 Nov 2016 20:43:38 +0000 (20:43 +0000)]
llvm-cxxfilt: support reading from stdin

`c++filt` when given no arguments runs as a REPL, decoding each line as a
decorated name.  Unify the test structure to be more uniform, with the tests for
llvm-cxxfilt living under test/tools/llvm-cxxfilt.

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

7 years ago[ValueTracking] recognize even more variants of smin/smax
Sanjay Patel [Sun, 13 Nov 2016 20:04:52 +0000 (20:04 +0000)]
[ValueTracking] recognize even more variants of smin/smax

Similar to:
https://reviews.llvm.org/rL285499
https://reviews.llvm.org/rL286318

We can't minimally expose this in IR tests because we don't have min/max intrinsics,
but the difference is visible in codegen because SelectionDAGBuilder::visitSelect()
uses matchSelectPattern().

We're not canonicalizing these patterns in IR (yet), so I don't expect there to be any
regressions as noted here:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html

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

7 years ago[AVX-512] Fix a disassembler failure for AVX-512 vcmpss/vcmpsd with an immediate...
Craig Topper [Sun, 13 Nov 2016 19:58:18 +0000 (19:58 +0000)]
[AVX-512] Fix a disassembler failure for AVX-512 vcmpss/vcmpsd with an immediate larger than 32. Fix the same bug with VLX vcmpps/vcmppd.

Fixes PR24941.

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

7 years agotest: synchronise lit substitutions
Saleem Abdulrasool [Sun, 13 Nov 2016 19:37:00 +0000 (19:37 +0000)]
test: synchronise lit substitutions

llvm-strings was added to the test dependencies without updating the lit
substitutions.  Synchronise the list.

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

7 years ago[ValueTracking] move min/max matching to helper function; NFCI
Sanjay Patel [Sun, 13 Nov 2016 19:30:19 +0000 (19:30 +0000)]
[ValueTracking] move min/max matching to helper function; NFCI

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

7 years ago[X86][IR] Reduce the number of full string comparisons in the code that autoupgrades...
Craig Topper [Sun, 13 Nov 2016 19:09:56 +0000 (19:09 +0000)]
[X86][IR] Reduce the number of full string comparisons in the code that autoupgrades masked shift intrinsics.

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

7 years agollvm-strings: support printing the filename
Saleem Abdulrasool [Sun, 13 Nov 2016 19:07:48 +0000 (19:07 +0000)]
llvm-strings: support printing the filename

This adds support for the `-f` or `--print-file-name` option for strings.

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

7 years agoAMDGPU: Implement SGPR spilling with scalar stores
Matt Arsenault [Sun, 13 Nov 2016 18:20:54 +0000 (18:20 +0000)]
AMDGPU: Implement SGPR spilling with scalar stores

nThis avoids the nasty problems caused by using
memory instructions that read the exec mask while
spilling / restoring registers used for control flow
masking, but only for VI when these were added.

This always uses the scalar stores when enabled currently,
but it may be better to still try to spill to a VGPR
and use this on the fallback memory path.

The cache also needs to be flushed before wave termination
if a scalar store is used.

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

7 years agorevert commit r286761, some builds failed on Win platforms
Igor Breger [Sun, 13 Nov 2016 15:48:11 +0000 (15:48 +0000)]
revert commit r286761, some builds failed on Win platforms

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

7 years ago[X86][SSE] Add zero lower 32-bits test case for PR30845
Simon Pilgrim [Sun, 13 Nov 2016 15:32:11 +0000 (15:32 +0000)]
[X86][SSE] Add zero lower 32-bits test case for PR30845

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

7 years ago[X86][AVX512] Add masked VPMOZX test case for PR26762
Simon Pilgrim [Sun, 13 Nov 2016 15:16:43 +0000 (15:16 +0000)]
[X86][AVX512] Add masked VPMOZX test case for PR26762

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

7 years ago[X86][SSE] Add additional test case for PR30845
Simon Pilgrim [Sun, 13 Nov 2016 14:57:52 +0000 (14:57 +0000)]
[X86][SSE] Add additional test case for PR30845

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

7 years ago[X86][AVX512] Removing llvm x86 intrinsics for _mm_mask_move_{ss|sd} intrinsics.
Ayman Musa [Sun, 13 Nov 2016 14:51:25 +0000 (14:51 +0000)]
[X86][AVX512] Removing llvm x86 intrinsics for _mm_mask_move_{ss|sd} intrinsics.

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

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

7 years ago[X86][AVX512] Add patterns for all variants of VMOVSS/VMOVSD instructions.
Ayman Musa [Sun, 13 Nov 2016 14:29:32 +0000 (14:29 +0000)]
[X86][AVX512] Add patterns for all variants of VMOVSS/VMOVSD instructions.

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

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

7 years ago[InstCombine][AVX-512] Teach InstCombineCalls to handle the new unmasked AVX-512...
Craig Topper [Sun, 13 Nov 2016 07:26:19 +0000 (07:26 +0000)]
[InstCombine][AVX-512] Teach InstCombineCalls to handle the new unmasked AVX-512 variable shift intrinsics.

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

7 years ago[AVX-512] Add unmasked intrinsics for variable shifts of dwords and qwords.
Craig Topper [Sun, 13 Nov 2016 07:26:15 +0000 (07:26 +0000)]
[AVX-512] Add unmasked intrinsics for variable shifts of dwords and qwords.

These will be used to replace the masked intrinsics so that InstCombineCalls can optimize the AVX-512 variable shifts the same way it does for AVX2.

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

7 years ago[AMDGPU] Add f16 support (VI+)
Konstantin Zhuravlyov [Sun, 13 Nov 2016 07:01:11 +0000 (07:01 +0000)]
[AMDGPU] Add f16 support (VI+)

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

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

7 years agoBitcode: Change module reader functions to return an llvm::Expected.
Peter Collingbourne [Sun, 13 Nov 2016 07:00:17 +0000 (07:00 +0000)]
Bitcode: Change module reader functions to return an llvm::Expected.

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

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

7 years agoAnalysis: Simplify the ScalarEvolution::getGEPExpr() interface. NFCI.
Peter Collingbourne [Sun, 13 Nov 2016 06:59:50 +0000 (06:59 +0000)]
Analysis: Simplify the ScalarEvolution::getGEPExpr() interface. NFCI.

All existing callers were manually extracting information out of an existing
GEP instruction and passing it to getGEPExpr(). Simplify the interface by
changing it to take a GEPOperator instead.

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

7 years agoBitcode: More precise casting. NFCI.
Peter Collingbourne [Sun, 13 Nov 2016 06:59:28 +0000 (06:59 +0000)]
Bitcode: More precise casting. NFCI.

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

7 years agoIR: Change the Type::get{Array,Vector,Pointer}ElementType() functions to perform...
Peter Collingbourne [Sun, 13 Nov 2016 06:58:45 +0000 (06:58 +0000)]
IR: Change the Type::get{Array,Vector,Pointer}ElementType() functions to perform the correct type assertion.

Previously we were only asserting that the type was a sequential type.

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

7 years ago[AVX-512] Move masked shift intrinsics tests to the autoupgrade test file. These...
Craig Topper [Sun, 13 Nov 2016 03:42:27 +0000 (03:42 +0000)]
[AVX-512] Move masked shift intrinsics tests to the autoupgrade test file. These missed being moved in r286725.

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

7 years ago[InstCombine][AVX-512] Expand vector shift handling to work on the AVX-512 shift...
Craig Topper [Sun, 13 Nov 2016 01:51:55 +0000 (01:51 +0000)]
[InstCombine][AVX-512] Expand vector shift handling to work on the AVX-512 shift by immediate and shift by single value.

This does not include support for the AVX-512 variable shifts. That will be coming in a future patch.

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

7 years ago[x86] add smin/smax with zero tests
Sanjay Patel [Sun, 13 Nov 2016 00:32:39 +0000 (00:32 +0000)]
[x86] add smin/smax with zero tests

These are vector tests corresponding to the discussion at:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html

Apart from the lack of min/max matching, the and/andn difference
shows a lack of DAG-level canonicalization.

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

7 years ago[X86][SSE] Add test case for PR30845
Simon Pilgrim [Sat, 12 Nov 2016 23:44:58 +0000 (23:44 +0000)]
[X86][SSE] Add test case for PR30845

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

7 years ago[ORC] Remove the 'const' qualifier from the member function wrapper, make the
Lang Hames [Sat, 12 Nov 2016 23:12:41 +0000 (23:12 +0000)]
[ORC] Remove the 'const' qualifier from the member function wrapper, make the
lambda in wrapHandler mutable to allow it to pass the handler through as a
non-const value.

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

7 years agotest: explicitly use gnu format
Saleem Abdulrasool [Sat, 12 Nov 2016 19:03:08 +0000 (19:03 +0000)]
test: explicitly use gnu format

This should fix the Darwin buildbots.

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

7 years agollvm-strings: trivialise logic until we support more options
Saleem Abdulrasool [Sat, 12 Nov 2016 18:37:04 +0000 (18:37 +0000)]
llvm-strings: trivialise logic until we support more options

Until we have handling for ignoring unloaded sections, simplify the logic to
the point of triviality.  This fixes the scanning of archives, particularly when
embedded in archives.

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

7 years ago[AVX-512] Remove the remaining masked shift by immediate or by single value. Autoupgr...
Craig Topper [Sat, 12 Nov 2016 18:04:46 +0000 (18:04 +0000)]
[AVX-512] Remove the remaining masked shift by immediate or by single value. Autoupgrade them to recently introduced unmasked versions and a select.

After this I'll add the unmasked intrinsics to InstCombineCalls to finish making our handling of these types of shuffles consistent between AVX-512 and the legacy intrinsics.

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

7 years ago[Support] Add StringRef::find_lower and contains_lower.
Zachary Turner [Sat, 12 Nov 2016 17:17:12 +0000 (17:17 +0000)]
[Support] Add StringRef::find_lower and contains_lower.

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

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

7 years ago[OCaml] Clear cross-target test deps when building out-of-tree
Michal Gorny [Sat, 12 Nov 2016 14:58:30 +0000 (14:58 +0000)]
[OCaml] Clear cross-target test deps when building out-of-tree

Clear cross-target test dependencies when using LLVM_OCAML_OUT_OF_TREE,
in order to make it possible to run check-llvm-bindings-ocaml without
rebuilding the whole LLVM.

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

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

7 years agoAs we released 3.9, from the 4.0 release notes, points to version 3.9 instead of 3.8
Sylvestre Ledru [Sat, 12 Nov 2016 10:39:09 +0000 (10:39 +0000)]
As we released 3.9, from the 4.0 release notes, points to version 3.9 instead of 3.8

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

7 years ago[AVX-512] Add unmasked version of shift by immediate and shift by single element...
Craig Topper [Sat, 12 Nov 2016 05:28:24 +0000 (05:28 +0000)]
[AVX-512] Add unmasked version of shift by immediate and shift by single element in XMM.

Summary:
This is the first step towards being able to add the avx512 shift by immediate intrinsics to InstCombineCalls where we aleady support the sse2 and avx2 intrinsics. We need to the unmasked versions so we can avoid having to teach InstCombineCalls that it would need to insert selects sometimes. Instead we'll just add the selects around the new instrinsics in the frontend.

This change should also enable the shift by i32 intrinsics to take a non-constant shift value just like the avx2 and sse intrinsics. This will enable us to fix PR30691 once we update clang.

Next I'll switch clang to use the new builtins. Then we'll come back to the backend and remove/autoupgrade the old intrinsics. Then I'll work on the same series for variable shifts.

Reviewers: RKSimon, zvi, delena

Subscribers: llvm-commits

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

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

7 years agoCODE_OWNERS: Take ownership of the X86 backend.
Craig Topper [Sat, 12 Nov 2016 05:16:06 +0000 (05:16 +0000)]
CODE_OWNERS: Take ownership of the X86 backend.

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

7 years ago[AVX-512] Add support for lowering shuffles to VALIGND/VALIGNQ
Craig Topper [Sat, 12 Nov 2016 05:05:27 +0000 (05:05 +0000)]
[AVX-512] Add support for lowering shuffles to VALIGND/VALIGNQ

Summary: VALIGND and VALIGNQ are similar to PALIGNR but instead of working on a 128-bit lane they work on the entire vector register. This change leverages the shuffle rotate detection code used for PALIGNR to detect these cases.

Reviewers: delena, RKSimon

Subscribers: Farhana, llvm-commits

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

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

7 years agobuild: add a dependency on llvm-strings
Saleem Abdulrasool [Sat, 12 Nov 2016 03:45:21 +0000 (03:45 +0000)]
build: add a dependency on llvm-strings

Since we now have tests for llvm-strings, add a dependency on the tool.

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

7 years agollvm-strings: ensure that the last string is correctly printed
Saleem Abdulrasool [Sat, 12 Nov 2016 03:39:21 +0000 (03:39 +0000)]
llvm-strings: ensure that the last string is correctly printed

We would ignore the last string that appeared if the file ended with a printable
character.  Ensure that we get the last string.

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

7 years ago[OCaml] Adapt to the new attribute C API.
whitequark [Sat, 12 Nov 2016 03:38:30 +0000 (03:38 +0000)]
[OCaml] Adapt to the new attribute C API.

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

7 years ago[C API] Fix several null pointer dereferences.
whitequark [Sat, 12 Nov 2016 03:38:23 +0000 (03:38 +0000)]
[C API] Fix several null pointer dereferences.

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

7 years ago[libFuzzer] one more trophy
Kostya Serebryany [Sat, 12 Nov 2016 02:55:45 +0000 (02:55 +0000)]
[libFuzzer] one more trophy

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

7 years ago[libFuzzer] use a valid ASCII string for a dummy seed corpus
Kostya Serebryany [Sat, 12 Nov 2016 02:27:21 +0000 (02:27 +0000)]
[libFuzzer] use a valid ASCII string for a dummy seed corpus

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

7 years ago[ORC] Add a WrappedHandlerReturn type to map handler return types onto error
Lang Hames [Sat, 12 Nov 2016 02:19:31 +0000 (02:19 +0000)]
[ORC] Add a WrappedHandlerReturn type to map handler return types onto error
return types.

This class allows user provided handlers to return either error-wrapped types
or plain types. In the latter case, the plain type is wrapped with a success
value of Error or Expected<T> type to fit it into the rest of the serialization
machinery.

This patch allows us to remove the RPC unit-test workaround added in r286646.

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

7 years agoImprove `git llvm push` to suggest `git pull` when applying patch fails
Mehdi Amini [Sat, 12 Nov 2016 01:17:59 +0000 (01:17 +0000)]
Improve `git llvm push` to suggest `git pull` when applying patch fails

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

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

7 years agoOne more set of changes to fix formatv() on linux.
Zachary Turner [Sat, 12 Nov 2016 00:35:58 +0000 (00:35 +0000)]
One more set of changes to fix formatv() on linux.

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

7 years agoAdd missing #include.
Zachary Turner [Sat, 12 Nov 2016 00:30:37 +0000 (00:30 +0000)]
Add missing #include.

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

7 years agoFix another problem with formatv().
Zachary Turner [Sat, 12 Nov 2016 00:28:10 +0000 (00:28 +0000)]
Fix another problem with formatv().

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

7 years ago[libFuzzer] use less stack
Kostya Serebryany [Sat, 12 Nov 2016 00:24:35 +0000 (00:24 +0000)]
[libFuzzer] use less stack

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

7 years agoRemove extra semicolon.
Rui Ueyama [Sat, 12 Nov 2016 00:23:32 +0000 (00:23 +0000)]
Remove extra semicolon.

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

7 years agoAMDGPU/SI: Promote i16 = fp_[us]int f32 for VI
Tom Stellard [Sat, 12 Nov 2016 00:19:11 +0000 (00:19 +0000)]
AMDGPU/SI: Promote i16 = fp_[us]int f32 for VI

Summary: This fixes a regression caused by r286464.

Reviewers: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye

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

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

7 years agoTry to fix build after llvm::formatv() patch.
Zachary Turner [Sat, 12 Nov 2016 00:18:42 +0000 (00:18 +0000)]
Try to fix build after llvm::formatv() patch.

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

7 years agoFix -Werror build with clang-cl.
Zachary Turner [Fri, 11 Nov 2016 23:58:11 +0000 (23:58 +0000)]
Fix -Werror build with clang-cl.

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

7 years ago[Support] Introduce llvm::formatv() function.
Zachary Turner [Fri, 11 Nov 2016 23:57:40 +0000 (23:57 +0000)]
[Support] Introduce llvm::formatv() function.

This introduces a new type-safe general purpose formatting
library.  It provides compile-time type safety, does not require
a format specifier (since the type is deduced), and provides
mechanisms for extending the format capability to user defined
types, and overriding the formatting behavior for existing types.

This patch additionally adds documentation for the API to the
LLVM programmer's manual.

Mailing List Thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105836.html

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

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

7 years agoDefine DbiStreamBuilder::addSectionContribs.
Rui Ueyama [Fri, 11 Nov 2016 23:41:13 +0000 (23:41 +0000)]
Define DbiStreamBuilder::addSectionContribs.

This patch defines a new function to add a SectionContribs stream
to a PDB file. Unlike SectionMap, SectionContribs contains a list
of input sections as opposed to output sections.

Note that this patch needs improving because currently we do not
set Module field in SectionContribs entries. In a follow-up patch,
I'll add Modules and then fix it after that.

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

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

7 years agoAMDGPU/SI: Fix visit order assumption in SIFixSGPRCopies
Tom Stellard [Fri, 11 Nov 2016 23:35:42 +0000 (23:35 +0000)]
AMDGPU/SI: Fix visit order assumption in SIFixSGPRCopies

Summary:
This pass was assuming that when a PHI instruction defined a register
used by another PHI instruction that the defining insstruction would
be legalized before the using instruction.

This assumption was causing the pass to not legalize some PHI nodes
within divergent flow-control.

This fixes a bug that was uncovered by r285762.

Reviewers: nhaehnle, arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits

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

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

7 years agoPrint correct directory in merge script.
Richard Trieu [Fri, 11 Nov 2016 23:26:28 +0000 (23:26 +0000)]
Print correct directory in merge script.

When providing the project directory to the merge script, print it out in the
commit instructions instead of the default project directory.

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

7 years ago[InstCombine] use dyn_cast rather isa+cast; NFC
Sanjay Patel [Fri, 11 Nov 2016 23:20:01 +0000 (23:20 +0000)]
[InstCombine] use dyn_cast rather isa+cast; NFC

Follow-up to r286664 cleanup as suggested by Eli. Thanks!

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

7 years ago[InstCombine] update test to use FileCheck; NFC
Sanjay Patel [Fri, 11 Nov 2016 23:12:46 +0000 (23:12 +0000)]
[InstCombine] update test to use FileCheck; NFC

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