oota-llvm.git
10 years agoR600/SI: Only select SALU instructions in the entry or exit block
Tom Stellard [Tue, 29 Apr 2014 23:12:48 +0000 (23:12 +0000)]
R600/SI: Only select SALU instructions in the entry or exit block

SALU instructions ignore control flow, so it is not always safe to use
them within branches.  This is a partial solution to this problem
until we can come up with something better.

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

10 years agoR600: optimize the UDIVREM 64 algorithm
Tom Stellard [Tue, 29 Apr 2014 23:12:46 +0000 (23:12 +0000)]
R600: optimize the UDIVREM 64 algorithm

This is a squash of several optimization commits:
 - calculate DIV_Lo and DIV_Hi separately
 - use BFE_U32 if we are operating on 32bit values
 - use precomputed constants instead of shifting in UDVIREM
 - skip the first 32 iterations of udivrem

v2: Check whether BFE is supported before using it

Patch by: Jan Vesely

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207589 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Implement iterative algorithm for udivrem
Tom Stellard [Tue, 29 Apr 2014 23:12:45 +0000 (23:12 +0000)]
R600: Implement iterative algorithm for udivrem

Initial implementation, rather slow

Patch by: Jan Vesely

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207588 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Change UDIV/UREM to UDIVREM when legalizing types
Tom Stellard [Tue, 29 Apr 2014 23:12:43 +0000 (23:12 +0000)]
R600: Change UDIV/UREM to UDIVREM when legalizing types

When legalizing ops, with UDIV/UREM set to expand, they automatically
expand to UDIVREM (if legal or custom).
We need to do this manually for legalize types.

v2:
  SI should be set to Expand because the type is legal, and it is
    automatically lowered to UDIVREM if UDIVREM is Legal/Custom
  R600 should set to UDIV/UREM to Custom because it needs to lower them
    during type legalization

Patch by: Jan Vesely

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207587 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: remove unused variable
Tom Stellard [Tue, 29 Apr 2014 23:12:38 +0000 (23:12 +0000)]
R600: remove unused variable

Patch by: Jan Vesely

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207586 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTidy up.
Jim Grosbach [Tue, 29 Apr 2014 22:41:58 +0000 (22:41 +0000)]
Tidy up.

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

10 years agoSpelling.
Jim Grosbach [Tue, 29 Apr 2014 22:41:55 +0000 (22:41 +0000)]
Spelling.

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

10 years agoTidy up whitespace.
Jim Grosbach [Tue, 29 Apr 2014 22:41:50 +0000 (22:41 +0000)]
Tidy up whitespace.

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

10 years agoAlso handle ConstantAggregateZero when optimizing vpermilvar*.
Rafael Espindola [Tue, 29 Apr 2014 22:20:40 +0000 (22:20 +0000)]
Also handle ConstantAggregateZero when optimizing vpermilvar*.

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

10 years agoFix MSVC build broken by r207580
David Blaikie [Tue, 29 Apr 2014 22:04:55 +0000 (22:04 +0000)]
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

10 years agoPR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFile
David Blaikie [Tue, 29 Apr 2014 21:52:46 +0000 (21:52 +0000)]
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

10 years ago[DWARF parser] Cleanup code in DWARFDebugLine.
Alexey Samsonov [Tue, 29 Apr 2014 21:28:13 +0000 (21:28 +0000)]
[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

10 years agoRemove tabs.
Rafael Espindola [Tue, 29 Apr 2014 21:02:37 +0000 (21:02 +0000)]
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

10 years agoTwo fixes to the vpermilvar optimization.
Rafael Espindola [Tue, 29 Apr 2014 20:41:54 +0000 (20:41 +0000)]
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

10 years ago[Windows] Fix assertion failure when passing 'nul' in input to clang.
Andrea Di Biagio [Tue, 29 Apr 2014 20:17:28 +0000 (20:17 +0000)]
[Windows] Fix assertion failure when passing 'nul' in input to clang.

Before this patch, if 'nul' was passed in input to clang, function
getStatus() (in Path.inc) always returned an instance of file_status with
field 'nFileSizeHigh' and 'nFileSizeLow' left uninitialized.

This was causing the triggering of an assertion failure in MemoryBuffer.cpp due
to an invalid FileSize for device 'nul'.

This patch fixes the assertion failure modifying the constructors of class
file_status (in llvm/Support/FileSystem.h) so that every field of the class
gets initialized to zero by default.

A clang test will be submitted on a separate patch.

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

10 years agoFix vectorization remarks.
Diego Novillo [Tue, 29 Apr 2014 20:06:10 +0000 (20:06 +0000)]
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

10 years agoContinue slp vectorization even the BB already has vectorized store radar://16641956
Yi Jiang [Tue, 29 Apr 2014 19:37:20 +0000 (19:37 +0000)]
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

10 years agoAdd slp vectorization to LTO passes
Yi Jiang [Tue, 29 Apr 2014 19:35:39 +0000 (19:35 +0000)]
Add slp vectorization to LTO passes

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

10 years agoReapply r207271 without the testcase
Adam Nemet [Tue, 29 Apr 2014 18:25:28 +0000 (18:25 +0000)]
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

10 years agoAdd Simple return instruction to Mips fast-isel
Reed Kotler [Tue, 29 Apr 2014 17:57:50 +0000 (17:57 +0000)]
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

10 years ago[DWARF parser] Compress DIEMinimal even further, simplify building DIE tree.
Alexey Samsonov [Tue, 29 Apr 2014 17:12:42 +0000 (17:12 +0000)]
[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

10 years agoSupportTest: Fix test names harder
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 17:07:45 +0000 (17:07 +0000)]
SupportTest: Fix test names harder

r207552, r207553 and r207554 all had bad test names.

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

10 years agoBranchProb: Simplify printing code
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 17:07:42 +0000 (17:07 +0000)]
BranchProb: Simplify printing code

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

10 years ago[mips] Remove two more redundant 'let Predicates = [HasStdEnc]' statements that were...
Daniel Sanders [Tue, 29 Apr 2014 17:04:30 +0000 (17:04 +0000)]
[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

10 years agoSupport: Remove out-of-date comments
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:47:39 +0000 (16:47 +0000)]
Support: Remove out-of-date comments

The code is now shared... no need for a note.

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

10 years agoSupport: More BlockFrequencyTest => BranchProbabilityTest
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:44:59 +0000 (16:44 +0000)]
Support: More BlockFrequencyTest => BranchProbabilityTest

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

10 years agoSupport: Fix test name
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:44:56 +0000 (16:44 +0000)]
Support: Fix test name

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

10 years agoSupport: BlockFrequencyTest => BranchProbabilityTest
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:40:17 +0000 (16:40 +0000)]
Support: BlockFrequencyTest => BranchProbabilityTest

Move a detailed test of `BranchProbability::scale()` from
`BlockFrequencyTest` over to `BranchProbabilityTest`.

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

10 years ago[mips] Remove more redundant 'let Predicates = [HasStdEnc]' statements
Daniel Sanders [Tue, 29 Apr 2014 16:37:01 +0000 (16:37 +0000)]
[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

10 years agoblockfreq: Defer to BranchProbability::scale() (again)
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:31:29 +0000 (16:31 +0000)]
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

10 years ago[mips] Remove redundant 'let Predicates = [HasStdEnc]' statements
Daniel Sanders [Tue, 29 Apr 2014 16:24:10 +0000 (16:24 +0000)]
[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

10 years agoblockfreq: Defer to BranchProbability::scale()
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:20:05 +0000 (16:20 +0000)]
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

10 years agoblockfreq: Remove BlockMass*BlockMass
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:20:01 +0000 (16:20 +0000)]
blockfreq: Remove BlockMass*BlockMass

Since `BlockMass` is an implementation detail and there are no current
users of this, delete `BlockMass::operator*=(BlockMass)`.  I might need
this when I try to strip out `UnsignedFloat`, but I can pull it back in
at that point.

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

10 years agoSupport: remove unnecessary namespace
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:15:39 +0000 (16:15 +0000)]
Support: remove unnecessary namespace

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

10 years agoSupport: Add BranchProbability::scale() and ::scaleByInverse()
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:15:35 +0000 (16:15 +0000)]
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

10 years agoDocument recently added sphinx documentation options in
Dan Liew [Tue, 29 Apr 2014 16:13:27 +0000 (16:13 +0000)]
Document recently added sphinx documentation options in
CMake.

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

10 years agoSupport: Simplify BranchProbability operators
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:12:16 +0000 (16:12 +0000)]
Support: Simplify BranchProbability operators

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

10 years agoSupport: Add unit tests for BranchProbability
Duncan P. N. Exon Smith [Tue, 29 Apr 2014 16:12:13 +0000 (16:12 +0000)]
Support: Add unit tests for BranchProbability

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

10 years agoDwarfDebug: Split the initialization of abstract and non-abstract subprogram DIEs.
David Blaikie [Tue, 29 Apr 2014 15:58:35 +0000 (15:58 +0000)]
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

10 years agoLinkModulesTest.cpp: Reformat.
NAKAMURA Takumi [Tue, 29 Apr 2014 15:52:46 +0000 (15:52 +0000)]
LinkModulesTest.cpp: Reformat.

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

10 years ago[CMake] Enable llvm/unittests/LinkerTests. It had not been enabled since r199354.
NAKAMURA Takumi [Tue, 29 Apr 2014 15:52:36 +0000 (15:52 +0000)]
[CMake] Enable llvm/unittests/LinkerTests. It had not been enabled since r199354.

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

10 years agoLinkModulesTest.cpp: Use test-specific Ctx instead of getGlobalContext(). The global...
NAKAMURA Takumi [Tue, 29 Apr 2014 15:52:27 +0000 (15:52 +0000)]
LinkModulesTest.cpp: Use test-specific Ctx instead of getGlobalContext(). The global context might not be free'd. [vg_leak]

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

10 years ago[ARM64] Disable regression tests for the old JIT.
Tilmann Scheller [Tue, 29 Apr 2014 15:02:40 +0000 (15:02 +0000)]
[ARM64] Disable regression tests for the old JIT.

Since the ARM64 backend doesn't implement support for the old JIT those tests are failing when the regression tests are run on an AArch64 host.

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

10 years ago[mips][msa] Use CHECK-LABEL in basic_operations*.ll
Daniel Sanders [Tue, 29 Apr 2014 14:28:58 +0000 (14:28 +0000)]
[mips][msa] Use CHECK-LABEL in basic_operations*.ll

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

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

10 years agoAdd optimization remarks to the loop unroller and vectorizer.
Diego Novillo [Tue, 29 Apr 2014 14:27:31 +0000 (14:27 +0000)]
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

10 years agoParse and create GOT_PREL relocations.
Joerg Sonnenberger [Tue, 29 Apr 2014 13:42:02 +0000 (13:42 +0000)]
Parse and create GOT_PREL relocations.

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

10 years ago[mips][msa] Fix element extraction where the index is variable.
Daniel Sanders [Tue, 29 Apr 2014 13:31:37 +0000 (13:31 +0000)]
[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

10 years agoUpdated the link to the correct URL.
Yaron Keren [Tue, 29 Apr 2014 13:21:05 +0000 (13:21 +0000)]
Updated the link to the correct URL.

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

10 years agoCentralize the handling of the thumb bit.
Rafael Espindola [Tue, 29 Apr 2014 12:46:50 +0000 (12:46 +0000)]
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

10 years agoARM: fix test after change to indirect symbol emission.
Tim Northover [Tue, 29 Apr 2014 10:13:10 +0000 (10:13 +0000)]
ARM: fix test after change to indirect symbol emission.

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

10 years agoX86: emit hidden stubs into a proper non_lazy_symbol_pointer section.
Tim Northover [Tue, 29 Apr 2014 10:06:10 +0000 (10:06 +0000)]
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

10 years agoARM: emit hidden stubs into a proper non_lazy_symbol_pointer section.
Tim Northover [Tue, 29 Apr 2014 10:06:05 +0000 (10:06 +0000)]
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

10 years ago[BUG] Fix -Wunused-variable warning in Release mode. Thnx to Kostya Serebryany for...
Zinovy Nis [Tue, 29 Apr 2014 09:45:08 +0000 (09:45 +0000)]
[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

10 years agoAArch64: Mark vector long multiplication as expand.
Benjamin Kramer [Tue, 29 Apr 2014 09:37:54 +0000 (09:37 +0000)]
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

10 years agofix -Wunused-variable warning in Release mode
Kostya Serebryany [Tue, 29 Apr 2014 09:33:02 +0000 (09:33 +0000)]
fix -Wunused-variable warning in Release mode

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

10 years agoAVX-512: optimized a shuffle pattern to VINSERTI64x4.
Elena Demikhovsky [Tue, 29 Apr 2014 09:09:15 +0000 (09:09 +0000)]
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

10 years ago[OPENMP][LV][D3423] Respect Hints.Force meta-data for loops in LoopVectorizer
Zinovy Nis [Tue, 29 Apr 2014 08:55:11 +0000 (08:55 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:58:41 +0000 (07:58 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:58:34 +0000 (07:58 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:58:25 +0000 (07:58 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:58:16 +0000 (07:58 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:58:09 +0000 (07:58 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:58:02 +0000 (07:58 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:57:44 +0000 (07:57 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:57:37 +0000 (07:57 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:57:24 +0000 (07:57 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:57:13 +0000 (07:57 +0000)]
[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

10 years ago[C++11] Add 'override' keywords and remove 'virtual'. Additionally add 'final' and...
Craig Topper [Tue, 29 Apr 2014 07:57:00 +0000 (07:57 +0000)]
[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

10 years ago[ARM64]Fix a bug about incorrect operand order in an EXT instruction, which is introd...
Hao Liu [Tue, 29 Apr 2014 07:51:19 +0000 (07:51 +0000)]
[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

10 years agoFix a typo in comment
Michael Zolotukhin [Tue, 29 Apr 2014 07:35:33 +0000 (07:35 +0000)]
Fix a typo in comment

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

10 years ago[ADT] Make the iterator adaptor utility a touch more general by
Chandler Carruth [Tue, 29 Apr 2014 01:57:35 +0000 (01:57 +0000)]
[ADT] Make the iterator adaptor utility a touch more general by
requiring full control over the various parameters to the std::iterator
concept / trait thing. This is a precursor for adjusting these things to
where you can write a bidirectional iterator wrapping a random access
iterator with custom increment and decrement logic.

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

10 years ago[ARM64]Fix a bug when lowering shuffle vector to an EXT instruction.
Hao Liu [Tue, 29 Apr 2014 01:50:36 +0000 (01:50 +0000)]
[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

10 years agoNone of these targets actually define their own CFI_INSTRUCTION
Eric Christopher [Tue, 29 Apr 2014 00:16:46 +0000 (00:16 +0000)]
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

10 years ago80-column fixups.
Eric Christopher [Tue, 29 Apr 2014 00:16:42 +0000 (00:16 +0000)]
80-column fixups.

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

10 years ago80-column, tab characters, comment fixups.
Eric Christopher [Tue, 29 Apr 2014 00:16:40 +0000 (00:16 +0000)]
80-column, tab characters, comment fixups.

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

10 years agoFix 80-columns, tab characters, and comments.
Eric Christopher [Tue, 29 Apr 2014 00:16:33 +0000 (00:16 +0000)]
Fix 80-columns, tab characters, and comments.

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

10 years ago[ADT] Teach PointerUnion to support assignment directly from nullptr to
Chandler Carruth [Tue, 29 Apr 2014 00:14:27 +0000 (00:14 +0000)]
[ADT] Teach PointerUnion to support assignment directly from nullptr to
clear it out.

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

10 years ago[cleanup] Add some actual positive tests for equality. This unittest
Chandler Carruth [Mon, 28 Apr 2014 23:44:14 +0000 (23:44 +0000)]
[cleanup] Add some actual positive tests for equality. This unittest
never actually compared for equality two pointer unions that were equal.
Fortunately, things seem to work. =]

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

10 years ago[cleanup] Make this test use a proper fixture rather than globals.
Chandler Carruth [Mon, 28 Apr 2014 23:42:22 +0000 (23:42 +0000)]
[cleanup] Make this test use a proper fixture rather than globals.

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

10 years ago[cleanup] Fix the whitespace in this test. Notably, correct spacing
Chandler Carruth [Mon, 28 Apr 2014 23:37:53 +0000 (23:37 +0000)]
[cleanup] Fix the whitespace in this test. Notably, correct spacing
around pointer types.

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

10 years agoRemove DwarfUnit::LabelRange since it's unused.
David Blaikie [Mon, 28 Apr 2014 23:36:52 +0000 (23:36 +0000)]
Remove DwarfUnit::LabelRange since it's unused.

Seems at some point the intent was to emit fission ranges_base as unique
per CU but the code today emits ranges_base as the start of the ranges
section for all CUs being compiled and all the ranges_base relative
addresses are relative to that. So removing this dead code and leaving
the status quo until there's a reason to change it (perhaps something's
faster if it has distinct ranges for each CU).

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

10 years agoRevert r207271 for now. This commit introduced a test case that ran
Chandler Carruth [Mon, 28 Apr 2014 23:07:49 +0000 (23:07 +0000)]
Revert r207271 for now. This commit introduced a test case that ran
clang directly from the LLVM test suite! That doesn't work. I've
followed up on the review thread to try and get a viable solution sorted
out, but trying to get the tree clean here.

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

10 years ago[DWARF parser] DWARFDebugFrame: Make FrameEntry struct smaller.
Alexey Samsonov [Mon, 28 Apr 2014 23:00:06 +0000 (23:00 +0000)]
[DWARF parser] DWARFDebugFrame: Make FrameEntry struct smaller.

FrameEntry doesn't need to hold a reference to the section it is
located in. Instead, pass DataExtractor as an argument of parsing
function.

No functionality change.

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

10 years agoAddressPool::HasBeenUsed: Add comment explaining the use-case for this flag.
David Blaikie [Mon, 28 Apr 2014 22:52:50 +0000 (22:52 +0000)]
AddressPool::HasBeenUsed: Add comment explaining the use-case for this flag.

Based on code review by Eric Christopher on r207323

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

10 years ago[DWARF parser] DWARFDebugFrame: use unique_ptr instead of raw pointer
Alexey Samsonov [Mon, 28 Apr 2014 22:52:24 +0000 (22:52 +0000)]
[DWARF parser] DWARFDebugFrame: use unique_ptr instead of raw pointer

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

10 years agoDIE: Document some learnings about why the world isn't perfect.
David Blaikie [Mon, 28 Apr 2014 22:41:39 +0000 (22:41 +0000)]
DIE: Document some learnings about why the world isn't perfect.

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

10 years ago[DWARF parser] Simplify DWARFDebugAranges generation.
Alexey Samsonov [Mon, 28 Apr 2014 22:27:46 +0000 (22:27 +0000)]
[DWARF parser] Simplify DWARFDebugAranges generation.

There is no need to keep the whole contents of .debug_aranges section
in memory when we build address ranges table. Memory optimization that
used to be in this code (precalculate the size of vector of ranges before
filling it) is not really needed - later we will compact and resize this
vector anyway.

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

10 years agoSatisfy sub-optimal GCC warning.
David Blaikie [Mon, 28 Apr 2014 22:27:26 +0000 (22:27 +0000)]
Satisfy sub-optimal GCC warning.

(Clang doesn't warn here because it knows the string is benign - the
assert still checks what it's intended to - though putting the correct
parens does make clang-format format the code a little better)

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

10 years agoWe already calculate WideVT above, just reuse it.
Eric Christopher [Mon, 28 Apr 2014 22:24:57 +0000 (22:24 +0000)]
We already calculate WideVT above, just reuse it.

Patch by Jan Vesely <jan.vesely@rutgers.edu>.

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

10 years agoAdd (...) around && clause to appeace gcc 4.8's warning
Eli Bendersky [Mon, 28 Apr 2014 22:19:12 +0000 (22:19 +0000)]
Add (...) around && clause to appeace gcc 4.8's warning

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

10 years agoTeach add_sphinx_target() to respect the LLVM_INSTALL_TOOLCHAIN_ONLY CMake
Dan Liew [Mon, 28 Apr 2014 22:06:20 +0000 (22:06 +0000)]
Teach add_sphinx_target() to respect the LLVM_INSTALL_TOOLCHAIN_ONLY CMake
option.

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

10 years agoDebugInfo: Just store the DIE by value in the DwarfUnit
David Blaikie [Mon, 28 Apr 2014 21:14:27 +0000 (21:14 +0000)]
DebugInfo: Just store the DIE by value in the DwarfUnit

Since all 4 ctor calls in DwarfDebug just pass in a trivially
constructed DIE with the right tag type, sink the tag selection down
into the Dwarf*Unit ctors (removing the argument entirely from callers
in DwarfDebug) and initialize the DIE member in DwarfUnit.

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

10 years agoPass DIEs to DwarfUnit constructors by unique_ptr.
David Blaikie [Mon, 28 Apr 2014 21:04:29 +0000 (21:04 +0000)]
Pass DIEs to DwarfUnit constructors by unique_ptr.

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

10 years agoAdd an option for evaluating past symbols.
Rafael Espindola [Mon, 28 Apr 2014 20:53:11 +0000 (20:53 +0000)]
Add an option for evaluating past symbols.

When evaluating an assembly expression for a relocation, we want to
stop at MCSymbols that are in the symbol table, even if they are variables.
This is needed since the semantics may require that the relocation use them.

That is not the case when computing the value of a symbol in the symbol table.
There are no relocations in this case and we have to keep going until we hit
a section or find out that the expression doesn't have an assembly time
value.

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

10 years agoReformat, 80-col, tab characters, etc.
Eric Christopher [Mon, 28 Apr 2014 20:42:22 +0000 (20:42 +0000)]
Reformat, 80-col, tab characters, etc.

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

10 years agoImprove explicit memory ownership of DIEs
David Blaikie [Mon, 28 Apr 2014 20:36:45 +0000 (20:36 +0000)]
Improve explicit memory ownership of DIEs

Now that the subtle constructScopeDIE has been refactored into two
functions - one returning memory to take ownership of, one returning a
pointer to already owning memory - push unique_ptr through more APIs.

I think this completes most of the unique_ptr ownership of DIEs.

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

10 years agoDwarfDebug: Omit DW_AT_object_pointer on inlined_subroutines
David Blaikie [Mon, 28 Apr 2014 20:27:02 +0000 (20:27 +0000)]
DwarfDebug: Omit DW_AT_object_pointer on inlined_subroutines

While refactoring out constructScopeDIE into two functions I realized we
were emitting DW_AT_object_pointer in the inlined subroutine when we
didn't need to (GCC doesn't, and the abstract subprogram definition has
the information already).

So here's the refactoring and the bug fix. This is one step of
refactoring to remove some subtle memory ownership semantics. It turns
out the original constructScopeDIE returned ownership in its return
value in some cases and not in others. The split into two functions now
separates those two semantics - further cleanup (unique_ptr, etc) will
follow.

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

10 years agoblockfreq: Remove more extra typenames from r207438
Duncan P. N. Exon Smith [Mon, 28 Apr 2014 20:22:29 +0000 (20:22 +0000)]
blockfreq: Remove more extra typenames from r207438

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

10 years agoblockfreq: Remove extra typename from r207438
Duncan P. N. Exon Smith [Mon, 28 Apr 2014 20:08:23 +0000 (20:08 +0000)]
blockfreq: Remove extra typename from r207438

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

10 years agoReapply "blockfreq: Approximate irreducible control flow"
Duncan P. N. Exon Smith [Mon, 28 Apr 2014 20:02:29 +0000 (20:02 +0000)]
Reapply "blockfreq: Approximate irreducible control flow"

This reverts commit r207287, reapplying r207286.

I'm hoping that declaring an explicit struct and instantiating
`addBlockEdges()` directly works around the GCC crash from r207286.
This is a lot more boilerplate, though.

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