oota-llvm.git
9 years agoRefactor canonicalizing array indices to a helper function
Jingyue Wu [Sun, 8 Jun 2014 20:15:45 +0000 (20:15 +0000)]
Refactor canonicalizing array indices to a helper function

No functionality changes.

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

9 years ago[SeparateConstOffsetFromGEP] make two tests more strict
Jingyue Wu [Sun, 8 Jun 2014 20:01:42 +0000 (20:01 +0000)]
[SeparateConstOffsetFromGEP] make two tests more strict

inbounds are not necessary in these two tests. zext(a +nuw b) = zext(a) +
zext(b) should hold with or without inbounds.

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

9 years agoSmallVector: Improve test coverage for insert with repetition
David Blaikie [Sun, 8 Jun 2014 19:33:40 +0000 (19:33 +0000)]
SmallVector: Improve test coverage for insert with repetition

To test cases that involve actual repetition (> 1 elements), at least
one element before the insertion point, and some elements of the
original range that still fit in that range space after insertion.

Actually we need coverage for the inverse case too (where no elements
after the insertion point fit into the previously allocated space), but
this'll do for now, and I might end up rewriting bits of SmallVector to
avoid that special case anyway.

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

9 years agoScalarEvolution: Derive element size from the type of the loaded element
Tobias Grosser [Sun, 8 Jun 2014 19:21:20 +0000 (19:21 +0000)]
ScalarEvolution: Derive element size from the type of the loaded element

Before, we where looking at the size of the pointer type that specifies the
location from which to load the element. This did not make any sense at all.

This change fixes a bug in the delinearization where we failed to delinerize
certain load instructions.

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

9 years agoSmallVector: More movable improvements - don't copy elements to make space when inser...
David Blaikie [Sun, 8 Jun 2014 19:12:31 +0000 (19:12 +0000)]
SmallVector: More movable improvements - don't copy elements to make space when inserting repeated elements.

Also split and improve tests a bit.

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

9 years agoSmallVector: Move, don't copy, elements to make space for an insertion.
David Blaikie [Sun, 8 Jun 2014 19:12:28 +0000 (19:12 +0000)]
SmallVector: Move, don't copy, elements to make space for an insertion.

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

9 years agoX86: simplify data layout calculation
Saleem Abdulrasool [Sun, 8 Jun 2014 19:08:36 +0000 (19:08 +0000)]
X86: simplify data layout calculation

X86Subtarget::isTargetCygMing || X86Subtarget::isTargetKnownWindowsMSVC is
equivalent to all Windows environments.  Simplify the check to isOSWindows.
NFC.

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

9 years agoSmallVectorTest: Remove some more robust checks added in r210429 since they caught...
David Blaikie [Sun, 8 Jun 2014 17:33:47 +0000 (17:33 +0000)]
SmallVectorTest: Remove some more robust checks added in r210429 since they caught some bugs I haven't fixed yet.

Specifically this caused inserting an element from a SmallVector into
itself when such an insertion would cause a reallocation. We have code
to handle this for non-reallocating cases, but it's not robust against
reallocation.

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

9 years agoFix some more moving-from-moved-from objects issues in SmallVector
David Blaikie [Sun, 8 Jun 2014 16:55:13 +0000 (16:55 +0000)]
Fix some more moving-from-moved-from objects issues in SmallVector

(& because it makes it easier to test, this also improves
correctness/performance slightly by moving the last element in an insert
operation, rather than copying it)

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

9 years agoAPFloat: x - NaN needs to flip the signbit of NaN when x is a number.
Stephen Canon [Sun, 8 Jun 2014 16:53:31 +0000 (16:53 +0000)]
APFloat: x - NaN needs to flip the signbit of NaN when x is a number.

Because we don't have a separate negate( ) function, 0 - NaN does double-duty as the IEEE-754 negate( ) operation, which (unlike most FP ops) *does* attach semantic meaning to the signbit of NaN.

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

9 years agoAsmMatchers: Use unique_ptr to manage ownership of MCParsedAsmOperand
David Blaikie [Sun, 8 Jun 2014 16:18:35 +0000 (16:18 +0000)]
AsmMatchers: Use unique_ptr to manage ownership of MCParsedAsmOperand

I saw at least a memory leak or two from inspection (on probably
untested error paths) and r206991, which was the original inspiration
for this change.

I ran this idea by Jim Grosbach a few weeks ago & he was OK with it.
Since it's a basically mechanical patch that seemed sufficient - usual
post-commit review, revert, etc, as needed.

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

9 years agoEnsure SmallVector::insert doesn't overwrite the last element in the range with the...
David Blaikie [Sun, 8 Jun 2014 16:00:02 +0000 (16:00 +0000)]
Ensure SmallVector::insert doesn't overwrite the last element in the range with the already-moved-from value

This would cause the last element in a range to be in a moved-from state
after an insert at a non-end position, losing that value entirely in the
process.

Side note: move_backward is subtle. It copies [A, B) to C-1 and down.
(the fact that it decrements both the second and third iterators before
the first movement is the subtle part... kind of surprising, anyway)

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

9 years agoRevert "Do materialize for floating point"
Alp Toker [Sun, 8 Jun 2014 09:13:42 +0000 (09:13 +0000)]
Revert "Do materialize for floating point"

1) The commit was made despite profound lack of understanding:

   "I did not understand the comment about using dyn_cast instead of isa. I will
   commit as is and make the update after. You can explain what you meant to me."

   Commit first, understand later isn't OK.

2) Review comments were simply ignored:

   "Can you edit the summary to describe what the patch is for? It appears to be
   a list of commits at the moment."

3) The patch got LGTM'd off-list without any indication of readiness.

4) The public mailing list was excluded from patch review so all of this was
   hidden from the community.

This reverts commit r210414.

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

9 years agoRemove outdated CMake MSVC workaround
Alp Toker [Sun, 8 Jun 2014 07:37:17 +0000 (07:37 +0000)]
Remove outdated CMake MSVC workaround

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

9 years agoRemove redundant typedef from MCAsmParserSemaCallback
Alp Toker [Sun, 8 Jun 2014 05:14:54 +0000 (05:14 +0000)]
Remove redundant typedef from MCAsmParserSemaCallback

The last use has been removed in clang r210418.

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

9 years agoMake InlineAsmIdentifierInfo forward-declarable
Alp Toker [Sun, 8 Jun 2014 05:07:38 +0000 (05:07 +0000)]
Make InlineAsmIdentifierInfo forward-declarable

This helps localize header inclusion in the frontend.

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

9 years agoMC: fix text section characteristics for WoA
Saleem Abdulrasool [Sun, 8 Jun 2014 03:57:49 +0000 (03:57 +0000)]
MC: fix text section characteristics for WoA

link.exe requires that the text section has the IMAGE_SCN_MEM_16BIT flag set.
Otherwise, it will treat the function as ARM.  If this occurs, then jumps to the
function will fail, switching from thumb to ARM mode execution.

With this change, it is possible to link using the MSVC linker as well.

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

9 years agoDo materialize for floating point
Reed Kotler [Sun, 8 Jun 2014 03:30:32 +0000 (03:30 +0000)]
Do materialize for floating point

Summary:
start to do simple constants

finish simplestore

add test case

format

Merge branch 'master' into 1756_8

Add basic functionality for assignment of ints. This creates a lot of core infrastructure in which to add, with little effort, quite a bit more to mips fast-isel

Merge branch 'master' into 1756_8

Add basic functionality for assignment of ints. This creates a lot of core infrastructure in which to add, with little effort, quite a bit more to mips fast-isel

in progress

finish integer materialize

test cases

test cases

in progress

Finish up fast-isel materialize for ints.

Finish materialize for ints

test cases

simplestorei.ll

Merge branch 'master' into 1756_8

fix fp constants for fast-isel

Merge branch '1758_1' of dmz-portal.mips.com:llvm into 1758_1

in progress

lastest for fp materialization

clean up

Merge branch 'master' into 1758_1

formatting

add test case

finish test case

Merge branch 'master' into 1758_2

Test Plan:
simplestore.ll

simplestore.ll

Reviewers: dsanders

Reviewed By: dsanders

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

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

9 years agostart to clean up buildMI calls in mips fast-isel
Reed Kotler [Sun, 8 Jun 2014 03:04:42 +0000 (03:04 +0000)]
start to clean up buildMI calls in mips fast-isel

Summary: Merge branch 'master' into 1758_6

Test Plan:
No functionality change. Run "make check" and run test-suite.
Because our servers are not yet running again I have not yet run test-suite.
I will further review myself before submission.

Reviewers: dsanders

Reviewed By: dsanders

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

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

9 years agoRe-enable ARM ELF tests
Alp Toker [Sun, 8 Jun 2014 02:46:02 +0000 (02:46 +0000)]
Re-enable ARM ELF tests

r210408 inadvertently disabled them when X86 is not selected.

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

9 years agoFix build when no native target is enabled
Alp Toker [Sun, 8 Jun 2014 02:45:56 +0000 (02:45 +0000)]
Fix build when no native target is enabled

The JITTests and MCJITTests unit test targets require a native arch with JIT
support, otherwise fail to link.

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

9 years agoinclude MipsGenFastISel.inc
Reed Kotler [Sun, 8 Jun 2014 02:08:43 +0000 (02:08 +0000)]
include MipsGenFastISel.inc

Summary:
Included this file which is needed to enable tablegen generated functionality
for fast mips-isel

Test Plan:
This has no visible functionality by itself but just adding the include
file creates some issues so I have it as a separate patch.

Reviewers: dsanders

Reviewed By: dsanders

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

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

9 years agotest: add test case for SVN r210406
Saleem Abdulrasool [Sun, 8 Jun 2014 01:27:32 +0000 (01:27 +0000)]
test: add test case for SVN r210406

Add missing test case for constructor section selection.  Thanks David Blaikie!

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

9 years agotest: move some tests into ARM directory
Saleem Abdulrasool [Sun, 8 Jun 2014 01:04:05 +0000 (01:04 +0000)]
test: move some tests into ARM directory

Rather than requiring ARM support for the ELF tests (which is odd), move the
tests that require ARM into a subdirectory to use lit to disable them if the
support is not present.  Play this game to prevent disabling the ELF tests on
the Windows build bots as they have caught issues in the past with interactions
between various platforms.

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

9 years agoMC: make ELF .type handling more GNU AS compatible
Saleem Abdulrasool [Sun, 8 Jun 2014 00:34:34 +0000 (00:34 +0000)]
MC: make ELF .type handling more GNU AS compatible

GAS documents the .type directive as having an optional comma following the key
symbol name when using the STT_<TYPE_IN_UPPER_CASE> form.  However, it treats
the comma as optional in all cases.  This makes the IAS support both forms of
inputs.  Furthermore, the prefixed forms take either the upper case name or the
lower case alias.

The tests are split into two separate sets as the hash character serves as a
comment character on x86, which is tested in the second set by using arm-elf
which uses the at symbol as a comment character.

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

9 years agoMC: fix ctor/dtor section for windows-itanium
Saleem Abdulrasool [Sun, 8 Jun 2014 00:34:27 +0000 (00:34 +0000)]
MC: fix ctor/dtor section for windows-itanium

This adjusts the section setup for the windows-itanium environment.  This
environment does not report to be a known windows msvc environment, even though
it is (nearly) identical to the MSVC environment for C code.

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

9 years agoMC: whitespace, grouping for COFF section setup
Saleem Abdulrasool [Sun, 8 Jun 2014 00:34:23 +0000 (00:34 +0000)]
MC: whitespace, grouping for COFF section setup

Add some whitespace, combine two sequential conditionals into a single one.
Reformat some section definitions to maintain uniformity in the function.
NFC.

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

9 years agoFix typos
Alp Toker [Sat, 7 Jun 2014 21:23:09 +0000 (21:23 +0000)]
Fix typos

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

9 years agoBuild fix: remove initializeJumpInstrTablesPass() call from LTO
Alp Toker [Sat, 7 Jun 2014 20:39:53 +0000 (20:39 +0000)]
Build fix: remove initializeJumpInstrTablesPass() call from LTO

This was incurring an unsatisfied dependency on CodeGen from LTO breaking
shared builds:

Undefined symbols for architecture x86_64:
  "llvm::initializeJumpInstrTablesPass(llvm::PassRegistry&)", referenced from:
      llvm::LTOCodeGenerator::initializeLTOPasses() in LTOCodeGenerator.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Removed as a temporary measure pending feedback from the author.

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

9 years agoARM: correct assertion for long-calls on WoA
Saleem Abdulrasool [Sat, 7 Jun 2014 20:29:27 +0000 (20:29 +0000)]
ARM: correct assertion for long-calls on WoA

COFF/PE, so the relocation model is never static.  Loosen the assertion
accordingly.  The relocation can still be emitted properly, as it will be
converted to an IMAGE_REL_ARM_ADDR32 which will be resolved by the loader
taking the base relocation into account.  This is necessary to permit the
emission of long calls which can be controlled via the -mlong-calls option in
the driver.

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

9 years agotools: add a high level explanation for WoA EH data
Saleem Abdulrasool [Sat, 7 Jun 2014 19:23:07 +0000 (19:23 +0000)]
tools: add a high level explanation for WoA EH data

Add a brief explanation of the data section layout for the unwind data that the
Windows on ARM EH models.  This is simply to provide a rough idea of the layout
of the code involved in the decoding of the unwinding.  Details on the involved
data structures are available in the associated support header.  The bulk of it
is related to printing out the byte-code to help validate generation of WoA EH.

No functional change.

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

9 years ago[OCaml] Commit missing parts of r210395
Peter Zotov [Sat, 7 Jun 2014 15:53:28 +0000 (15:53 +0000)]
[OCaml] Commit missing parts of r210395

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

9 years ago[OCaml] Introduce an llmdkind abstract type.
Peter Zotov [Sat, 7 Jun 2014 15:15:10 +0000 (15:15 +0000)]
[OCaml] Introduce an llmdkind abstract type.

Patch by Gabriel Radanne.

While this commit technically breaks API, no code should have supplied
the integer IDs directly, and thus no code should break.

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

9 years agoRevert 209903 and 210040.
Rafael Espindola [Sat, 7 Jun 2014 04:12:35 +0000 (04:12 +0000)]
Revert 209903 and 210040.

The messages were

 "PR19753: Optimize comparisons with "ashr exact" of a constanst."
 "Added support to optimize comparisons with "lshr exact" of a constant."

They were not correctly handling signed/unsigned operation differences,
causing pr19958.

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

9 years agoFix the MachineScheduler's logic for updating ready times for in-order.
Andrew Trick [Sat, 7 Jun 2014 01:48:43 +0000 (01:48 +0000)]
Fix the MachineScheduler's logic for updating ready times for in-order.

Now the scheduler updates a node's ready time as soon as it is
scheduled, before releasing dependent nodes. There was a reason I
didn't do this initially but it no longer applies.

A53 is in-order and was running into an issue where nodes where added
to the readyQ too early. That's now fixed.

This also makes it easier for custom scheduling strategies to build
heuristics based on the actual cycles that the node was scheduled at.

The only impact on OOO (sandybridge/cyclone) is that ready times will
be slightly more accurate. I didn't measure any significant regressions.

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

9 years agoReplace the use of TargetMachine with a tiny bool variable.
Eric Christopher [Fri, 6 Jun 2014 23:26:48 +0000 (23:26 +0000)]
Replace the use of TargetMachine with a tiny bool variable.

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

9 years agoRemove all local variables from X86SelectionDAGInfo, the DAG has
Eric Christopher [Fri, 6 Jun 2014 23:26:43 +0000 (23:26 +0000)]
Remove all local variables from X86SelectionDAGInfo, the DAG has
all of the ones we were stashing away on startup.

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

9 years agoADT: introduce isWindowsItaniumEnvironment
Saleem Abdulrasool [Fri, 6 Jun 2014 22:46:18 +0000 (22:46 +0000)]
ADT: introduce isWindowsItaniumEnvironment

Add an isWindowsItaniumEnvironment function to Triple to mirror the other
Windows environments.  This is simply a utility function to check if we are
targeting windows-itanium rather than windows-msvc.

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

9 years agoDebugInfo: Use the scope of the function declaration, if any, to name a function...
David Blaikie [Fri, 6 Jun 2014 22:29:05 +0000 (22:29 +0000)]
DebugInfo: Use the scope of the function declaration, if any, to name a function in DWARF pubnames

This ensures that member functions, for example, are entered into
pubnames with their fully qualified name, rather than inside the global
namespace.

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

9 years agoDebugInfo: pubnames: include file-local (static or anonymous namespace) variables...
David Blaikie [Fri, 6 Jun 2014 22:16:56 +0000 (22:16 +0000)]
DebugInfo: pubnames: include file-local (static or anonymous namespace) variables and anonymous namespaces themselves.

Still some issues with name qualification, FIXMEs added to test cases
and fixes will come next.

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

9 years agoInstCombine: Canonicalize addrspacecast between different element types
Jingyue Wu [Fri, 6 Jun 2014 21:52:55 +0000 (21:52 +0000)]
InstCombine: Canonicalize addrspacecast between different element types

addrspacecast X addrspace(M)* to Y addrspace(N)*

-->

bitcast X addrspace(M)* to Y addrspace(M)*
addrspacecast Y addrspace(M)* to Y addrspace(N)*

Updat all affected tests and add several new tests in addrspacecast.ll.

This patch is based on http://reviews.llvm.org/D2186 (authored by Matt
Arsenault) with fixes and more tests.

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

9 years agoMC: prevent early DCE of empty sections
Saleem Abdulrasool [Fri, 6 Jun 2014 21:40:16 +0000 (21:40 +0000)]
MC: prevent early DCE of empty sections

Prevent the early elimination of sections in the object writer.  There may be
references to the section itself by other symbols, which may potentially not be
possible to resolve.  ML (Visual Studio's Macro Assembler) also seems to retain
empty sections.

The elimination of symbols and sections which are unused should really occur at
the link phase.  This will not cause any change in the resulting binary, simply
in the generated object files.

The adjustments to the other unit tests account for the fluctuating section
index caused by the appearance of sections which were previously discarded.

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

9 years agoX86: Don't turn shifts into ands if there's another use that may not check for equality.
Benjamin Kramer [Fri, 6 Jun 2014 21:08:55 +0000 (21:08 +0000)]
X86: Don't turn shifts into ands if there's another use that may not check for equality.

Fixes PR19964.

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

9 years agoFix a few issues with comdat handling on COFF.
Rafael Espindola [Fri, 6 Jun 2014 19:26:12 +0000 (19:26 +0000)]
Fix a few issues with comdat handling on COFF.

* Section association cannot use just the section name as many
sections can have the same name. With this patch, the comdat symbol in
an assoc section is interpreted to mean a symbol in the associated
section and the mapping is discovered from it.

* Comdat symbols were not being set correctly. Instead we were getting
whatever was output first for that section.

A consequence is that associative sections now must use .section to
set the association. Using .linkonce would not work since it is not
possible to change a sections comdat symbol (it is used to decide if
we should create a new section or reuse an existing one).

This includes r210298, which was reverted because it was asserting
on an associated section having the same comdat as the associated
section.

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

9 years agoHave TargetSelectionDAGInfo take a DataLayout initializer rather than
Eric Christopher [Fri, 6 Jun 2014 19:04:48 +0000 (19:04 +0000)]
Have TargetSelectionDAGInfo take a DataLayout initializer rather than
a TargetMachine since the only thing it wants is DataLayout.

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

9 years agoMatch the full hex offsets in test/DebugInfo/X86/gnu-public-names.ll
David Blaikie [Fri, 6 Jun 2014 18:45:14 +0000 (18:45 +0000)]
Match the full hex offsets in test/DebugInfo/X86/gnu-public-names.ll

These checks were accidentally skipping the 0x prefix in the hex
offsets, then cunningly ignoring the prefix in the use of those captured
values.

Except in the case of the unit length, where the match was only matching
the leading '0' before the x in the 0x prefix, then matching that
against the length. We can't actually express the length association
here, as the length field in the Compile Unit header does not include
the length field itself, but the length field in the pubnames section
/does/ include the size of the length field in the Compile Unit header -
so the two numbers are actually 4 bytes different. Just skip matching
that.

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

9 years agoFix a typo made in Programmer's Manual made in r210354. Spotted
Dan Liew [Fri, 6 Jun 2014 18:44:21 +0000 (18:44 +0000)]
Fix a typo made in Programmer's Manual made in r210354. Spotted
by Paul Robinson.

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

9 years agoRemove DWARF3 testing of test/DebugInfo/X86/gnu-public-names.ll
David Blaikie [Fri, 6 Jun 2014 18:22:04 +0000 (18:22 +0000)]
Remove DWARF3 testing of test/DebugInfo/X86/gnu-public-names.ll

This was added to test that DW_AT_GNU_pubnames used sec_offset in DWARF4
and data4 in DWARF3 and below. Since then we've updated
DW_AT_GNU_pubnames to be a flag, rather than a section offset anyway.

Granted this still differs between DWARF 3 and DWARF 4
(FORM_flag_present versun FORM_flag) but it doesn't seem worthwhile
testing that codepath again here. It's covered adequately in many other
test cases.

And while I'm here, don't hardcode the byte size of the compile unit -
it's not relevant to this test and just makes it brittle if/when
anything changes in the way this CU is emitted.

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

9 years agoFixed a bug in lowering shuffle_vectors to insertps
Filipe Cabecinhas [Fri, 6 Jun 2014 18:07:06 +0000 (18:07 +0000)]
Fixed a bug in lowering shuffle_vectors to insertps

Summary:
We were being too strict and not accounting for undefs.
Added a test case and fixed another one where we improved codegen.

Reviewers: grosbach, nadav, delena

Subscribers: llvm-commits

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

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

9 years agoMention the IRBuilder in Programmer's Manual with a few small examples.
Dan Liew [Fri, 6 Jun 2014 17:25:47 +0000 (17:25 +0000)]
Mention the IRBuilder in Programmer's Manual with a few small examples.

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

9 years agoFix typo in a test from r210342.
Michael Zolotukhin [Fri, 6 Jun 2014 15:49:47 +0000 (15:49 +0000)]
Fix typo in a test from r210342.

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

9 years ago[SLP] Enable vectorization of GEP expressions.
Michael Zolotukhin [Fri, 6 Jun 2014 15:34:24 +0000 (15:34 +0000)]
[SLP] Enable vectorization of GEP expressions.

The use cases look like the following:
    x->a = y->a + 10
    x->b = y->b + 12

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

9 years ago[PPC64LE] Fix lowering of BUILD_VECTOR and SHUFFLE_VECTOR for little endian
Bill Schmidt [Fri, 6 Jun 2014 14:06:26 +0000 (14:06 +0000)]
[PPC64LE] Fix lowering of BUILD_VECTOR and SHUFFLE_VECTOR for little endian

This patch fixes a couple of lowering issues for little endian
PowerPC.  The code for lowering BUILD_VECTOR contains a number of
optimizations that are only valid for big endian.  For now, we disable
those optimizations for correctness.  In the future, we will add
analogous optimizations that are correct for little endian.

When lowering a SHUFFLE_VECTOR to a VPERM operation, we again need to
make the now-familiar transformation of swapping the input operands
and complementing the permute control vector.  Correctness of this
transformation is tested by the accompanying test case.

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

9 years agoSlight language tweak from Jonathan Humphreys.
Pekka Jaaskelainen [Fri, 6 Jun 2014 11:21:44 +0000 (11:21 +0000)]
Slight language tweak from Jonathan Humphreys.

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

9 years agoTouch configure to force clang's config.h.in reconfiguration on the build servers
Alp Toker [Fri, 6 Jun 2014 10:36:38 +0000 (10:36 +0000)]
Touch configure to force clang's config.h.in reconfiguration on the build servers

Gutted that this is needed, folks who care about keeping the legacy build
system alive should sort this out already.

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

9 years agolld test for configure & make
Iain Sandoe [Fri, 6 Jun 2014 09:06:25 +0000 (09:06 +0000)]
lld test for configure & make

r210177 added lld Makefiles, r210245 added automatic build when the source is present.

This revision completes the set by adding the lld test and unittests to the check-all target.

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

9 years agoRevert r210298 'Correctly set the comdat symbol on COFF' as it asserts on Windows
Timur Iskhodzhanov [Fri, 6 Jun 2014 08:18:18 +0000 (08:18 +0000)]
Revert r210298 'Correctly set the comdat symbol on COFF' as it asserts on Windows

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

9 years ago[yaml2obj][obj2yaml] Support ELF symbol's visibility flags (default/hidden/protected).
Simon Atanasyan [Fri, 6 Jun 2014 07:41:57 +0000 (07:41 +0000)]
[yaml2obj][obj2yaml] Support ELF symbol's visibility flags (default/hidden/protected).

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

9 years agoAdded select flavour for ABS and NEG(ABS)
Dinesh Dwivedi [Fri, 6 Jun 2014 06:54:45 +0000 (06:54 +0000)]
Added select flavour for ABS and NEG(ABS)

This patch can identify
  ABS(X) ==> (X >s 0) ? X : -X and (X >s -1) ? X : -X
  ABS(X) ==> (X <s 0) ? -X : X and (X <s 1) ? -X : X
  NABS(X) ==> (X >s 0) ? -X : X and (X >s -1) ? -X : X
  NABS(X) ==> (X <s 0) ? X : -X and (X <s 1) ? X : -X

and can transform
  ABS(ABS(X)) -> ABS(X)
  NABS(NABS(X)) -> NABS(X)

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

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

9 years agoMake LINK_POLLY_INTO_TOOLS work with the CMake build
Alp Toker [Fri, 6 Jun 2014 06:39:00 +0000 (06:39 +0000)]
Make LINK_POLLY_INTO_TOOLS work with the CMake build

The option check was being performed after config.h/llvm-config.h substitution,
generating incorrect macro definitions.

Fixes PR19614.

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

9 years agoFix PR19657 (scalar loads not combined into vector load)
Karthik Bhat [Fri, 6 Jun 2014 06:20:08 +0000 (06:20 +0000)]
Fix PR19657 (scalar loads not combined into vector load)
If we have common uses on separate paths in the tree; process the one with greater common depth first.
This makes sure that we do not assume we need to extract a load when it is actually going to be part of a vectorized tree.

Review: http://reviews.llvm.org/D3800

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

9 years agoRemove clang-specific libxml2 check from CMake
Alp Toker [Fri, 6 Jun 2014 05:08:42 +0000 (05:08 +0000)]
Remove clang-specific libxml2 check from CMake

clang's own CMake setup handles this as of r210308.

The CMAKE_CROSSCOMPILING special-case will no longer be hard-coded. This was
clearly site-specific to someone's local configuration and should be passed in
at configure time if needed with e.g. -DLIBXML2_LIBRARIES=... (the libxml2
target I tried here doesn't even support liblzma so it's *way* off).

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

9 years agoconfig.h: remove clang-specific macro definitions
Alp Toker [Fri, 6 Jun 2014 04:50:41 +0000 (04:50 +0000)]
config.h: remove clang-specific macro definitions

These had no business in LLVM core.

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

9 years agoAllow aliases to be unnamed_addr.
Rafael Espindola [Fri, 6 Jun 2014 01:20:28 +0000 (01:20 +0000)]
Allow aliases to be unnamed_addr.

Alias with unnamed_addr were in a strange state. It is stored in GlobalValue,
the language reference talks about "unnamed_addr aliases" but the verifier
was rejecting them.

It seems natural to allow unnamed_addr in aliases:

* It is a property of how it is accessed, not of the data itself.
* It is perfectly possible to write code that depends on the address
of an alias.

This patch then makes unname_addr legal for aliases. One side effect is that
the syntax changes for a corner case: In globals, unnamed_addr is now printed
before the address space.

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

9 years agoFix markup for -debug-only option
Alexey Samsonov [Thu, 5 Jun 2014 23:12:43 +0000 (23:12 +0000)]
Fix markup for -debug-only option

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

9 years agoFix null dereference with -debug-only=dwarfdebug
Alexey Samsonov [Thu, 5 Jun 2014 23:10:19 +0000 (23:10 +0000)]
Fix null dereference with -debug-only=dwarfdebug

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

9 years agoCorrectly set the comdat symbol on COFF.
Rafael Espindola [Thu, 5 Jun 2014 23:09:25 +0000 (23:09 +0000)]
Correctly set the comdat symbol on COFF.

We extended the .section syntax to allow multiple sections with the
same name but different comdats, but currently we don't make sure that
the output section has that comdat symbol.

That happens to work with the code llc produces currently because it looks like

.section secName, "dr", one_only, "COMDATSym"
.globl COMDATSym
COMDATSym:
....

but that is not very friendly to anyone coding in assembly or even to
llc once we get comdat support in the IR.

This patch changes the coff object writer to make sure the comdat symbol is
output just after the section symbol, as required by the coff spec.

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

9 years ago[PPC64LE] Add test case for r210282 commit
Bill Schmidt [Thu, 5 Jun 2014 22:57:38 +0000 (22:57 +0000)]
[PPC64LE] Add test case for r210282 commit

Chandler correctly pointed out that I need an LLVM IR test for
r210282, which modified the vperm -> shuffle transform for little
endian PowerPC.  This patch provides that test.

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

9 years agoRemove X86Subtarget from the X86FrameLowering constructor since
Eric Christopher [Thu, 5 Jun 2014 22:10:58 +0000 (22:10 +0000)]
Remove X86Subtarget from the X86FrameLowering constructor since
we can just pass in the values we already know and we're not
caching the subtarget anymore.

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

9 years agoFixed several correctness issues in SeparateConstOffsetFromGEP
Jingyue Wu [Thu, 5 Jun 2014 22:07:33 +0000 (22:07 +0000)]
Fixed several correctness issues in SeparateConstOffsetFromGEP

Most issues are on mishandling s/zext.

Fixes:

1. When rebuilding new indices, s/zext should be distributed to
sub-expressions. e.g., sext(a +nsw (b +nsw 5)) = sext(a) + sext(b) + 5 but not
sext(a + b) + 5. This also affects the logic of recursively looking for a
constant offset, we need to include s/zext into the context of the searching.

2. Function find should return the bitwidth of the constant offset instead of
always sign-extending it to i64.

3. Stop shortcutting zext'ed GEP indices. LLVM conceptually sign-extends GEP
indices to pointer-size before computing the address. Therefore, gep base,
zext(a + b) != gep base, a + b

Improvements:

1. Add an optimization for splitting sext(a + b): if a + b is proven
non-negative (e.g., used as an index of an inbound GEP) and one of a, b is
non-negative, sext(a + b) = sext(a) + sext(b)

2. Function Distributable checks whether both sext and zext can be distributed
to operands of a binary operator. This helps us split zext(sext(a + b)) to
zext(sext(a) + zext(sext(b)) when a + b does not signed or unsigned overflow.

Refactoring:

Merge some common logic of handling add/sub/or in find.

Testing:

Add many tests in split-gep.ll and split-gep-and-gvn.ll to verify the changes
we made.

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

9 years agoRemove caching of the subtarget for X86FrameLowering.
Eric Christopher [Thu, 5 Jun 2014 22:00:31 +0000 (22:00 +0000)]
Remove caching of the subtarget for X86FrameLowering.

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

9 years agoRemove duplicate copy of InstrItineraryData from the TargetMachine,
Eric Christopher [Thu, 5 Jun 2014 21:42:54 +0000 (21:42 +0000)]
Remove duplicate copy of InstrItineraryData from the TargetMachine,
it's already on the subtarget.

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

9 years agoAdding explicit triples to the ARM jumptable tests
Tom Roeder [Thu, 5 Jun 2014 21:40:13 +0000 (21:40 +0000)]
Adding explicit triples to the ARM jumptable tests

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

9 years agoAdd a testcase where there is an overflow when combining two constants.
Rafael Espindola [Thu, 5 Jun 2014 21:29:49 +0000 (21:29 +0000)]
Add a testcase where there is an overflow when combining two constants.

I noticed that a proposed optimization would have prevented this.

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

9 years agoAdd "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.
Kevin Enderby [Thu, 5 Jun 2014 21:21:57 +0000 (21:21 +0000)]
Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.

This is a first step in seeing if it is possible to make llvm-nm produce
the same output as darwin's nm(1).  Darwin's default format is bsd but its
-m output prints the longer Mach-O specific details.  For now I added the
"-format darwin" to do this (whos name may need to change in the future).
As there are other Mach-O specific flags to nm(1) which I'm hoping to add some
how in the future.  But I wanted to see if I could get the correct output for
-m flag using llvm-nm and the libObject interfaces.

I got this working but would love to hear what others think about this approach
to getting object/format specific details printed with llvm-nm.

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

9 years ago[PPC64LE] Correct vperm -> shuffle transform for little endian
Bill Schmidt [Thu, 5 Jun 2014 19:46:04 +0000 (19:46 +0000)]
[PPC64LE] Correct vperm -> shuffle transform for little endian

As discussed in cfe commit r210279, the correct little-endian
semantics for the vec_perm Altivec interfaces are implemented by
reversing the order of the input vectors and complementing the permute
control vector.  This converts the desired permute from little endian
element order into the big endian element order that the underlying
PowerPC vperm instruction uses.  This is represented with a
ppc_altivec_vperm intrinsic function.

The instruction combining pass contains code to convert a
ppc_altivec_vperm intrinsic into a vector shuffle operation when the
intrinsic has a permute control vector (mask) that is a constant.
However, the vector shuffle operation assumes that vector elements are
in natural order for their endianness, so for little endian code we
will get the wrong result with the existing transformation.

This patch reverses the semantic change to vec_perm that was performed
in altivec.h by once again swapping the input operands and
complementing the permute control vector, returning the element
ordering to little endian.

The correctness of this code is tested by the new perm.c test added in
a previous patch, and by other tests in the test suite that fail
without this patch.

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

9 years agoRemoving spurious dependency of IPO on JumpInstrTables
Tom Roeder [Thu, 5 Jun 2014 19:43:57 +0000 (19:43 +0000)]
Removing spurious dependency of IPO on JumpInstrTables

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

9 years agoAdd a new attribute called 'jumptable' that creates jump-instruction tables for funct...
Tom Roeder [Thu, 5 Jun 2014 19:29:43 +0000 (19:29 +0000)]
Add a new attribute called 'jumptable' that creates jump-instruction tables for functions marked with this attribute.
It includes a pass that rewrites all indirect calls to jumptable functions to pass through these tables.

This also adds backend support for generating the jump-instruction tables on ARM and X86.
Note that since the jumptable attribute creates a second function pointer for a
function, any function marked with jumptable must also be marked with unnamed_addr.

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

9 years agoDocument how to select build configuration with Visual C++ IDE or command line.
Yaron Keren [Thu, 5 Jun 2014 16:42:26 +0000 (16:42 +0000)]
Document how to select build configuration with Visual C++ IDE or command line.

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

9 years ago[PPC64LE] Temporarily disable VSX support in little-endian mode
Bill Schmidt [Thu, 5 Jun 2014 16:21:13 +0000 (16:21 +0000)]
[PPC64LE] Temporarily disable VSX support in little-endian mode

This is a preliminary patch for the PowerPC64LE support.  In stage 1
of the vector support, we will support the VMX (Altivec) instruction
set, but will not yet support the VSX instructions.  This is merely a
staging issue to provide functional vector support as soon as
possible.

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

9 years ago[asancov] Fix coverage line info some more.
Evgeniy Stepanov [Thu, 5 Jun 2014 14:34:45 +0000 (14:34 +0000)]
[asancov] Fix coverage line info some more.

Now it should always point to the opening brace of the function (in
-asan-coverage=1 mode).

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

9 years agoAdd missing const specifier to a const method.
Evgeniy Stepanov [Thu, 5 Jun 2014 14:32:15 +0000 (14:32 +0000)]
Add missing const specifier to a const method.

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

9 years agoXFAIL: test/DebugInfo/missing-abstract-variable.ll on s390x as well
Ulrich Weigand [Thu, 5 Jun 2014 14:20:54 +0000 (14:20 +0000)]
XFAIL: test/DebugInfo/missing-abstract-variable.ll on s390x as well

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

9 years ago[SystemZ] Do not install IfConverter pass at -O0
Ulrich Weigand [Thu, 5 Jun 2014 14:20:10 +0000 (14:20 +0000)]
[SystemZ] Do not install IfConverter pass at -O0

When not optimizing, do not run the IfConverter pass, this makes
debugging more difficult (and causes a testsuite failure in
DebugInfo/unconditional-branch.ll).

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

9 years ago[mips] Modify long branch for NaCl:
Sasa Stankovic [Thu, 5 Jun 2014 13:52:08 +0000 (13:52 +0000)]
[mips] Modify long branch for NaCl:

  * Move the instruction that changes sp outside of the branch delay slot.
  * Bundle-align the target of indirect branch.

Differential Revision: http://llvm-reviews.chandlerc.com/D3928

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

9 years agoPrevent hoisting the instruction whose def might be clobbered by the terminator.
Sasa Stankovic [Thu, 5 Jun 2014 13:42:48 +0000 (13:42 +0000)]
Prevent hoisting the instruction whose def might be clobbered by the terminator.

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

9 years ago[mips] Fix triple.
Matheus Almeida [Thu, 5 Jun 2014 12:07:14 +0000 (12:07 +0000)]
[mips] Fix triple.

Mips2 is a 32-bit architecture.

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

9 years agolld (build with configur and make) Enable build
Iain Sandoe [Thu, 5 Jun 2014 08:49:55 +0000 (08:49 +0000)]
lld (build with configur and make) Enable build

r210177 added Makefiles to the lld project.
This revision enables the automatic build of lld when the sources are found in tools/lld.

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

9 years agoR600: Fix test. Using wrong check prefix.
Matt Arsenault [Thu, 5 Jun 2014 08:00:36 +0000 (08:00 +0000)]
R600: Fix test. Using wrong check prefix.

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

9 years agoFix coverage for files with global constructors again. Adds a testcase to the commit...
Nick Lewycky [Thu, 5 Jun 2014 04:31:43 +0000 (04:31 +0000)]
Fix coverage for files with global constructors again. Adds a testcase to the commit from r206671, as requested by David Blaikie.

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

9 years agoRevert r210221 again, due to a crash Richard Smith has provided involving self-hostin...
David Blaikie [Thu, 5 Jun 2014 02:04:59 +0000 (02:04 +0000)]
Revert r210221 again, due to a crash Richard Smith has provided involving self-hosting LLVM with libc++.

Test case coming, once I reduce it.

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

9 years agoDebugInfo: Reuse existing LexicalScope to retrieve the scope's MDNode, rather than...
David Blaikie [Thu, 5 Jun 2014 01:30:50 +0000 (01:30 +0000)]
DebugInfo: Reuse existing LexicalScope to retrieve the scope's MDNode, rather than looking it up through the DebugLoc.

No functional change intended, just streamlines the abstract variable
lookup/construction to use a common entry point.

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

9 years agoDebugInfo: Roll argument insertion into variable insertion to ensure arguments are...
David Blaikie [Thu, 5 Jun 2014 01:04:20 +0000 (01:04 +0000)]
DebugInfo: Roll argument insertion into variable insertion to ensure arguments are correctly handled in all cases.

No functional change intended.

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

9 years agoPR19388: DebugInfo: Emit dead arguments in their originally declared order.
David Blaikie [Thu, 5 Jun 2014 00:51:35 +0000 (00:51 +0000)]
PR19388: DebugInfo: Emit dead arguments in their originally declared order.

Unused arguments were not being added to the argument list, but instead
treated as arbitrary scope variables. This meant they weren't carefully
added in the original argument order.

In this particular example, though, it turns out the argument is only
/mostly/ unused (well, actually it's entirely used, but in a specific
way). It's a struct that, due to ABI reasons, is decomposed into chunks
(exactly one chunk, since it has one member) and then passed. Since only
one of those chunks is used (SROA, etc, kill the original reconstitution
code) we don't have a location to describe the whole variable.

In this particular case, since the struct consists of just the one int,
once we have partial location information, this should have a location
that describes the entire variable (since the piece is the entirety of
the object).

And at some point we'll need to describe the location of even /entirely/
unused arguments so that they can at least be printed on function entry.

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

9 years agoUse AArch64 instead of now removed ARM64 in test configs
Alexey Samsonov [Thu, 5 Jun 2014 00:25:30 +0000 (00:25 +0000)]
Use AArch64 instead of now removed ARM64 in test configs

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

9 years agoDebugInfo: Add comments/assert description to r209674 based on Eric Christopher's...
David Blaikie [Thu, 5 Jun 2014 00:25:26 +0000 (00:25 +0000)]
DebugInfo: Add comments/assert description to r209674 based on Eric Christopher's post-commit review feedback.

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

9 years agoWe've got a getSlotSize call already that we use everywhere else,
Eric Christopher [Thu, 5 Jun 2014 00:22:13 +0000 (00:22 +0000)]
We've got a getSlotSize call already that we use everywhere else,
use it here too.

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

9 years agoR600/SI: Match rsq instructions
Matt Arsenault [Thu, 5 Jun 2014 00:15:55 +0000 (00:15 +0000)]
R600/SI: Match rsq instructions

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

9 years ago80-columns.
Eric Christopher [Thu, 5 Jun 2014 00:09:08 +0000 (00:09 +0000)]
80-columns.

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

9 years agoRemove uses of the TargetMachine from X86FrameLowering.
Eric Christopher [Thu, 5 Jun 2014 00:09:05 +0000 (00:09 +0000)]
Remove uses of the TargetMachine from X86FrameLowering.

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