141843 Commits

Author SHA1 Message Date
Matthias Braun
205e9501a0 TableGen: Use StringInit instead of std::string for DagInit name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288643 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 06:00:41 +00:00
Matthias Braun
1ecbef9056 TableGen: Use more StringInit instead of StringRef
This forces the code to call StringInit::get on the string early and
avoids storing duplicates in std::string and sometimes allows pointer
comparisons instead of string comparisons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288642 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 06:00:36 +00:00
Craig Topper
a3d4859091 [AVX-512] Teach fast isel to handle 512-bit vector bitcasts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288641 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 05:50:51 +00:00
Kuba Mracek
9a1eeb2083 Use Darwin libtool's -no_warning_for_no_symbols if available to silence the "has no symbols" link warning
Building compiler-rt on Darwin produces dozens of meaningless warnings about object files having no symbols during static archive creation. This is very intentional as compiler-rt uses #ifdefs to conditionally compile platform-specific code, and we even have a .cpp source file that only contains static asserts to make sure the environment is configured right. On Linux, this situation is fine and no warning is produced. This patch adds a libtool version detection and if it's new enough, we'll use the -no_warning_for_no_symbols flag that suppresses this warning. Build logs should be much cleaner now!

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288640 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 05:21:44 +00:00
Matthias Braun
c7fb36d42d TableGen: Factor out STRCONCAT constructor, add shortcut.
Introduce new constructor for STRCONCAT binop with a shortcut that
immediately concatenates if the two arguments are StringInits.
Makes the QualifyName code more readable and tablegen 2-3% faster.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288639 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 05:21:18 +00:00
Matthias Braun
ccd8fece37 TableGen/Record: Move PointerIntPair to less used field of RecordVal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288638 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 05:21:13 +00:00
Colin LeMahieu
38492abcd5 [Hexagon] Adding additional tokenization characters in preparation for removing spacing from syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288637 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 04:52:28 +00:00
Craig Topper
9def0bf1c7 [AVX-512] Teach fast isel to use masked compare and movss for handling scalar cmp and select sequence when AVX-512 is enabled. This matches the behavior of normal isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288636 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 04:51:31 +00:00
Craig Topper
999176953a [AVX-512] Add avx512f command lines to fast isel SSE select test.
Currently the fast isel code emits an avx1 instruction sequence even with avx512. This is different than normal isel. A follow up commit will fix this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288635 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 04:51:28 +00:00
Colin LeMahieu
de0c130004 [Hexagon] Changing from literal numeric value to argument since #-1 will not parse when '-' is converted to a token.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288634 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 04:29:00 +00:00
Chris Bieneman
1ef550d3fd [CMake] Refactor add_llvm_tool_symlink for reuse
The old implementation of add_llvm_tool_symlink could fail in odd ways when building out of tree. This version solves that problem by not using the LLVM_* variables, and instead reaeding the target's properties.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288632 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 03:28:03 +00:00
Simon Pilgrim
5f2b8975dd [X86][XOP] Add target shuffle tests showing missing UNPCKL combine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288628 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 22:55:57 +00:00
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