OSDN Git Service

android-x86/external-llvm.git
7 years ago[AMDGPU] Refactor waitcnt encoding
Konstantin Zhuravlyov [Tue, 11 Oct 2016 18:58:22 +0000 (18:58 +0000)]
[AMDGPU] Refactor waitcnt encoding

- Refactor bit packing/unpacking
- Calculate bit mask given bit shift and bit width
- Introduce function for decoding bits of waitcnt
- Introduce function for encoding bits of waitcnt
- Introduce function for getting waitcnt mask (instead of using bare numbers)
- Introduce function fot getting max waitcnt(s) (instead of using bare numbers)

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

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

7 years agoAllow Switch instruction to have extractProfTotalWeight called as it can terminate...
Dehao Chen [Tue, 11 Oct 2016 18:53:00 +0000 (18:53 +0000)]
Allow Switch instruction to have extractProfTotalWeight called as it can terminate a basic block. (NFC)

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

7 years agoAvoid unnecessary constexpr to appease MSVC 2013
Reid Kleckner [Tue, 11 Oct 2016 18:35:13 +0000 (18:35 +0000)]
Avoid unnecessary constexpr to appease MSVC 2013

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

7 years agoFix "static initialization order fiasco" for the XCore Target.
Mehdi Amini [Tue, 11 Oct 2016 18:22:41 +0000 (18:22 +0000)]
Fix "static initialization order fiasco" for the XCore Target.

I fixed all the other Targets in r283702, and interestingly the
sanitizers are only now "sometimes" catching this bug on the only
one I missed.

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

7 years ago[Support] Fix undefined behavior in RandomNumberGenerator.
Zachary Turner [Tue, 11 Oct 2016 18:17:26 +0000 (18:17 +0000)]
[Support] Fix undefined behavior in RandomNumberGenerator.

This has existed pretty much forever AFAICT, but the code was
never being exercised because nobody was using the class.  A
user of this class surfaced, and now we're breaking with UB.
The code was obviously wrong, so it's fixed here.

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

7 years ago[AMDGPU] Fix test that was broken by rL283893
Konstantin Zhuravlyov [Tue, 11 Oct 2016 18:16:56 +0000 (18:16 +0000)]
[AMDGPU] Fix test that was broken by rL283893

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

7 years agoARMMachineFunctionInfo.cpp: Add an initializer of ARMFunctionInfo::ReturnRegsCount...
NAKAMURA Takumi [Tue, 11 Oct 2016 17:38:30 +0000 (17:38 +0000)]
ARMMachineFunctionInfo.cpp: Add an initializer of ARMFunctionInfo::ReturnRegsCount in the explicit ctor.

It caused crash since r283867.

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

7 years agoReformat.
NAKAMURA Takumi [Tue, 11 Oct 2016 17:38:25 +0000 (17:38 +0000)]
Reformat.

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

7 years ago[DAG] add fold for masked negated sign-extended bool
Sanjay Patel [Tue, 11 Oct 2016 17:05:52 +0000 (17:05 +0000)]
[DAG] add fold for masked negated sign-extended bool

This enhances the fold added with:
https://reviews.llvm.org/rL283900

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

7 years ago[x86] add sext variants of tests added with r283894
Sanjay Patel [Tue, 11 Oct 2016 16:49:52 +0000 (16:49 +0000)]
[x86] add sext variants of tests added with r283894

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

7 years agoLet test pass for builds that support X86, but do not default to it
Bernard Ogden [Tue, 11 Oct 2016 16:34:49 +0000 (16:34 +0000)]
Let test pass for builds that support X86, but do not default to it

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

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

7 years agoFix test on non-x86 hosts
Bernard Ogden [Tue, 11 Oct 2016 16:32:37 +0000 (16:32 +0000)]
Fix test on non-x86 hosts

Summary:
This test is allowed to run on non-x86 hosts and thus must use
llvm-nm rather than nm.

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

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

7 years ago[DAG] add fold for masked negated extended bool
Sanjay Patel [Tue, 11 Oct 2016 16:26:36 +0000 (16:26 +0000)]
[DAG] add fold for masked negated extended bool

The non-obvious motivation for adding this fold (which already happens in InstCombine)
is that we want to canonicalize IR towards select instructions and canonicalize DAG
nodes towards boolean math. So we need to recreate some folds in the DAG to handle that
change in direction.

An interesting implementation difference for cases like this is that InstCombine
generally works top-down while the DAG goes bottom-up. That means we need to detect
different patterns. In this case, the SimplifyDemandedBits fold prevents us from
performing a zext to sext fold that would then be recognized as a negation of a sext.

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

7 years agoSilence unused warning in non-assert builds.
Daniel Jasper [Tue, 11 Oct 2016 16:22:36 +0000 (16:22 +0000)]
Silence unused warning in non-assert builds.

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

7 years ago[opt-viewer] Remove unnecessary call to demangle
Adam Nemet [Tue, 11 Oct 2016 16:20:40 +0000 (16:20 +0000)]
[opt-viewer] Remove unnecessary call to demangle

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

7 years ago[opt-viewer] Print hotness as percentage of the maximum hotness
Adam Nemet [Tue, 11 Oct 2016 16:20:38 +0000 (16:20 +0000)]
[opt-viewer] Print hotness as percentage of the maximum hotness

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

7 years ago[opt-viewer] Convert another HTML output to use a multiline string
Adam Nemet [Tue, 11 Oct 2016 16:19:06 +0000 (16:19 +0000)]
[opt-viewer] Convert another HTML output to use a multiline string

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

7 years ago[x86] add tests to show missed folds for masked bools
Sanjay Patel [Tue, 11 Oct 2016 16:04:37 +0000 (16:04 +0000)]
[x86] add tests to show missed folds for masked bools

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

7 years agoAMDGPU/SI: Update ISA version numbers for Tonga and Polaris10/11.
Changpeng Fang [Tue, 11 Oct 2016 16:00:47 +0000 (16:00 +0000)]
AMDGPU/SI: Update ISA version numbers for Tonga and Polaris10/11.

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

Reviewers:
  tstellarAMD

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

7 years ago[cl] Don't print subcommand help when no subcommands present.
Zachary Turner [Tue, 11 Oct 2016 15:58:48 +0000 (15:58 +0000)]
[cl] Don't print subcommand help when no subcommands present.

Previously we would print

  USAGE: <exe> [subcommand] [options]

Even if no subcommands were present.  This changes the output
format to only print "[subcommand]" if there is at least one
subcommand.

Fixes llvm.org/pr30598

Patch by Serge Guelton

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

7 years ago[DAG] simplify logic; NFC
Sanjay Patel [Tue, 11 Oct 2016 14:14:30 +0000 (14:14 +0000)]
[DAG] simplify logic; NFC

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

7 years ago[DAG] hoist DL(N) and fix formatting; NFC
Sanjay Patel [Tue, 11 Oct 2016 14:04:24 +0000 (14:04 +0000)]
[DAG] hoist DL(N) and fix formatting; NFC

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

7 years ago[X86][SSE] Regenerate scalar i64 uitofp test
Simon Pilgrim [Tue, 11 Oct 2016 14:01:38 +0000 (14:01 +0000)]
[X86][SSE] Regenerate scalar i64 uitofp test

Added 32-bit target test

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

7 years ago[X86][SSE] Regenerate vector load-trunc test
Simon Pilgrim [Tue, 11 Oct 2016 13:55:49 +0000 (13:55 +0000)]
[X86][SSE] Regenerate vector load-trunc test

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

7 years ago[X86][SSE] Regenerate vsplit and tests
Simon Pilgrim [Tue, 11 Oct 2016 13:51:44 +0000 (13:51 +0000)]
[X86][SSE] Regenerate vsplit and tests

To make it more obvious how bad some of that truncation code is....

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

7 years ago[DAG] fix formatting; NFC
Sanjay Patel [Tue, 11 Oct 2016 13:47:43 +0000 (13:47 +0000)]
[DAG] fix formatting; NFC

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

7 years ago[LCSSA] Implement linear algorithm for the isRecursivelyLCSSAForm
Igor Laevsky [Tue, 11 Oct 2016 13:37:22 +0000 (13:37 +0000)]
[LCSSA] Implement linear algorithm for the isRecursivelyLCSSAForm

For each block check that it doesn't have any uses outside of it's innermost loop.

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

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

7 years ago[x86] update test to use FileCheck and auto-generate checks
Sanjay Patel [Tue, 11 Oct 2016 13:36:07 +0000 (13:36 +0000)]
[x86] update test to use FileCheck and auto-generate checks

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

7 years ago[Support/ELF] - Add OpenBSD PT_OPENBSD_RANDOMIZE, PT_OPENBSD_WXNEEDED constants.
George Rimar [Tue, 11 Oct 2016 11:53:33 +0000 (11:53 +0000)]
[Support/ELF] - Add OpenBSD PT_OPENBSD_RANDOMIZE, PT_OPENBSD_WXNEEDED constants.

Docs for reference:
http://man.openbsd.org/OpenBSD-current/man5/elf.5
https://github.com/openbsd/src/commit/2a5a8fc7e30928c2cff57cfe5fb491c90d8478ad

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

7 years ago[Thumb] Save/restore high registers in Thumb1 pro/epilogues
Oliver Stannard [Tue, 11 Oct 2016 10:12:25 +0000 (10:12 +0000)]
[Thumb] Save/restore high registers in Thumb1 pro/epilogues

The high registers are not allocatable in Thumb1 functions, but they
could still be used by inline assembly, so we need to save and restore
the callee-saved high registers (r8-r11) in the prologue and epilogue.

This is complicated by the fact that the Thumb1 push and pop
instructions cannot access these registers. Therefore, we have to move
them down into low registers before pushing, and move them back after
popping into low registers.

In most functions, we will have low registers that are also being
pushed/popped, which we can use as the temporary registers for
saving/restoring the high registers. However, this is not guaranteed, so
we may need to push some extra low registers to ensure that the high
registers can be saved/restored. For correctness, it would be sufficient
to use just one low register, but if we have enough low registers
available then we only need one push/pop instruction, rather than one
per high register.

We can also use the argument/return registers when they are not live,
and the link register when saving (but not restoring), reducing the
number of extra registers we need to push.

There are still a few extreme edge cases where we need two push/pop
instructions, because not enough low registers can be made live in the
prologue or epilogue.

In addition to the regression tests included here, I've also tested this
using a script to generate functions which clobber different
combinations of registers, have different numbers of argument and return
registers (including variadic arguments), allocate different fixed sized
objects on the stack, and do or don't use variable sized allocas and the
__builtin_return_address intrinsic (all of which affect the available
registers in the prologue and epilogue). I ran these functions in a test
harness which verifies that all of the callee-saved registers are
correctly preserved.

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

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

7 years ago[ARM] Fix registers clobbered by SjLj EH on soft-float targets
Oliver Stannard [Tue, 11 Oct 2016 10:06:59 +0000 (10:06 +0000)]
[ARM] Fix registers clobbered by SjLj EH on soft-float targets

Currently, the Int_eh_sjlj_dispatchsetup intrinsic is marked as
clobbering all registers, including floating-point registers that may
not be present on the target. This is technically true, as we could get
linked against code that does use the FP registers, but that will not
actually work, as the soft-float code cannot save and restore the FP
registers. SjLj exception handling can only work correctly if either all
or none of the code is built for a target with FP registers. Therefore,
we can assume that, when Int_eh_sjlj_dispatchsetup is compiled for a
soft-float target, it is only going to be linked against other
soft-float code, and so only clobbers the general-purpose registers.
This allows us to check that no non-savable registers are clobbered when
generating the prologue/epilogue.

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

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

7 years ago[AArch64] Allow label arithmetic with add/sub/cmp
Diana Picus [Tue, 11 Oct 2016 09:17:47 +0000 (09:17 +0000)]
[AArch64] Allow label arithmetic with add/sub/cmp

Allow instructions such as 'cmp w0, #(end - start)' by folding the
expression into a constant. For ELF, we fold only if the symbols are in
the same section. For MachO, we fold if the expression contains only
symbols that are not linker visible.

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

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

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

7 years agoFix formatting in findRegisterUseOperandIdx. NFC.
Fraser Cormack [Tue, 11 Oct 2016 09:09:21 +0000 (09:09 +0000)]
Fix formatting in findRegisterUseOperandIdx. NFC.

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

7 years agoReverted r283740 [Object/ELF] - Do not crash on invalid Header->e_shoff value.
George Rimar [Tue, 11 Oct 2016 08:12:27 +0000 (08:12 +0000)]
Reverted r283740 [Object/ELF] - Do not crash on invalid Header->e_shoff value.

Bot does not like it: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/17075

/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/Object/invalid.test:70:32: error: expected string not found in input
INVALID-SEC-ADDRESS-ALIGNMENT: Invalid address alignment of section headers
                               ^
<stdin>:1:1: note: scanning from here
/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Object/ELF.h:412:7: runtime error: upcast of misaligned address 0x000002d8b899 for type 'llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::endianness::little, true> >', which requires 2 byte alignment
^
<stdin>:1:125: note: possible intended match here
/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Object/ELF.h:412:7: runtime error: upcast of misaligned address 0x000002d8b899 for type 'llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::endianness::little, true> >', which requires 2 byte alignment

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

7 years agoRevert "Codegen: Tail-duplicate during placement."
Daniel Jasper [Tue, 11 Oct 2016 07:36:11 +0000 (07:36 +0000)]
Revert "Codegen: Tail-duplicate during placement."

This reverts commit r283842.

test/CodeGen/X86/tail-dup-repeat.ll causes and llc crash with our
internal testing. I'll share a link with you.

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

7 years agoUse LLVM_CONSTEXPR to appease MSVC2013 (fixup for r283854)
Mehdi Amini [Tue, 11 Oct 2016 07:29:43 +0000 (07:29 +0000)]
Use LLVM_CONSTEXPR to appease MSVC2013 (fixup for r283854)

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

7 years agoMake RandomNumberGenerator compatible with <random>
Mehdi Amini [Tue, 11 Oct 2016 07:13:01 +0000 (07:13 +0000)]
Make RandomNumberGenerator compatible with <random>

LLVM's RandomNumberGenerator wasn't compatible with
the random distribution from <random>.

Fixes PR25105

Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu>

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

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

7 years agoTune isHotFunction/isColdFunction
Dehao Chen [Tue, 11 Oct 2016 05:19:00 +0000 (05:19 +0000)]
Tune isHotFunction/isColdFunction

Summary: This patch sets function as hot if function's entry count is hot/cold.

Reviewers: eraman, davidxl

Subscribers: llvm-commits

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

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

7 years agoFix warning; NFC
Matthias Braun [Tue, 11 Oct 2016 04:32:03 +0000 (04:32 +0000)]
Fix warning; NFC

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

7 years agoMIRParser: generic register operands with types
Matthias Braun [Tue, 11 Oct 2016 04:22:29 +0000 (04:22 +0000)]
MIRParser: generic register operands with types

This should fix the fallout of r283848.

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

7 years agoMIRParser: Rewrite register info initialization; mostly NFC
Matthias Braun [Tue, 11 Oct 2016 03:13:01 +0000 (03:13 +0000)]
MIRParser: Rewrite register info initialization; mostly NFC

This changes MachineRegisterInfo to be initializes after parsing all
instructions. This is in preparation for upcoming commits that allow the
register class specification on the operand or deduce them from the
MCInstrDesc.

This commit removes the unused feature of having nonsequential register
numbers. This was confusing anyway as the vreg numbers would be
different after parsing when you had "holes" in your numbering.

This patch also introduces the concept of an incomplete virtual
register. An incomplete virtual register may be used during .mir parsing
to construct MachineOperands without knowing the exact register class
(or register bank) yet.

NFC except for some error messages.

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

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

7 years agoCodegen: Tail-duplicate during placement.
Kyle Butt [Tue, 11 Oct 2016 01:20:33 +0000 (01:20 +0000)]
Codegen: Tail-duplicate during placement.

The tail duplication pass uses an assumed layout when making duplication
decisions. This is fine, but passes up duplication opportunities that
may arise when blocks are outlined. Because we want the updated CFG to
affect subsequent placement decisions, this change must occur during
placement.

In order to achieve this goal, TailDuplicationPass is split into a
utility class, TailDuplicator, and the pass itself. The pass delegates
nearly everything to the TailDuplicator object, except for looping over
the blocks in a function. This allows the same code to be used for tail
duplication in both places.

This change, in concert with outlining optional branches, allows
triangle shaped code to perform much better, esepecially when the
taken/untaken branches are correlated, as it creates a second spine when
the tests are small enough.

Issue from previous rollback fixed, and a new test was added for that
case as well. Issue was worklist/scheduling/taildup issue in layout.

Issue from 2nd rollback fixed, with 2 additional tests. Issue was
tail merging/loop info/tail-duplication causing issue with loops that share
a header block.

Issue with early tail-duplication of blocks that branch to a fallthrough
predecessor fixed with test case: tail-dup-branch-to-fallthrough.ll

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

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

7 years ago[libFuzzer] implement value profile for switch, increase the size of the PCs array...
Kostya Serebryany [Tue, 11 Oct 2016 01:14:41 +0000 (01:14 +0000)]
[libFuzzer] implement value profile for switch, increase the size of the PCs array, make sure we don't overflow it

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

7 years ago[libFuzzer] add switch tests
Kostya Serebryany [Tue, 11 Oct 2016 01:13:32 +0000 (01:13 +0000)]
[libFuzzer] add switch tests

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

7 years ago[RegAllocGreedy] Attempt to split unspillable live intervals
Dylan McKay [Tue, 11 Oct 2016 01:04:36 +0000 (01:04 +0000)]
[RegAllocGreedy] Attempt to split unspillable live intervals

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

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

This fixes LLVM bug PR14879.

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

Reviewers: qcolombet

Subscribers: MatzeB

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

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

7 years ago[InstCombine] Transform !range metadata to !nonnull when combining loads
David Majnemer [Tue, 11 Oct 2016 01:00:45 +0000 (01:00 +0000)]
[InstCombine] Transform !range metadata to !nonnull when combining loads

When combining an integer load with !range metadata that does not include 0 to a pointer load, make sure emit !nonnull metadata on the newly-created pointer load. This prevents the !nonnull metadata from being dropped during a ptrtoint/inttoptr pair.

This fixes PR30597.

Patch by Ariel Ben-Yehuda!

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

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

7 years ago[AArch64][InstructionSelector] Teach how to select FP load/store.
Quentin Colombet [Tue, 11 Oct 2016 00:21:14 +0000 (00:21 +0000)]
[AArch64][InstructionSelector] Teach how to select FP load/store.

This patch allows to select 32 and 64-bit FP load and store.

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

7 years ago[AArch64][InstructionSelector] Teach the selector how to handle vector OR.
Quentin Colombet [Tue, 11 Oct 2016 00:21:11 +0000 (00:21 +0000)]
[AArch64][InstructionSelector] Teach the selector how to handle vector OR.

This only adds the support for 64-bit vector OR. Adding more sizes is
not difficult, but it requires a bigger refactoring because ORs work on
any size, not necessarly the ones that match the width of the register
width. Right now, this is not expressed in the legalization, so don't
bother pushing the refactoring yet.

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

7 years ago[AArch64][MachineLegalizer] Mark v2s32 G_LOAD as legal.
Quentin Colombet [Tue, 11 Oct 2016 00:21:08 +0000 (00:21 +0000)]
[AArch64][MachineLegalizer] Mark v2s32 G_LOAD as legal.

Actually every 64-bit loads are legal, but right now the API does not
offer a simple way to express that.

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

7 years agoRevert r283824 and r283823: Define DbiStreamBuilder::addDbgStream to add stream.
Rui Ueyama [Tue, 11 Oct 2016 00:15:50 +0000 (00:15 +0000)]
Revert r283824 and r283823: Define DbiStreamBuilder::addDbgStream to add stream.

This reverts commit r283824 and r283823 to fix buildbots.

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

7 years agoFix a bug in DbiStreamBuilder::addDbgStream.
Rui Ueyama [Mon, 10 Oct 2016 23:44:04 +0000 (23:44 +0000)]
Fix a bug in DbiStreamBuilder::addDbgStream.

This feature will be tested in LLD unit tests.

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

7 years agoDefine DbiStreamBuilder::addDbgStream to add stream.
Rui Ueyama [Mon, 10 Oct 2016 23:35:36 +0000 (23:35 +0000)]
Define DbiStreamBuilder::addDbgStream to add stream.

Previously, there is no way to create a stream other than pre-defined
special stream such as DBI or IPI. This patch adds a new method,
addDbgStream, to add a debug stream to a PDB file.

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

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

7 years agoFix issue which cases lit installed with setup.py to not resolve main
Chris Matthews [Mon, 10 Oct 2016 23:22:11 +0000 (23:22 +0000)]
Fix issue which cases lit installed with setup.py to not resolve main

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

7 years agoFix llvm-lit.in corresponding to r283710.
NAKAMURA Takumi [Mon, 10 Oct 2016 23:02:42 +0000 (23:02 +0000)]
Fix llvm-lit.in corresponding to r283710.

  Traceback (most recent call last):
    File "bin/llvm-lit", line 44, in <module>
      lit.main(builtin_parameters)
  AttributeError: 'module' object has no attribute 'main'

Suggested by Artem Belevich.

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

7 years agoRevert r283690, "MC: Remove unused entities."
Peter Collingbourne [Mon, 10 Oct 2016 22:49:37 +0000 (22:49 +0000)]
Revert r283690, "MC: Remove unused entities."

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

7 years ago[x86] auto-generate checks
Sanjay Patel [Mon, 10 Oct 2016 22:04:12 +0000 (22:04 +0000)]
[x86] auto-generate checks

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

7 years ago[x86] auto-generate checks
Sanjay Patel [Mon, 10 Oct 2016 22:01:42 +0000 (22:01 +0000)]
[x86] auto-generate checks

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

7 years agoGlobalISel: select G_GLOBAL_VALUE uses on AArch64.
Tim Northover [Mon, 10 Oct 2016 21:50:00 +0000 (21:50 +0000)]
GlobalISel: select G_GLOBAL_VALUE uses on AArch64.

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

7 years agoGlobalISel: allow G_GLOBAL_VALUEs in AArch64 legalization.
Tim Northover [Mon, 10 Oct 2016 21:49:53 +0000 (21:49 +0000)]
GlobalISel: allow G_GLOBAL_VALUEs in AArch64 legalization.

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

7 years agoGlobalISel: support selecting G_GEP instructions.
Tim Northover [Mon, 10 Oct 2016 21:49:49 +0000 (21:49 +0000)]
GlobalISel: support selecting G_GEP instructions.

They're basically just an alias for G_ADD on AArch64.

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

7 years agoGlobalISel: support selecting constants on AArch64.
Tim Northover [Mon, 10 Oct 2016 21:49:42 +0000 (21:49 +0000)]
GlobalISel: support selecting constants on AArch64.

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

7 years agoRename isHotFunction/isColdFunction to isFunctionEntryHot/isFunctionEntryCold. (NFC)
Dehao Chen [Mon, 10 Oct 2016 21:47:28 +0000 (21:47 +0000)]
Rename isHotFunction/isColdFunction to isFunctionEntryHot/isFunctionEntryCold. (NFC)

This is in preparation for https://reviews.llvm.org/D25048

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

7 years agoRevert "Disallow ArrayRef assignment from temporaries."
Zachary Turner [Mon, 10 Oct 2016 21:36:23 +0000 (21:36 +0000)]
Revert "Disallow ArrayRef assignment from temporaries."

This reverts commit r283798, as it causes static asserts on
MSVC 2015 with the following errors:

ArrayRefTest.cpp(38): error C2338: Assigning from single prvalue element
ArrayRefTest.cpp(41): error C2338: Assigning from single xvalue element
ArrayRefTest.cpp(47): error C2338: Assigning from an initializer list

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

7 years agoRename llvm::apply -> llvm::apply_tuple.
Zachary Turner [Mon, 10 Oct 2016 21:24:34 +0000 (21:24 +0000)]
Rename llvm::apply -> llvm::apply_tuple.

llvm::cl already has a function called llvm::apply() so this is
causing an ODR violation.  The STLExtras version should win the
vote on which one gets to be called apply() since it is named
after the equivalent STL function, but since renaiming the cl
version is more difficult, let's do this for now to get the
bots green.

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

7 years agoDisallow ArrayRef assignment from temporaries.
Jordan Rose [Mon, 10 Oct 2016 20:57:33 +0000 (20:57 +0000)]
Disallow ArrayRef assignment from temporaries.

Without this, the following statements will create ArrayRefs that
refer to temporary storage that goes out of scope by the end of the
line:

  someArrayRef = getSingleElement();
  someArrayRef = {elem1, elem2};

Note that the constructor still has this problem:

  ArrayRef<Element> someArrayRef = getSingleElement();
  ArrayRef<Element> someArrayRef = {elem1, elem2};

but that's a little harder to get rid of because we want to be able to
use this in calls:

  takesArrayRef(getSingleElement());
  takesArrayRef({elem1, elem2});

Part of rdar://problem/16375365. Reviewed by Duncan Exon Smith.

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

7 years ago[SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal
Hal Finkel [Mon, 10 Oct 2016 20:45:15 +0000 (20:45 +0000)]
[SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal

Add integer expansion for FLT_ROUNDS_ for targets where i32 is not a legal
type.

Patch by Edward Jones, thanks!

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

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

7 years ago[ADT] Use () instead of {} in an attempt to work around MSVC 2012 ICEs.
Justin Lebar [Mon, 10 Oct 2016 20:18:02 +0000 (20:18 +0000)]
[ADT] Use () instead of {} in an attempt to work around MSVC 2012 ICEs.

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

7 years ago[ADT] Don't use make_pointee_iterator in IteratorTest.
Justin Lebar [Mon, 10 Oct 2016 19:56:52 +0000 (19:56 +0000)]
[ADT] Don't use make_pointee_iterator in IteratorTest.

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

7 years agoUse StringRef in TableGen generated Intrinsics.gen file (NFC)
Mehdi Amini [Mon, 10 Oct 2016 19:31:09 +0000 (19:31 +0000)]
Use StringRef in TableGen generated Intrinsics.gen file (NFC)

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

7 years ago[ADT] Remove make_pointe{e,r}_iterator, because it seems to crash MSVC 2015.
Justin Lebar [Mon, 10 Oct 2016 19:29:37 +0000 (19:29 +0000)]
[ADT] Remove make_pointe{e,r}_iterator, because it seems to crash MSVC 2015.

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

7 years agoTeach llvm::StripDebugInfo() about global variable !dbg attachments.
Adrian Prantl [Mon, 10 Oct 2016 17:53:33 +0000 (17:53 +0000)]
Teach llvm::StripDebugInfo() about global variable !dbg attachments.
This is a regression introduced by the global variable ownership
reversal performed in r281284.

rdar://problem/28448075

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

7 years ago[ADT] Attempt to fix MSVC 2015 ICE via judicious addition of std::decay to make_point...
Justin Lebar [Mon, 10 Oct 2016 17:18:45 +0000 (17:18 +0000)]
[ADT] Attempt to fix MSVC 2015 ICE via judicious addition of std::decay to make_pointe{r,e}_iterator.

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

7 years agoUpdate documentation after r283671 ("Turn cl::values() (for enum) from a vararg funct...
Mehdi Amini [Mon, 10 Oct 2016 17:13:14 +0000 (17:13 +0000)]
Update documentation after r283671 ("Turn cl::values() (for enum) from a vararg function to using C++ variadic template")

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

7 years agoAdd llvm::apply to STLExtras.
Zachary Turner [Mon, 10 Oct 2016 16:44:09 +0000 (16:44 +0000)]
Add llvm::apply to STLExtras.

This is equivalent to the C++14 std::apply().  Since we are not
using C++14 yet, this allows us to still make use of apply anyway.

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

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

7 years agoUse unique_ptr in LLVMContextImpl's constant maps.
Justin Lebar [Mon, 10 Oct 2016 16:26:13 +0000 (16:26 +0000)]
Use unique_ptr in LLVMContextImpl's constant maps.

Reviewers: timshen

Subscribers: cfe-commits

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

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

7 years ago[ADT] Add make_pointe{e,r}_iterator.
Justin Lebar [Mon, 10 Oct 2016 16:26:03 +0000 (16:26 +0000)]
[ADT] Add make_pointe{e,r}_iterator.

Reviewers: timshen

Subscribers: llvm-commits

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

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

7 years ago[ADT] Let MapVector handle non-copyable values.
Justin Lebar [Mon, 10 Oct 2016 16:25:59 +0000 (16:25 +0000)]
[ADT] Let MapVector handle non-copyable values.

Summary: The keys must still be copyable, because we store two copies of them.

Reviewers: timshen

Subscribers: llvm-commits

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

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

7 years ago[ARM] Fix invalid VLDM/VSTM access when targeting Big Endian with NEON
Alexandros Lamprineas [Mon, 10 Oct 2016 16:01:54 +0000 (16:01 +0000)]
[ARM] Fix invalid VLDM/VSTM access when targeting Big Endian with NEON

The instructions VLDM/VSTM can only access word-aligned memory
locations and produce alignment fault if the condition is not met.

The compiler currently generates VLDM/VSTM for v2f64 load/store
regardless the alignment of the memory access. Instead, if a v2f64
load/store is not word-aligned, the compiler should generate
VLD1/VST1. For each non double-word-aligned VLD1/VST1, a VREV
instruction should be generated when targeting Big Endian.

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

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

7 years agoAdd return type for checkForValidSection parsing function. NFC Intended.
Nirav Dave [Mon, 10 Oct 2016 15:24:54 +0000 (15:24 +0000)]
Add return type for checkForValidSection parsing function. NFC Intended.

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

7 years ago[X86] Prefer rotate by 1 over rotate by imm
Zvi Rackover [Mon, 10 Oct 2016 14:43:55 +0000 (14:43 +0000)]
[X86] Prefer rotate by 1 over rotate by imm

Summary:
Rotate by 1 is translated to 1 micro-op, while rotate with imm8 is translated to 2 micro-ops.

Fixes pr30644.

Reviewers: delena, igorb, craig.topper, spatel, RKSimon

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

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

7 years ago[SLPVectorizer][X86] Add 512-bit sitofp/uitofp tests
Simon Pilgrim [Mon, 10 Oct 2016 14:28:06 +0000 (14:28 +0000)]
[SLPVectorizer][X86] Add 512-bit sitofp/uitofp tests

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

7 years ago[SLPVectorizer][X86] Add avx512 sitofp/uitofp tests
Simon Pilgrim [Mon, 10 Oct 2016 14:14:31 +0000 (14:14 +0000)]
[SLPVectorizer][X86] Add avx512 sitofp/uitofp tests

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

7 years ago[SLPVectorizer][X86] Fixed alignments of scalar loads in sitofp/uitofp tests
Simon Pilgrim [Mon, 10 Oct 2016 14:10:41 +0000 (14:10 +0000)]
[SLPVectorizer][X86] Fixed alignments of scalar loads in sitofp/uitofp tests

Fixed copy+paste vector alignment to correct for per-element scalar loads

Increased to 512-bit data sizes in preparation of avx512 tests

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

7 years agoFixed windows stdout/stderr redirection in inline asm constraint tests
Simon Pilgrim [Mon, 10 Oct 2016 11:11:27 +0000 (11:11 +0000)]
Fixed windows stdout/stderr redirection in inline asm constraint tests

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

7 years ago[Object/ELF] - Do not crash on invalid Header->e_shoff value.
George Rimar [Mon, 10 Oct 2016 10:51:38 +0000 (10:51 +0000)]
[Object/ELF] - Do not crash on invalid Header->e_shoff value.

sections_begin() may return unalignment pointer when Header->e_shoff isinvalid.
That may result in a crash in clients, for example we have one in LLD:

assert((PtrWord & ~PointerBitMask) == 0 &&
       "Pointer is not sufficiently aligned");
fails when trying to push_back Elf_Shdr* (unaligned) into TinyPtrVector.

Patch forces check for alignment of Header->e_shoff.

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

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

7 years agoThis pass, fixing an erratum in some LEON 2 processors ensures that the SDIV instruct...
Chris Dewhurst [Mon, 10 Oct 2016 08:53:06 +0000 (08:53 +0000)]
This pass, fixing an erratum in some LEON 2 processors ensures that the SDIV instruction is not issued, but replaced by SDIVcc instead, which does not exhibit the error. Unit test included.

Differential Review: https://reviews.llvm.org/D24660

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

7 years agoFix WebAssembly build after r283702.
Daniel Jasper [Mon, 10 Oct 2016 06:49:55 +0000 (06:49 +0000)]
Fix WebAssembly build after r283702.

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

7 years ago[AVX-512] Add missing pattern sext or zext from bytes to quad words with a 128-bit...
Craig Topper [Mon, 10 Oct 2016 06:25:48 +0000 (06:25 +0000)]
[AVX-512] Add missing pattern sext or zext from bytes to quad words with a 128-bit load as input.

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

7 years ago[AVX-512] Add test cases for AVX512 sign/zero extend instructions derived from the...
Craig Topper [Mon, 10 Oct 2016 06:25:45 +0000 (06:25 +0000)]
[AVX-512] Add test cases for AVX512 sign/zero extend instructions derived from the sse41 and avx2 test cases. Code will be improved in future commits.

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

7 years ago[AVX-512] Add an AVX512VL/BW command line to sse41-pmovxrm.ll and avx2-pmovxrm.ll...
Craig Topper [Mon, 10 Oct 2016 06:25:42 +0000 (06:25 +0000)]
[AVX-512] Add an AVX512VL/BW command line to sse41-pmovxrm.ll and avx2-pmovxrm.ll. Also disable peephole so we really test pattern matching.

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

7 years ago[x86][inline-asm][llvm] accept 'v' constraint
Michael Zuckerman [Mon, 10 Oct 2016 05:48:56 +0000 (05:48 +0000)]
[x86][inline-asm][llvm] accept 'v' constraint

Commit in the name of:Coby Tayree
1.'v' constraint for (x86) non-avx arch imitates the already implemented 'x' constraint, i.e. allows XMM{0-15} & YMM{0-15} depending on the apparent arch & mode (32/64).
2.for the avx512 arch it allows [X,Y,Z]MM{0-31} (mode dependent)

This patch applies the needed changes to clang
 clang patch: https://reviews.llvm.org/D25004

Differential Revision: D25005

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

7 years ago[AVR] Enable generation of the TableGen assembly writer tables
Dylan McKay [Mon, 10 Oct 2016 01:28:45 +0000 (01:28 +0000)]
[AVR] Enable generation of the TableGen assembly writer tables

This also changes the order of the statements in CMakeLists.txt to be
alphabetical.

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

7 years ago[lit] Remove (or allow specific) unused imports
Brian Gesiak [Mon, 10 Oct 2016 01:22:06 +0000 (01:22 +0000)]
[lit] Remove (or allow specific) unused imports

Summary:
Using Python linter flake8 on the utils/lit reveals several linter
warnings designated "F401: Unused import". Fix or silence these
warnings.

Some of these unused imports are legitimate, while some are part of lit's API.
For example, users of lit expect to be able to access `lit.formats.ShTest` in
their `lit.cfg`, despite the module hierarchy for that symbol actually being
`lit.formats.shtest.ShTest`. To silence linter errors for these lines,
include a "noqa" directive.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: mehdi_amini, llvm-commits

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

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

7 years ago[lit] Remove unused TestingProgressDisplay attr
Brian Gesiak [Mon, 10 Oct 2016 01:20:43 +0000 (01:20 +0000)]
[lit] Remove unused TestingProgressDisplay attr

Summary:
`TestingProgressDisplay` initializes its `current` attribute to `None`, but
never reads or writes the value again. Remove it.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

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

7 years ago[lit] Fix undefined symbol ArgumentError
Brian Gesiak [Mon, 10 Oct 2016 01:19:27 +0000 (01:19 +0000)]
[lit] Fix undefined symbol ArgumentError

Summary:
`ArgumentError` is not defined by the Python standard library.
Executing this line of code would throw a exception, but not the
intended one. It would throw a `NameError` exception, since `ArgumentError`
is undefined.

Use `ValueError` instead, which is defined by the Python standard
library.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

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

7 years ago[lit] Remove semicolons in Python code
Brian Gesiak [Mon, 10 Oct 2016 01:18:14 +0000 (01:18 +0000)]
[lit] Remove semicolons in Python code

Summary:
Semicolons aren't necessary as statement terminators in Python, and
each of these uses are superfluous as they appear at the end of a line.
The convention is to not use semicolons where not needed, so remove them.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

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

7 years ago[lit] Remove unused variable in googletest format
Brian Gesiak [Mon, 10 Oct 2016 01:15:33 +0000 (01:15 +0000)]
[lit] Remove unused variable in googletest format

Summary: `prefix` is written to but never read.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

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

7 years ago[lit] Remove Python 2.6 and below exec workaround
Brian Gesiak [Mon, 10 Oct 2016 01:11:52 +0000 (01:11 +0000)]
[lit] Remove Python 2.6 and below exec workaround

Summary:
The minimum version of Python required to run LLVM's test suite is 2.7.
Remove a workaround for older Python versions.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

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

7 years ago[AVX-512] Port 128 and 256-bit memory->register sign/zero extend patterns from SSE...
Craig Topper [Sun, 9 Oct 2016 23:08:39 +0000 (23:08 +0000)]
[AVX-512] Port 128 and 256-bit memory->register sign/zero extend patterns from SSE file. Also add a minimal set for 512-bit.

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

7 years ago[X86] Remove redundant patterns. The same pattern appears a few lines up.
Craig Topper [Sun, 9 Oct 2016 23:08:33 +0000 (23:08 +0000)]
[X86] Remove redundant patterns. The same pattern appears a few lines up.

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