Commit Graph

69164 Commits

Author SHA1 Message Date
Rafael Espindola
2259a26a5d Also handle ConstantAggregateZero when optimizing vpermilvar*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207582 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 22:20:40 +00:00
David Blaikie
167cb010a4 Fix MSVC build broken by r207580
Seems MSVC wants to be able to codegen inline-definitions of virtual
functions even in TUs that don't define the key function - and it's well
within its rights to do so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207581 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 22:04:55 +00:00
David Blaikie
00121bb932 PR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFile
This starts in MCJIT::getSymbolAddress where the
unique_ptr<object::Binary> is release()d and (after a cast) passed to a
single caller, MCJIT::addObjectFile.

addObjectFile calls RuntimeDyld::loadObject.
RuntimeDld::loadObject calls RuntimeDyldELF::createObjectFromFile

And the pointer is never owned at this point. I say this point, because
the alternative codepath, RuntimeDyldMachO::createObjectFile certainly
does take ownership, so this seemed like a good hint that this was a/the
right place to take ownership.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207580 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 21:52:46 +00:00
Alexey Samsonov
2387e9ecb1 [DWARF parser] Cleanup code in DWARFDebugLine.
Move several function definitions into .cpp, unify constructors
and clear() methods (fixing a couple of latent bugs from copy-paste),
turn static function parsePrologue() into Prologue::parse().

More work needed here to untangle weird multiple inheritance
in table parsing and dumping.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207579 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 21:28:13 +00:00
Rafael Espindola
8263bafd17 Remove tabs.
Sorry, new machine and I forgot to change the editor setting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207578 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 21:02:37 +00:00
Rafael Espindola
984f2fc09e Two fixes to the vpermilvar optimization.
The instcomine logic to handle vpermilvar's pd and 256 variants was incorrect.
The _256 variants have indexes into the individual 128 bit lanes and in all
cases it also has to mask out unused bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207577 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 20:41:54 +00:00
Diego Novillo
55deff895d Fix vectorization remarks.
This patch changes the vectorization remarks to also inform when
vectorization is possible but not beneficial.

Added tests to exercise some loop remarks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207574 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 20:06:10 +00:00
Yi Jiang
bbea6143f2 Continue slp vectorization even the BB already has vectorized store radar://16641956
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207572 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 19:37:20 +00:00
Yi Jiang
156cfdf763 Add slp vectorization to LTO passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207571 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 19:35:39 +00:00
Adam Nemet
1363a7718b Reapply r207271 without the testcase
PR19608 was filed to find a suitable testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207569 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 18:25:28 +00:00
Reed Kotler
52c03fbb3b Add Simple return instruction to Mips fast-isel
Reviewers: dsanders

Reviewed by: dsanders

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207565 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 17:57:50 +00:00
Alexey Samsonov
b58db2293d [DWARF parser] Compress DIEMinimal even further, simplify building DIE tree.
DIE doesn't need to store a pointer to its parent: we can traverse the DIE tree
only with functions getFirstChild() and getSibling(). Parents must be known
only when we construct the tree. Rewrite setDIERelations() procedure in a more
straightforward way, and get rid of lots of now unused DIEMinimal methods.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207563 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 17:12:42 +00:00
Duncan P. N. Exon Smith
67f5fcac4b BranchProb: Simplify printing code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207559 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 17:07:42 +00:00
Daniel Sanders
a70510a1c6 [mips] Remove two more redundant 'let Predicates = [HasStdEnc]' statements that were missed
Summary:
The InstSE class already initializes Predicates to [HasStdEnc].

No functional change (confirmed by diffing tablegen-erated files before and
after)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207558 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 17:04:30 +00:00
Daniel Sanders
8c4dcca434 [mips] Remove more redundant 'let Predicates = [HasStdEnc]' statements
Summary:
The InstSE class already initializes Predicates to [HasStdEnc].

No functional change (confirmed by diffing tablegen-erated files before and
after)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207551 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 16:37:01 +00:00
Duncan P. N. Exon Smith
07f96126af blockfreq: Defer to BranchProbability::scale() (again)
Change `BlockFrequency` to defer to `BranchProbability::scale()` and
`BranchProbability::scaleByInverse()`.

This removes `BlockFrequency::scale()` from its API (and drops the
ability to see the remainder), but the only user was the unit tests.  If
some code in the future needs an API that exposes the remainder, we can
add something to `BranchProbability`, but I find that unlikely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207550 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 16:31:29 +00:00
Daniel Sanders
18f4763a08 [mips] Remove redundant 'let Predicates = [HasStdEnc]' statements
Summary:
The MipsPat class already initializes Predicates to [HasStdEnc].

No functional change (confirmed by diffing tablegen-erated files before and
after)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207548 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 16:24:10 +00:00
Duncan P. N. Exon Smith
6919443535 blockfreq: Defer to BranchProbability::scale()
`BlockMass` can now defer to `BranchProbability::scale()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207547 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 16:20:05 +00:00
Duncan P. N. Exon Smith
d699090a22 Support: remove unnecessary namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207545 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 16:15:39 +00:00
Duncan P. N. Exon Smith
048f520b91 Support: Add BranchProbability::scale() and ::scaleByInverse()
Add API to `BranchProbability` for scaling big integers.  Next job is to
rip the logic out of `BlockMass` and `BlockFrequency`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207544 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 16:15:35 +00:00
David Blaikie
4b26377660 DwarfDebug: Split the initialization of abstract and non-abstract subprogram DIEs.
These were called from distinct places and had significant distinct
behavior. No need to make that a dynamic check inside the function
rather than just having two functions (refactoring some common code into
a helper function to be called from the two separate functions).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207539 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 15:58:35 +00:00
Diego Novillo
44180390f8 Add optimization remarks to the loop unroller and vectorizer.
Summary:
This calls emitOptimizationRemark from the loop unroller and vectorizer
at the point where they make a positive transformation. For the
vectorizer, it reports vectorization and interleave factors. For the
loop unroller, it reports all the different supported types of
unrolling.

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207528 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 14:27:31 +00:00
Joerg Sonnenberger
edc4595472 Parse and create GOT_PREL relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207526 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 13:42:02 +00:00
Daniel Sanders
285c5693b8 [mips][msa] Fix element extraction where the index is variable.
Summary:
This isn't supported directly so we splat the vector element and extract
the most convenient copy.

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207524 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 13:31:37 +00:00
Rafael Espindola
1c5f439f41 Centralize the handling of the thumb bit.
This patch centralizes the handling of the thumb bit around
MCStreamer::isThumbFunc and makes isThumbFunc handle aliases.

This fixes a corner case, but the main advantage is having just one
way to check if a MCSymbol is thumb or not. This should still be
refactored to be ARM only, but at least now it is just one predicate
that has to be refactored instead of 3 (isThumbFunc,
ELF_Other_ThumbFunc, and SF_ThumbFunc).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207522 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 12:46:50 +00:00
Tim Northover
d5d3e188f0 X86: emit hidden stubs into a proper non_lazy_symbol_pointer section.
rdar://problem/16660411

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207518 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 10:06:10 +00:00
Tim Northover
8ea9566fee ARM: emit hidden stubs into a proper non_lazy_symbol_pointer section.
rdar://problem/16660411

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207517 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 10:06:05 +00:00
Zinovy Nis
0f79399dee [BUG] Fix -Wunused-variable warning in Release mode. Thnx to Kostya Serebryany for pointing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207516 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 09:45:08 +00:00
Benjamin Kramer
43705683fd AArch64: Mark vector long multiplication as expand.
There are no patterns for this. This was already fixed for ARM64 but I forgot
to apply it to AArch64 too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207515 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 09:37:54 +00:00
Kostya Serebryany
0f99bc0606 fix -Wunused-variable warning in Release mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207514 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 09:33:02 +00:00
Elena Demikhovsky
e3e08acd09 AVX-512: optimized a shuffle pattern to VINSERTI64x4.
Added intrinsics for VPERMT2PS/PD/D/Q instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207513 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 09:09:15 +00:00
Zinovy Nis
c5e41aed09 [OPENMP][LV][D3423] Respect Hints.Force meta-data for loops in LoopVectorizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207512 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 08:55:11 +00:00
Craig Topper
eda7f44b27 [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207511 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:58:41 +00:00
Craig Topper
0fd57f4b56 [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. AArch64 edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207510 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:58:34 +00:00
Craig Topper
a4f9f5e7de [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. ARM64 edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207509 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:58:25 +00:00
Craig Topper
aab65f8023 [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Hexagon edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207508 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:58:16 +00:00
Craig Topper
e17a0260a8 [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. MSP430 edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207507 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:58:09 +00:00
Craig Topper
91b10fb0e9 [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Mips edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207506 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:58:02 +00:00
Craig Topper
6b7b725179 [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. NVPTX edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207505 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:57:44 +00:00
Craig Topper
e651935ab8 [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. PowerPC edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207504 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:57:37 +00:00
Craig Topper
c279ae979e [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. R600 edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207503 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:57:24 +00:00
Craig Topper
47f50878a9 [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. Sparc edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207502 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:57:13 +00:00
Craig Topper
d4657fb0c1 [C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. XCore edition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207501 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:57:00 +00:00
Hao Liu
5bbe6121c3 [ARM64]Fix a bug about incorrect operand order in an EXT instruction, which is introduced by r207485.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207500 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:51:19 +00:00
Michael Zolotukhin
0850d7f154 Fix a typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207499 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 07:35:33 +00:00
Hao Liu
270f09d712 [ARM64]Fix a bug when lowering shuffle vector to an EXT instruction.
E.g. Mask like <-1, -1, 1, ...> will generate incorrect EXT index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207485 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 01:50:36 +00:00
Eric Christopher
aa475b48cc None of these targets actually define their own CFI_INSTRUCTION
opcode so there's no reason to use the target namespace for it
rather than TargetOpcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207475 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 00:16:46 +00:00
Eric Christopher
dc1721b004 80-column fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207474 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 00:16:42 +00:00
Eric Christopher
3756feaadc 80-column, tab characters, comment fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207473 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 00:16:40 +00:00
Eric Christopher
4ffd83b92b Fix 80-columns, tab characters, and comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207472 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 00:16:33 +00:00