141781 Commits

Author SHA1 Message Date
Simon Pilgrim
46dd0f7aed [X86][AVX512] Add target shuffle tests showing missing UNPCK combines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 22:54:21 +00:00
Craig Topper
0cd80ce736 [X86] Mark 256-bit DPPS intrinsic as commutable to increase load matching opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288622 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 21:13:05 +00:00
Craig Topper
c166e1cfa6 [X86] Add Commutative property to several MMX arithmetic and logic intrinsics.
I think these intrinsics were added after the Commutative was added to most of the rest of the intrinsics and it must have been forgotten.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288621 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 21:13:01 +00:00
Michael Gottesman
6a2af3eb1d [stl-extras] Provide an adaptor of std::count for ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288619 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 10:26:53 +00:00
Dylan McKay
a31bc24eae [AVR] Remove 'XFAIL' from a CodeGen test
This seems to be fixed as of r288052.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288618 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 09:50:42 +00:00
Rafael Espindola
fb309b5c31 Always use / as the path separator.
It is not clear if it is worth the complexity to use \ on
windows. This should fix the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288616 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 07:27:02 +00:00
Rafael Espindola
2f8ebc0662 Prefix path when displaying thin archives.
Patch by Mark Santaniello.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288615 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 06:52:30 +00:00
Matthias Braun
013ca3cf77 TableGen: Store Records on a BumpPtrAllocator
All these records are internalized and will live until exit.  This makes
them perfect candidates for a fast BumpPtrAllocator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288613 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 05:48:20 +00:00
Matthias Braun
0c517c8dff TableGen: Use StringRef instead of const std::string& in return vals.
This will allow to switch to a different string storage in an upcoming
commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288612 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 05:48:16 +00:00
Matthias Braun
607c68326d TableGen: Optimize common string concatenation with SmallString
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288611 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 05:48:06 +00:00
Matthias Braun
5084450e17 TableGen: Use StringRef instead of const std::string& for parameters
This avoid an extra construction of a std::string (and a heap
allocation) when the caller only has a StringRef but no std::string at
hand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288610 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 05:48:03 +00:00
Lang Hames
85334ad0c5 [Object][MachO] Reference-ify some helper function arguments. NFC.
Changes all static helper functions in MachOObjectFile.cpp that expect a
non-null MachOObjectFile pointer to take a reference instead.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288608 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 01:56:10 +00:00
Dan Gohman
bbaf9cd246 [MC] Generalize MCContext's SectionSymbols field.
Change SectionSymbols so that it doesn't hard-code ELF types, so that
it can be used for non-ELF targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288607 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 23:55:57 +00:00
Matt Arsenault
728c815331 DAG: Fold out out of bounds insert_vector_elt
getNode already prevents formation of out of bounds constant
extract_vector_elts. Do the same for insert_vector_elt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288603 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 23:03:26 +00:00
Dan Gohman
2a88a6dddf [WebAssembly] Eliminate an ad-hoc command-line argument.
Use the target triple to determine whether to run the explicit-locals
pass, rather than using a separate command-line argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 23:00:12 +00:00
Saleem Abdulrasool
46db4b27f2 AMDGPU: remove a couple of unused variables
lib/Target/AMDGPU/SIRegisterInfo.cpp: In member function 'void llvm::SIRegisterInfo::spillSGPR(llvm::MachineBasicBlock::iterator, int, llvm::RegScavenger*) const':
	lib/Target/AMDGPU/SIRegisterInfo.cpp:572:30: warning: variable 'SubRC' set but not used [-Wunused-but-set-variable]
	   const TargetRegisterClass *SubRC = nullptr;
	                              ^
	lib/Target/AMDGPU/SIRegisterInfo.cpp: In member function 'void llvm::SIRegisterInfo::restoreSGPR(llvm::MachineBasicBlock::iterator, int, llvm::RegScavenger*) const':
	lib/Target/AMDGPU/SIRegisterInfo.cpp:723:30: warning: variable 'SubRC' set but not used [-Wunused-but-set-variable]
	   const TargetRegisterClass *SubRC = nullptr;
	                              ^

The variable was assigned to, but never used.  The functions called did not
mutate state.  Simplify the logic and remove the variable.  Identified by gcc
5.4.0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288601 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 22:25:21 +00:00
Saleem Abdulrasool
0b69b1f43c build: allow specifying the component to llvm_install_symlink
Add an optional parameter to `llvm_install_symlink` which allows the symlink
installation to be placed into a specific component rather than the default
value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288600 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 22:03:24 +00:00
Justin Lebar
d0aaae3b9a [PM] Rename lookupPass to lookUpPass.
Summary:
"Lookup" is a noun ("lookup table"), "look up" is a verb ("look up
'table' in the dictionary").

Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288598 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 19:49:35 +00:00
Justin Lebar
8645bc796c [PM] Get rid of an unused variable in AnalysisManager::clear(IRUnitT&).
Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288597 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 19:49:31 +00:00
Justin Lebar
6aaaf4ab09 [PM] Consistently use curly braces rather than std::make_pair in AnalysisResults.find().
Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288596 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 19:49:27 +00:00
Justin Lebar
6f16e4a0ee [PM] Don't walk the AM's ResultsList if nothing was invalidated.
Summary:
Previously in AnalysisManager::invalidate(), we would walk the full
ResultsList even if we knew that nothing was invalidated.

Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288595 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 19:49:23 +00:00
Justin Lebar
0f33f0738f [PM] Make AnalysisManager::registerPass take its parameter by universal reference.
Summary:
Previously, we were forcing a copy if you passed an lvalue argument; now
we'll take it by reference.

Reviewers: chandlerc

Subscribers: mehdi_amini, silvas, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288594 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 19:49:19 +00:00
Justin Lebar
bd6d5760d3 [PM] Make PassManager's constructor explicit.
Reviewers: chandlerc

Subscribers: silvas, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288593 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 19:49:15 +00:00
Justin Lebar
c8f08d85ab [PM] Make PreservedAnalyses::preserved take its parameter by const ref.
Summary: Previously we were unnecessarily copying the argument.

Reviewers: chandlerc

Subscribers: mehdi_amini, silvas, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288592 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 19:49:12 +00:00
Craig Topper
ad37a58d2d [AVX-512] Add many of the VPERM instructions to the load folding table. Move VPERMPDZri to the correct table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288591 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 19:37:39 +00:00
Matt Arsenault
0f9eec21e0 AMDGPU: Clean up struct initializers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288590 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 18:22:49 +00:00
Sanjay Patel
d4ddede406 [InstSimplify] add more helper functions for SimplifyICmpInst; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288589 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 18:03:53 +00:00
Sanjay Patel
b7a44fa355 [InstSimplify] add helper functions for SimplifyICmpInst; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288588 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 17:30:22 +00:00
Craig Topper
ae10a1c682 [AVX-512] Add EVEX VPMADDUBSW and VPMADDWD to the load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288587 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 17:19:15 +00:00
Sanjay Patel
20e9431b19 [InstCombine] change select type to eliminate bitcasts
This solves a secondary problem seen in PR6137:
https://llvm.org/bugs/show_bug.cgi?id=6137#c6

This is similar to the bitwise logic op fold added with:
https://reviews.llvm.org/rL287707

And like that patch, I'm artificially restricting the
transform from vector <-> scalar types until we're sure
that the backend can handle that. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288584 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 15:25:16 +00:00
Craig Topper
c018e3b303 [X86] Fix VEX encoded VPMADDUBSW to not be marked commutable.
This was accidentallly broken in r285515 when we started lowering the intrinsic to an ISD node. Should fix PR31241.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288578 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 05:35:44 +00:00
Craig Topper
09c0f52908 [X86] Add test cases demonstrating where we incorrectly commute VEX VPMADDUSBW due to a bug introduced in r285515.
I believe this is the cause of PR31241.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 05:35:38 +00:00
Michael Kuperstein
ceceabb371 Remove stale comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288572 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 01:59:13 +00:00
Haicheng Wu
f4638220d6 [TTI/CostModel] Correct the way getGEPCost() calls isLegalAddressingMode()
Fix a bug when we call isLegalAddressingMode() from getGEPCost().

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288569 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 01:57:24 +00:00
Kostya Serebryany
4732785cea [sanitizer-coverage] use IRB.SetCurrentDebugLocation after IRB.SetInsertPoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288568 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 01:43:30 +00:00
Matthias Braun
5bfd3196df testcase only works in a debug build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288567 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 01:42:32 +00:00
Mehdi Amini
bb4cc15a59 [doc] Add .arcconfig setup to the "how to work with a monorepo" section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288562 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 01:04:40 +00:00
Matthias Braun
970538c0b4 AArch64CollectLOH: Rewrite as block-local analysis.
Previously this pass was using up to 5% compile time in some cases which
is a bit much for what it is doing. The pass featured a full blown
data-flow analysis which in the default configuration was restricted to a
single block.

This rewrites the pass under the assumption that we only ever work on a
single block. This is done in a single pass maintaining a state machine
per general purpose register to catch LOH patterns.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 00:52:56 +00:00
Guozhi Wei
9d91f9059d [ppc] Correctly compute the cost of loading 32/64 bit memory into VSR
VSX has instructions lxsiwax/lxsdx that can load 32/64 bit value into VSX register cheaply. That patch makes it known to memory cost model, so the vectorization of the test case in pr30990 is beneficial.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288560 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 00:41:43 +00:00
Ivan Krasin
8460d68f0a Support escaping in TrigramIndex.
Summary:
This is a follow up to r288303, where I have introduced TrigramIndex
to speed up SpecialCaseList for the cases when all rules are
simple wildcards, like *hello*wor.d*.

Here, I add support for escaping, so that it's possible to
specify rules like *c\+\+abi*.

Reviewers: pcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288553 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 23:30:16 +00:00
Zachary Turner
1a45ade2ce Resubmit "[LibFuzzer] Split FuzzerUtil for Posix and Windows."
This resubmits r288529, which was resubmitted because it broke a
fuzzer bot.  According to kcc@ the test that broke was flakey
and it is unlikely to be a result of this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288549 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 23:02:01 +00:00
Jacques Pienaar
8860d3c0df [lanai] Custom lowering of SHL_PARTS
Summary: Implement custom lowering of SHL_PARTS to enable lowering of left shift with larger than 32-bit shifts.

Reviewers: eliben, majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288541 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 22:01:28 +00:00
Eugene Zelenko
fe88eab3e2 [IR] Fix some Clang-tidy modernize-use-equals-delete and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288540 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 22:00:59 +00:00
Zachary Turner
609477eea7 Revert "[LibFuzzer] Split FuzzerUtil for Posix and Windows."
This reverts commit r288529, as it seems to introduce some
problems on the Linux bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288533 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 20:54:56 +00:00
Dan Gohman
52e39958c8 [WebAssembly] Fix a compiler warning. NFC.
Fix a warning about a comparison between signed and unsigned integer
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288532 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 20:13:05 +00:00
Zachary Turner
a6ae0e2562 [LibFuzzer] Introduce a portable WeakAlias implementation.
Windows doesn't really support weak aliases, but with some
linker magic we can get something that's pretty close on
Windows.  This introduces an interface to accessing weakly
aliased symbols that will work on any platform.  Linker
magic changes to come in a separate patch.

Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27235

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288530 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 19:41:17 +00:00
Zachary Turner
fd186677a2 [LibFuzzer] Split FuzzerUtil for Posix and Windows.
Pave the way for separating out platform specific
utility functions into separate files.

Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27234

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288529 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 19:38:19 +00:00
Rong Xu
e72670cb54 [PGO] Fix PGO use ICE when there are unreachable BBs
For -O0 there might be unreachable BBs, which breaks the assumption that all the
BBs have an auxiliary data structure.  In this patch, we add another interface
called findBBInfo() so that a nullptr can be returned for the unreachable BBs
(and the callers can ignore those BBs).

This fixes the bug reported
https://llvm.org/bugs/show_bug.cgi?id=31209

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288528 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 19:10:29 +00:00
Ulrich Weigand
49c2555361 [SystemZ] Support remaining atomic instructions
Add assembler support for all atomic instructions that weren't already
supported.  Some of those could be used to implement codegen for 128-bit
atomic operations, but this isn't done here yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288526 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 18:24:16 +00:00
Ulrich Weigand
4b7476c294 [SystemZ] Support floating-point control register instructions
Add assembler support for instructions manipulating the FPC.

Also add codegen support via the GCC compatibility builtins:
  __builtin_s390_sfpc
  __builtin_s390_efpc



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288525 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 18:21:53 +00:00