Commit Graph

96068 Commits

Author SHA1 Message Date
Adrian Prantl
ad577a5c1d simplify expression
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 00:15:33 +00:00
Adrian Prantl
3d6ce062dc Be sure we run ARM tests only when an ARM backend is present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190822 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 23:48:45 +00:00
Adrian Prantl
818833f279 Debug info: Fix PR16736 and rdar://problem/14990587.
A DBG_VALUE is register-indirect iff the first operand is a register
_and_ the second operand is an immediate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190821 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 23:29:03 +00:00
Matt Arsenault
4b28ee2088 MemCpyOptimizer: Use max legal int size instead of pointer size
If there are no legal integers, assume 1 byte.

This makes more sense than using the pointer size as
a guess for the maximum GPR width.

It is conceivable to want to use some 64-bit pointers
on a target where 64-bit integers aren't legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190817 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 22:43:16 +00:00
Preston Gurd
0c190ad93f Add Atom Silvermont (slm) tests
- check that -mcpu=slm uses the call register indirect optimization
- check that -mcpu=slm runs the scheduler 
- check that -mcpu=slm supports the movbe instruction



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190814 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 22:22:07 +00:00
Jakub Staszak
b06ea25b4c Use reference instead of copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190813 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 22:03:38 +00:00
Jordan Rose
26a6348612 [CMake] Hack GetSVN.cmake to handle unusual terminals.
I got a report of a hang in git's helper functions trying to figure out
how to display results of "git svn info" when run inside ninja, even though
the result is immediately piped to grep. This seems to avoid that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190808 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 21:38:01 +00:00
Krzysztof Parzyszek
892a5fdf49 Add testcase for r190631
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190807 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 21:24:30 +00:00
Tim Northover
107cfa2169 TableGen: fix constness of new comparison function.
libc++ didn't seem to like a non-const call operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190797 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 17:33:40 +00:00
Bill Schmidt
5c616f91a5 [PowerPC] Fix PR17155 - Ignore COPY_TO_REGCLASS during emit.
Fast-isel generates a COPY_TO_REGCLASS for widening f32 to f64, which
is a nop on PPC64.  This is needed to keep the register class system
happy, but on the fast-isel path it is not removed before emit as it
is for DAG select.  Ignore this op when emitting instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190795 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 17:25:12 +00:00
Tim Northover
03f9197d62 TableGen: give asm match classes deterministic order.
TableGen was sorting the entries in some of its internal data
structures by pointer. This order filtered through to the final
matching table and affected the diagnostics produced on bad assembly
occasionally.

It also turns out STL algorithms are ridiculously easy to misuse on
containers with custom order methods. (No bugs before, or now that I
know of, but plenty in the middle).

This should fix the sanitizer bot, which ends up with weird pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190793 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 16:43:19 +00:00
Tim Northover
6dd670af75 AsmMatcher: emit subtarget feature enum in deterministic order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190792 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 16:43:16 +00:00
Arnold Schwaighofer
5721d2f674 Don't vectorize if there are outside loop users of the induction variable.
We would have to compute the pre increment value, either by computing it on
every loop iteration or by splitting the edge out of the loop and inserting a
computation for it there.

For now, just give up vectorizing such loops.

Fixes PR17179.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190790 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 16:17:24 +00:00
Evgeniy Stepanov
e5c8c5a1bc [msan] Check return value of main().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190782 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 13:24:32 +00:00
Vladimir Medic
e925f7dbbf This patch implements Mips load/store instructions from/to coprocessor 2. Test cases are added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190780 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 10:29:42 +00:00
Benjamin Kramer
9bc7603750 ARM: Deduplicate ConstantPoolValues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190779 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 10:17:31 +00:00
Daniel Sanders
280d13f607 Fix the build for git repositories with multiple remotes.
Summary:
When a git repository had multiple remotes, ${repository} will be set to a multiline string. This causes compilation errors in SVNVersion.inc.

Fix this by limiting the output of utils/GetRepositoryPath to the first remote (which is reasonably likely to be 'origin').

Reviewers: jordan_rose

CC: llvm-commits, t.p.northover

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190778 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 09:25:49 +00:00
Richard Sandiford
219d2b8695 [SystemZ] Improve extload handling
The port originally had special patterns for extload, mapping them to the
same instructions as sextload.  It seemed neater to have patterns that
match "an extension that is allowed to be signed" and "an extension that
is allowed to be unsigned".

This was originally meant to be a clean-up, but it does improve the handling
of promoted integers a little, as shown by args-06.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190777 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 09:03:10 +00:00
Craig Topper
5fefc00bac Make F16C feature flag imply AVX rather than just checking both at the patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190775 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 04:29:58 +00:00
Peter Collingbourne
1e3037f0be Implement function prefix data as an IR feature.
Previous discussion:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190773 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 01:08:15 +00:00
Hal Finkel
fabfb5d588 PPC: Don't restrict lvsl generation to after type legalization
This is a re-commit of r190764, with an extra check to make sure that we're not
performing the transformation on illegal types (a small test case has been
added for this as well).

Original commit message:

The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190771 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 22:09:58 +00:00
Benjamin Kramer
94ee55d4b3 Replace some unnecessary vector copies with references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190770 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 22:04:42 +00:00
Benjamin Kramer
766f25306a ELF: Add support for the exclude section bit for gas compat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190769 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 19:53:20 +00:00
David Majnemer
bcd9b3b6b1 MC: Add support for '?' flags in .section directives
Summary:
The '?' flag uses the last section group if the last had a section
group.  We treat combining an explicit section group and the '?' as a
hard error.

This fixes PR17198.

Reviewers: rafael, bkramer

Reviewed By: bkramer

CC: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190768 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 19:24:16 +00:00
Kai Nacke
c29a720b36 Fix alignment of unwind data.
For alignment purposes, the instruction array will always have an even
number of entries, with the final entry potentially unused (in which
case the array will be one longer than indicated by the count of unwind
codes field).

Reviewed by Anton Korobeynikov, Charles Davis and Nico Rieck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190767 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 18:01:09 +00:00
Kai Nacke
7185bdd883 Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH
data structures.

The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB
instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding
the VK_COFF_IMGREL32 modifier to the symbol reference.
Change also references to start and end of the SEH range of a function
as offsets to start of the function.

Reviewed by Jim Grosbach, Charles Davis and Nico Rieck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190766 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 17:46:46 +00:00
Hal Finkel
19b59e66af Revert r190764: PPC: Don't restrict lvsl generation to after type legalization
This is causing test-suite failures.

Original commit message:

The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190765 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 15:41:11 +00:00
Hal Finkel
55532adc68 PPC: Don't restrict lvsl generation to after type legalization
The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190764 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 15:20:54 +00:00
Hal Finkel
77364b7a20 Prevent assert in CombinerGlobalAA with null values
DAGCombiner::isAlias can be called with SrcValue1 or SrcValue2 null, and we
can't use AA in this case (if we try, then the casting code in AA will assert).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190763 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 02:19:49 +00:00
Reed Kotler
6febf857f6 Expand the mask capability for deciding which functions are mips16 and mips32
so it can be better used for general interoperability testing between mips32
and mips16.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190762 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 02:09:08 +00:00
Benjamin Kramer
2ad0a2c122 Remove unused StringRef that no compiler warned about, I wonder why.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190759 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 22:55:54 +00:00
Ben Langmuir
a247e9d42b Add the remaining Intel SHA instructions
Also assembly/disassembly tests, and for sha256rnds2, aliases with an explicit
xmm0 dependency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190754 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 15:03:21 +00:00
Robert Wilhelm
4873c157f3 Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190750 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 09:34:59 +00:00
Robert Wilhelm
d9d6e6d591 Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190749 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 09:34:24 +00:00
Chandler Carruth
3748de6e2d Remove the long, long defunct IR block placement pass.
This pass was based on the previous (essentially unused) profiling
infrastructure and the assumption that by ordering the basic blocks at
the IR level in a particular way, the correct layout would happen in the
end. This sometimes worked, and mostly didn't. It also was a really
naive implementation of the classical paper that dates from when branch
predictors were primarily directional and when loop structure wasn't
commonly available. It also didn't factor into the equation
non-fallthrough branches and other machine level details.

Anyways, for all of these reasons and more, I wrote
MachineBlockPlacement, which completely supercedes this pass. It both
uses modern profile information infrastructure, and actually works. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190748 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 09:28:14 +00:00
Zoran Jovanovic
dcc425c630 Fixed bug when generating Load Upper Immediate microMIPS instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190746 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 07:35:41 +00:00
Zoran Jovanovic
ab48d10eff Support for microMIPS DIV instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190745 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 07:15:21 +00:00
Zoran Jovanovic
47b33528d1 Support for misc microMIPS instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190744 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 06:49:25 +00:00
Matt Arsenault
58b90b1e38 Add missing CHECK-LABEL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190740 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 02:44:06 +00:00
Matt Arsenault
262dee1ebf Add test for untested path in SimplifyCFG
This case wasn't checked with a pointer condition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190739 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 02:44:02 +00:00
Daniel Dunbar
2849503ab2 [lit] Add an --output option, for writing results in a machine readable form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190738 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 01:19:17 +00:00
Filip Pizlo
e94e0984df Make PrettyStackTraceEntry use ManagedStatic for its ThreadLocal.
This was somewhat tricky because ~PrettyStackTraceEntry() may run after 
llvm_shutdown() has been called. This is rare and only happens for a common idiom 
used in the main() functions of command-line tools. This works around the idiom by 
skipping the stack clean-up if the PrettyStackTraceHead ManagedStatic is not 
constructed (i.e. llvm_shutdown() has been called).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190730 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 22:59:47 +00:00
Hal Finkel
98bae99266 Add missing break statement in PPCISelLowering
As it turns out, not a problem in practice, but it should be there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190720 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 20:09:02 +00:00
Preston Gurd
94dc6540a8 Adds support for Atom Silvermont (SLM) - -march=slm
Implements Instruction scheduler latencies for Silvermont,
using latencies from the Intel Silvermont Optimization Guide.

Auto detects SLM.

Turns on post RA scheduler when generating code for SLM.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190717 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 19:23:28 +00:00
Quentin Colombet
0df68423f9 [Peephole] Rewrite copies to avoid cross register banks copies.
By definition copies across register banks are not coalescable. Still, it may be
possible to get rid of such a copy when the value is available in another
register of the same register file.
Consider the following example, where capital and lower letters denote different
register file:
b = copy A <-- cross-bank copy
...
C = copy b <-- cross-bank copy

This could have been optimized this way:
b = copy A  <-- cross-bank copy
...
C = copy A <-- same-bank copy

Note: b and C's definitions may be in different basic blocks.

This patch adds a peephole optimization that looks through a chain of copies
leading to a cross-bank copy and reuses a source that is on the same register
file if available.

This solution could also be used to get rid of some copies (e.g., A could have
been used instead of C). However, we do not do so because:
- It may over constrain the coloring of the source register for coalescing.
- The register allocator may not be able to find a nice split point for the
  longer live-range, leading to more spill.

<rdar://problem/14742333>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190713 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 18:26:31 +00:00
Benjamin Kramer
cbe40cfe96 Add warn_unused_result to empty() on various containers.
empty() doesn't actually empty out the container, making this a common typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190708 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 17:33:24 +00:00
Nuno Lopes
e946a9ceda typo fix: use BUILD_ARCHIVE to build .a libs and not ARCHIVE_LIBRARY
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190696 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 15:01:54 +00:00
Amaury de la Vieuville
489b9b348d Fix tests for hasFPARMv8 name change (r190692)
Patch by Bradley Smith

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190694 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 14:37:52 +00:00
Joey Gouly
2a9af9f18e [ARMv8] Change hasV8Fp to hasFPARMv8, and other command line options
to be more consistent.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190692 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 13:46:57 +00:00
Evgeniy Stepanov
993a0c56ec [msan] Add source file:line to stack origin reports.
Compiler part.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190689 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 12:54:49 +00:00