Commit Graph

95764 Commits

Author SHA1 Message Date
Hal Finkel 31025a6325 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.

llvm-svn: 190765
2013-09-15 15:41:11 +00:00
Hal Finkel 2945d4e916 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.

llvm-svn: 190764
2013-09-15 15:20:54 +00:00
Hal Finkel 31658834e6 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).

llvm-svn: 190763
2013-09-15 02:19:49 +00:00
Reed Kotler 655531521e 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.

llvm-svn: 190762
2013-09-15 02:09:08 +00:00
Benjamin Kramer 43cc98a78d Remove unused StringRef that no compiler warned about, I wonder why.
llvm-svn: 190759
2013-09-14 22:55:54 +00:00
Ben Langmuir 8eb45a4ef6 Add the remaining Intel SHA instructions
Also assembly/disassembly tests, and for sha256rnds2, aliases with an explicit
xmm0 dependency.

llvm-svn: 190754
2013-09-14 15:03:21 +00:00
Robert Wilhelm 042f10ce41 Fix spelling.
llvm-svn: 190750
2013-09-14 09:34:59 +00:00
Robert Wilhelm 516be56fd9 Fix spelling.
llvm-svn: 190749
2013-09-14 09:34:24 +00:00
Chandler Carruth ebeac5cb89 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. =]

llvm-svn: 190748
2013-09-14 09:28:14 +00:00
Zoran Jovanovic fc26cfcde7 Fixed bug when generating Load Upper Immediate microMIPS instruction.
llvm-svn: 190746
2013-09-14 07:35:41 +00:00
Zoran Jovanovic 3671a5441a Support for microMIPS DIV instructions.
llvm-svn: 190745
2013-09-14 07:15:21 +00:00
Zoran Jovanovic ab85278137 Support for misc microMIPS instructions.
llvm-svn: 190744
2013-09-14 06:49:25 +00:00
Matt Arsenault 2e5f5b2e78 Add missing CHECK-LABEL
llvm-svn: 190740
2013-09-14 02:44:06 +00:00
Matt Arsenault 8e48a7f911 Add test for untested path in SimplifyCFG
This case wasn't checked with a pointer condition.

llvm-svn: 190739
2013-09-14 02:44:02 +00:00
Daniel Dunbar cd625f4e54 [lit] Add an --output option, for writing results in a machine readable form.
llvm-svn: 190738
2013-09-14 01:19:17 +00:00
Filip Pizlo 67d9709341 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).

llvm-svn: 190730
2013-09-13 22:59:47 +00:00
Hal Finkel c3cfbf8677 Add missing break statement in PPCISelLowering
As it turns out, not a problem in practice, but it should be there.

llvm-svn: 190720
2013-09-13 20:09:02 +00:00
Preston Gurd 3fe264d625 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.

llvm-svn: 190717
2013-09-13 19:23:28 +00:00
Quentin Colombet cf71c6320b [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>

llvm-svn: 190713
2013-09-13 18:26:31 +00:00
Benjamin Kramer e35e7c982f Add warn_unused_result to empty() on various containers.
empty() doesn't actually empty out the container, making this a common typo.

llvm-svn: 190708
2013-09-13 17:33:24 +00:00
Nuno Lopes c38b2dabb0 typo fix: use BUILD_ARCHIVE to build .a libs and not ARCHIVE_LIBRARY
llvm-svn: 190696
2013-09-13 15:01:54 +00:00
Amaury de la Vieuville 9867f8649b Fix tests for hasFPARMv8 name change (r190692)
Patch by Bradley Smith

llvm-svn: 190694
2013-09-13 14:37:52 +00:00
Joey Gouly ccd04894c4 [ARMv8] Change hasV8Fp to hasFPARMv8, and other command line options
to be more consistent.

llvm-svn: 190692
2013-09-13 13:46:57 +00:00
Evgeniy Stepanov 0435ecd18f [msan] Add source file:line to stack origin reports.
Compiler part.

llvm-svn: 190689
2013-09-13 12:54:49 +00:00
Daniel Sanders eb03a37cfa Fix build failure reported by Tobias Markmann in bug 17203.
svn 1.8.0 emits an additional line matching 'URL:' in its 'svn info' command
('Relative URL:').
Changed the grep to match only the intended line so that a valid SVNVersion.inc
is generated.

The problem doesnt occur with the svn version I'm using (1.7.5) but Tobias has
confirmed that the change fixes the problem.

See http://llvm.org/bugs/show_bug.cgi?id=17203

llvm-svn: 190685
2013-09-13 12:41:38 +00:00
Joey Gouly 3c0e5567a9 [ARMv8] Emit the proper .fpu directive.
Patch by Bradley Smith!

llvm-svn: 190683
2013-09-13 11:51:52 +00:00
Amaury de la Vieuville 9fd5e53f1d Add "native" to config.available_features, to make it easier to disable non-x-compile-safe tests
Patch by Artyom Skrobov!

llvm-svn: 190679
2013-09-13 10:59:01 +00:00
Patrik Hagglund 57cb2bd0ef Fix for executing AutoRegen.sh. Revert a part of r187209.
Since r187209, which modified ltdl.m4, I was unable to execute
AutoRegen.sh, getting:

  ../configure:10779: error: possibly undefined macro: AC_LTDL_FUNC_ARGZ

This commit re-adds AC_LTDL_FUNC_ARGZ to ltdl.m4, as a quick fix. For me, this
corresponds to the configure file currently checked in.

(However, the ltdl library seems to be unused since r74924 in 2009,
except for the use of the LTDL_SHLIB_EXT macro in
bugpoint(?). Therefore, the right solution seems to try to get rid of
the local ltdl.m4 file, specified by autoconf/README.TXT.)

llvm-svn: 190677
2013-09-13 10:29:42 +00:00
Zoran Jovanovic def5d3475f Test commit to verify that commit access works.
llvm-svn: 190676
2013-09-13 10:08:05 +00:00
Richard Sandiford d816320809 [SystemZ] Use getTarget{Insert,Extract}Subreg rather than getMachineNode
Just a clean-up, no behavioral change intended.

llvm-svn: 190673
2013-09-13 09:12:44 +00:00
Richard Sandiford 030c165710 [SystemZ] Try to fold shifts into TMxx
E.g. "SRL %r2, 2; TMLL %r2, 1" => "TMLL %r2, 4".

llvm-svn: 190672
2013-09-13 09:09:50 +00:00
Duncan Sands c9e95ad0db Avoid a compiler warning about Found not being used when assertions are
disabled.

llvm-svn: 190668
2013-09-13 08:16:06 +00:00
Tim Northover 635a979038 AArch64: use RegisterOperand for NEON registers.
Previously we modelled VPR128 and VPR64 as essentially identical
register-classes containing V0-V31 (which had Q0-Q31 as "sub_alias"
sub-registers). This model is starting to cause significant problems
for code generation, particularly writing EXTRACT/INSERT_SUBREG
patterns for converting between the two.

The change here switches to classifying VPR64 & VPR128 as
RegisterOperands, which are essentially aliases for RegisterClasses
with different parsing and printing behaviour. This fits almost
exactly with their real status (VPR128 == FPR128 printed strangely,
VPR64 == FPR64 printed strangely).

llvm-svn: 190665
2013-09-13 07:26:52 +00:00
Craig Topper 21a916b6db Move operator to end of previous line to match coding standards.
llvm-svn: 190659
2013-09-13 04:41:06 +00:00
Eric Christopher dd1a01203d Add initial support for handling gnu style pubnames accepted by some
versions of gold. This support is designed to allow gold to produce
gdb_index sections similar to the accelerator tables and consumable
by gdb.

llvm-svn: 190649
2013-09-13 00:35:05 +00:00
Eric Christopher 8b3737fbb0 Reformat and hoist section grabbing to top level.
llvm-svn: 190648
2013-09-13 00:34:58 +00:00
Vincent Lejeune 0167a313da R600: Move clamp handling code to R600IselLowering.cpp
llvm-svn: 190645
2013-09-12 23:45:00 +00:00
Vincent Lejeune 9a248e5c2d R600: Move code handling literal folding into R600ISelLowering.
llvm-svn: 190644
2013-09-12 23:44:53 +00:00
Vincent Lejeune ab3baf80a8 R600: Move fabs/fneg/sel folding logic into PostProcessIsel
This move makes possible to correctly handle multiples instructions
from a single pattern.

llvm-svn: 190643
2013-09-12 23:44:44 +00:00
Chandler Carruth 51428e363f Remove an unused variable, fixing -Werror build with latest Clang.
llvm-svn: 190640
2013-09-12 23:30:48 +00:00
Hal Finkel a5ebe426a5 Remove unnecessary TBAA metadata from r190636's test case
llvm-svn: 190637
2013-09-12 23:23:12 +00:00
Hal Finkel 262a224712 Fix PPC ABI for ByVal structs with vector members
When a structure is passed by value, and that structure contains a vector
member, according to the PPC ABI, the structure will receive enhanced alignment
(so that the vector within the structure will always be aligned).

This should resolve PR16641.

llvm-svn: 190636
2013-09-12 23:20:06 +00:00
Joe Abbey 1a6e77080f Patch provide by Tom Roeder!
Reviewed by Joe Abbey and Tobias Grosser

Here is a patch that fixes decoding of CE_SELECT in BitcodeReader,
along with a simple test case. The problem in the current code is that
it generates but doesn't accept bitcode that uses vectors for the
first element of a select in this context.

llvm-svn: 190634
2013-09-12 22:02:31 +00:00
Krzysztof Parzyszek de7485af55 In AliasSetTracker, do not change the alias set to "mod/ref" when adding
a volatile load, or a volatile store.

llvm-svn: 190631
2013-09-12 20:15:50 +00:00
Hal Finkel 1e2e3ea584 Make the PPC fast-math sqrt expansion safe at 0
In fast-math mode sqrt(x) is calculated using the fast expansion of the
reciprocal of the reciprocal sqrt expansion. The reciprocal and reciprocal
sqrt expansions use the associated estimate instructions along with some Newton
iterations. Unfortunately, as a result, sqrt(0) was being calculated as NaN,
which is not correct. Now we explicitly return a result of zero if the input is
zero.

llvm-svn: 190624
2013-09-12 19:04:12 +00:00
Roman Divacky 62cb63543b Implement asm support for a few PowerPC bookIII that are needed for assembling
FreeBSD kernel.

llvm-svn: 190618
2013-09-12 17:50:54 +00:00
Filip Pizlo f2189bf311 This switches CrashRecoveryContext to using ManagedStatic for its global Mutex and
global ThreadLocals, thereby getting rid of the load-time initialization of those 
objects and also getting rid of their destruction unless the LLVM client calls 
llvm_shutdown.

llvm-svn: 190617
2013-09-12 17:46:57 +00:00
Ben Langmuir 1650175de6 Partial support for Intel SHA Extensions (sha1rnds4)
Add basic assembly/disassembly support for the first Intel SHA
instruction 'sha1rnds4'. Also includes feature flag, and test cases.

Support for the remaining instructions will follow in a separate patch.

llvm-svn: 190611
2013-09-12 15:51:31 +00:00
Hal Finkel 0096dbd50d Mark PPC MFTB and DST (and friends) as deprecated
Use the new instruction deprecation feature to mark mftb (now replaced with
mfspr) and dst (along with the other Altivec cache control instructions) as
deprecated when targeting cores supporting at least ISA v2.03.

llvm-svn: 190605
2013-09-12 14:40:06 +00:00
Joey Gouly 904d8806ce Somehow this important part of the patch, where I actually check the Mask,
got lost during my iterations of review.

Thanks to Hal for spotting it!

llvm-svn: 190604
2013-09-12 14:23:19 +00:00