Bill Wendling [Fri, 22 Apr 2011 01:07:09 +0000 (01:07 +0000)]
Branch folding is folding a landing pad into a regular BB.
An exception is thrown via a call to _cxa_throw, which we don't expect to
return. Therefore, the "true" part of the invoke goes to a BB that has
'unreachable' as its only instruction. This is lowered into an empty MachineBB.
The landing pad for this invoke, however, is directly after the "true" MBB.
When the empty MBB is removed, the landing pad is directly below the BB with the
invoke call. The unconditional branch is removed and then the two blocks are
merged together.
The testcase is too big for a regression test.
<rdar://problem/
9305728>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129965
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 22 Apr 2011 00:37:01 +0000 (00:37 +0000)]
Define Neon load/store intrinsics for Clang as macros instead of functions.
This is needed so the front-end can see "aligned" attributes on the type
for the pointer arguments. Radar
9311427.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129964
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 22 Apr 2011 00:08:43 +0000 (00:08 +0000)]
Compute the size of the FDE encoding instead of hard coding it. Update
X8664_ELFTargetObjectFile::getFDEEncoding to match reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129959
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 Apr 2011 23:39:26 +0000 (23:39 +0000)]
Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129955
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 Apr 2011 23:26:40 +0000 (23:26 +0000)]
Don't pass address spaces to EmitULEB128IntValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129953
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 21 Apr 2011 23:22:35 +0000 (23:22 +0000)]
Fix DWARF description of Q registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129952
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 21 Apr 2011 22:48:26 +0000 (22:48 +0000)]
Fix DWARF description of S registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129947
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 21 Apr 2011 22:26:13 +0000 (22:26 +0000)]
Add DW_OP_bit_piece.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129945
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 21 Apr 2011 21:07:35 +0000 (21:07 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129938
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 21 Apr 2011 20:16:43 +0000 (20:16 +0000)]
Test case for r129922
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129934
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Thu, 21 Apr 2011 19:59:31 +0000 (19:59 +0000)]
PR9214: Convert Metadata API to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129932
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 21 Apr 2011 19:46:23 +0000 (19:46 +0000)]
Don't recycle loop variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129928
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 21 Apr 2011 18:38:15 +0000 (18:38 +0000)]
Allow allocatable ranges from global live range splitting to be split again.
These intervals are allocatable immediately after splitting, but they may be
evicted because of later splitting. This is rare, but when it happens they
should be split again.
The remainder intervals that cannot be allocated after splitting still move
directly to spilling.
SplitEditor::finish can optionally provide a mapping from new live intervals
back to the original interval indexes returned by openIntv().
Each original interval index can map to multiple new intervals after connected
components have been separated. Dead code elimination may also add existing
intervals to the list.
The reverse mapping allows the SplitEditor client to treat the new intervals
differently depending on the split region they came from.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129925
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 Apr 2011 18:36:50 +0000 (18:36 +0000)]
Fix relative relocations. This is sufficient for running the rust testsuite with
MC :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129923
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 21 Apr 2011 17:51:06 +0000 (17:51 +0000)]
As per ARM docs, register Dx is described as DW_OP_regx(256+x) in DWARF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129922
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 21 Apr 2011 17:50:24 +0000 (17:50 +0000)]
Add comment in output stream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129921
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 21 Apr 2011 16:14:46 +0000 (16:14 +0000)]
Revert r1296656, "Fix rdar://
9289512 - not folding load into compare at -O0...",
which broke a couple GCC test suite tests at -O0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129914
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 21 Apr 2011 16:08:02 +0000 (16:08 +0000)]
PTX: Expand useable register space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129913
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Thu, 21 Apr 2011 10:56:58 +0000 (10:56 +0000)]
ptx: fix parameter ordering
This patch depends on the prior fix r129908 that changes to use std::find,
rather than std::binary_search, on unordered array.
Patch by Dan Bailey
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129909
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Thu, 21 Apr 2011 10:16:20 +0000 (10:16 +0000)]
ptx: PTXMachineFunctionInfo no longer sort registers and so should not use std::binary_search
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129908
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 21 Apr 2011 03:43:21 +0000 (03:43 +0000)]
Don't allow per-register spill size and alignment.
These values were not used for anything. Spill size and alignment is a property
of the register class, not the register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129906
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 21 Apr 2011 03:18:00 +0000 (03:18 +0000)]
In gcov profiling, give all functions an extra unified return block. This is
necessary since gcov counts transitions between blocks. It can't see if you've
run every line in a straight-line function, so we add an edge for it to notice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129905
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 21 Apr 2011 02:48:39 +0000 (02:48 +0000)]
Fix think-o: emit all 8 bytes of the EOF marker. Also reflow a line in a
comment for 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129904
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 21 Apr 2011 01:56:25 +0000 (01:56 +0000)]
Add independent controls for whether GCOV profiling should emit .gcno files or
instrument the program to emit .gcda.
TODO: we should emit slightly different .gcda files when .gcno emission is off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129903
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 21 Apr 2011 01:54:08 +0000 (01:54 +0000)]
Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129902
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 21 Apr 2011 01:52:00 +0000 (01:52 +0000)]
docs/llvm.css: Introduce cascading style <div> and <p> continued on <h[2-5]>. For now, it is applied in AliasAnalysis.html and ReleaseNotes.html.
<h2>Section Example</h2>
<div> <!-- h2+div is applied -->
<p>Section preamble.</p>
<h3>Subsection Example</h3>
<p> <!-- h3+p is applied -->
Subsection body
</p>
<!-- End of section body -->
</div>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129901
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 21 Apr 2011 01:32:19 +0000 (01:32 +0000)]
docs/Passes.html: Fix a garbage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129900
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 20 Apr 2011 22:52:37 +0000 (22:52 +0000)]
Structs have elements not parameters. I'm surprised this ever compiled...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129888
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 20 Apr 2011 22:20:12 +0000 (22:20 +0000)]
Remove -use-divmod-libcall. Let targets opt in when they are available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129884
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Apr 2011 22:14:20 +0000 (22:14 +0000)]
Add debug output for rematerializable instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129883
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Apr 2011 22:14:17 +0000 (22:14 +0000)]
Permit remat when a virtual register has multiple defs.
TII::isTriviallyReMaterializable() shouldn't depend on any properties of the
register being defined by the instruction. Rematerialization is going to create
a new virtual register anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129882
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Apr 2011 21:48:38 +0000 (21:48 +0000)]
Fix another case of <rdar://problem/
9184212> that only occurs with code
generated by llvm-gcc, since llvm-gcc uses 2 i64s for passing a 4 x float
vector on ARM rather than an i64 array like Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129878
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Apr 2011 21:48:34 +0000 (21:48 +0000)]
The bitcast case here is actually handled uniformly earlier in the function, so
delete it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129877
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Apr 2011 21:48:16 +0000 (21:48 +0000)]
Cleanup some code to better use an early return style in preparation for adding
more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129876
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 20 Apr 2011 21:47:45 +0000 (21:47 +0000)]
Un-XFAIL this test for ARM. <rdar://problem/
7662569>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129875
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Apr 2011 19:00:08 +0000 (19:00 +0000)]
Revert r129846; it's breaking a buildbot. See
http://google1.osuosl.org:8011/builders/llvm-x86_64-linux-checks/builds/825/steps/test.llvm.stage2/logs/st.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129869
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Apr 2011 18:19:48 +0000 (18:19 +0000)]
Prefer cheap registers for busy live ranges.
On the x86-64 and thumb2 targets, some registers are more expensive to encode
than others in the same register class.
Add a CostPerUse field to the TableGen register description, and make it
available from TRI->getCostPerUse. This represents the cost of a REX prefix or a
32-bit instruction encoding required by choosing a high register.
Teach the greedy register allocator to prefer cheap registers for busy live
ranges (as indicated by spill weight).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129864
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 20 Apr 2011 18:09:26 +0000 (18:09 +0000)]
Excise unintended hunk in 129858. <rdar://problem/
7662569>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129862
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Wed, 20 Apr 2011 16:47:52 +0000 (16:47 +0000)]
ARM byval support. Will be enabled by another patch to the FE. <rdar://problem/
7662569>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129858
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 20 Apr 2011 15:44:33 +0000 (15:44 +0000)]
sys/Host: Change getHostTriple() to return the full Darwin version on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129852
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Wed, 20 Apr 2011 15:37:17 +0000 (15:37 +0000)]
PTX: Add intrinsics to list of built-in intrinsics, which allows them to be
used by Clang. To help Clang integration, the PTX target has been split
into two targets: ptx32 and ptx64, depending on the desired pointer size.
- Add GCCBuiltin class to all intrinsics
- Split PTX target into ptx32 and ptx64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129851
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 20 Apr 2011 14:01:45 +0000 (14:01 +0000)]
Behave like gnu as when a relocation crosses sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129850
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Wed, 20 Apr 2011 09:28:55 +0000 (09:28 +0000)]
ptx: add integer div and rem instruction
Patched by Dan Bailey
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129848
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Wed, 20 Apr 2011 09:28:20 +0000 (09:28 +0000)]
ptx: add floating-point comparison to setp
Patched by Dan Bailey
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129847
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Wed, 20 Apr 2011 09:27:19 +0000 (09:27 +0000)]
ptx: fix parameter ordering
Patched by Dan Bailey
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129846
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 20 Apr 2011 03:19:42 +0000 (03:19 +0000)]
This should always be signed chars, so use int8_t. This fixes a miscompile when
llvm is built with unsigned chars where an immediate such as 0xff would be zero
extended to 64-bits, turning "cmp $0xff,%eax" into
"cmp $0xffffffffffffffff,%eax".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129845
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 20 Apr 2011 03:08:09 +0000 (03:08 +0000)]
Remove unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129844
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 20 Apr 2011 01:19:45 +0000 (01:19 +0000)]
Rewrite the expander for umulo/smulo to remember to sign extend the input
manually and pass all (now) 4 arguments to the mul libcall. Add a new
ExpandLibCall for just this (copied gratuitously from type legalization).
Fixes rdar://
9292577
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129842
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 20 Apr 2011 00:47:19 +0000 (00:47 +0000)]
llc: Fix a refacto, .loc support didn't work before 10.6.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129841
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Wed, 20 Apr 2011 00:43:34 +0000 (00:43 +0000)]
Made the MC disassembler check before accessing
MCInst operands for ARM. This allows it to be
more tolerant of malformed MCInsts or incorrect
instruction metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129840
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 20 Apr 2011 00:14:25 +0000 (00:14 +0000)]
ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OS
triple component.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129838
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Tue, 19 Apr 2011 23:58:52 +0000 (23:58 +0000)]
Fix typo in the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129837
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 23:55:20 +0000 (23:55 +0000)]
ADT/Triple: Drop support for -osx style triples, we are going with -macosx
instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129836
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 23:34:12 +0000 (23:34 +0000)]
ADT/Triple: Add support for Triple::MacOSX per feedback from Chris, will remove
Triple::OSX once Clang has moved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129833
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 21:14:45 +0000 (21:14 +0000)]
ADT/Triple: Move a variety of clients to using isOSDarwin() and isOSWindows()
predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129816
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 21:12:05 +0000 (21:12 +0000)]
ADT/Triple: Add isOSDarwin() and isOSWindows() helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129815
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 21:07:03 +0000 (21:07 +0000)]
ADT/Triple: Fix Triple::getArchNameForAssembler to support OSX and iOS
enumeration values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129814
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 21:04:12 +0000 (21:04 +0000)]
Target/X86: Eliminate uses of getDarwinVers().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129813
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 21:01:47 +0000 (21:01 +0000)]
Target/X86: Add getTargetTriple() accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129812
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:59:24 +0000 (20:59 +0000)]
Target/PPC: Kill off DarwinVers, which is now dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129811
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:57:03 +0000 (20:57 +0000)]
Target/PPC: Eliminate a use of getDarwinVers().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129810
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:54:28 +0000 (20:54 +0000)]
Target/PPC: Add a TargetTriple field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129809
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Apr 2011 20:47:57 +0000 (20:47 +0000)]
add a helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129806
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:46:13 +0000 (20:46 +0000)]
llc: Eliminate a use of getDarwinMajorNumber().
- As before, there is a minor semantic change here (evidenced by the test
change) for Darwin triples that have no version component. I debated changing
the default behavior of isOSVersionLT, but decided it made more sense for
triples to be explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129805
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:44:08 +0000 (20:44 +0000)]
Target: Eliminate a use of getDarwinMajorNumber().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129803
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:32:39 +0000 (20:32 +0000)]
CodeGen: Eliminate a use of getDarwinMajorNumber().
- There is a minor semantic change here (evidenced by the test change) for
Darwin triples that have no version component. I debated changing the default
behavior of isOSVersionLT, but decided it made more sense for triples to be
explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129802
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:30:10 +0000 (20:30 +0000)]
ADT/Triple: Add helper function for OS X version checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129801
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:30:07 +0000 (20:30 +0000)]
ADT/Triple: Add isOSVersionLT helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129800
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:24:34 +0000 (20:24 +0000)]
ADT/Triple: Generalize and simplify getDarwinNumber to just be getOSVersion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129799
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 19 Apr 2011 20:19:27 +0000 (20:19 +0000)]
ADT/Triple: Add support for more explicit "osx" and "ios" OS names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129798
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Tue, 19 Apr 2011 20:09:38 +0000 (20:09 +0000)]
Delete unnecessary variable. <rdar://problem/
7662569>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129796
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 19 Apr 2011 18:49:19 +0000 (18:49 +0000)]
Remove some duplicate op action entries and reorganize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129781
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 19 Apr 2011 18:11:57 +0000 (18:11 +0000)]
This patch combines several changes from Evan Cheng for rdar://
8659675.
Making use of VFP / NEON floating point multiply-accumulate / subtraction is
difficult on current ARM implementations for a few reasons.
1. Even though a single vmla has latency that is one cycle shorter than a pair
of vmul + vadd, a RAW hazard during the first (4? on Cortex-a8) can cause
additional pipeline stall. So it's frequently better to single codegen
vmul + vadd.
2. A vmla folowed by a vmul, vmadd, or vsub causes the second fp instruction to
stall for 4 cycles. We need to schedule them apart.
3. A vmla followed vmla is a special case. Obvious issuing back to back RAW
vmla + vmla is very bad. But this isn't ideal either:
vmul
vadd
vmla
Instead, we want to expand the second vmla:
vmla
vmul
vadd
Even with the 4 cycle vmul stall, the second sequence is still 2 cycles
faster.
Up to now, isel simply avoid codegen'ing fp vmla / vmls. This works well enough
but it isn't the optimial solution. This patch attempts to make it possible to
use vmla / vmls in cases where it is profitable.
A. Add missing isel predicates which cause vmla to be codegen'ed.
B. Make sure the fmul in (fadd (fmul)) has a single use. We don't want to
compute a fmul and a fmla.
C. Add additional isel checks for vmla, avoid cases where vmla is feeding into
fp instructions (except for the #3 exceptional case).
D. Add ARM hazard recognizer to model the vmla / vmls hazards.
E. Add a special pre-regalloc case to expand vmla / vmls when it's likely the
vmla / vmls will trigger one of the special hazards.
Enable these fp vmlx codegen changes for Cortex-A9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129775
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 19 Apr 2011 18:11:52 +0000 (18:11 +0000)]
Add -mcpu=cortex-a9-mp. It's cortex-a9 with MP extension. rdar://
8648637.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129774
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 19 Apr 2011 18:11:49 +0000 (18:11 +0000)]
Avoid some 's' 16-bit instruction which partially update CPSR
(and add false dependency) when it isn't dependent on last CPSR defining
instruction. rdar://
8928208
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129773
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 19 Apr 2011 18:11:45 +0000 (18:11 +0000)]
Avoid write-after-write issue hazards for Cortex-A9.
Add a avoidWriteAfterWrite() target hook to identify register classes that
suffer from write-after-write hazards. For those register classes, try to avoid
writing the same register in two consecutive instructions.
This is currently disabled by default. We should not spill to avoid hazards!
The command line flag -avoid-waw-hazard can be used to enable waw avoidance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129772
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 19 Apr 2011 18:11:38 +0000 (18:11 +0000)]
Some single-precision VFP instructions can execute in either the VPF or Neon
pipelines, at least on Cortex-A9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129771
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 19 Apr 2011 18:11:36 +0000 (18:11 +0000)]
Improvements for the Cortex-A9 scheduling itineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129770
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 19 Apr 2011 17:22:22 +0000 (17:22 +0000)]
Add support for FastISel'ing varargs calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129765
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Apr 2011 17:17:58 +0000 (17:17 +0000)]
Force the greedy register allocator to be linked alongside linear scan.
This means that the new register allocator can be used with 'clang -mllvm -regalloc=greedy'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129764
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 19 Apr 2011 17:01:08 +0000 (17:01 +0000)]
SelectBasicBlock is rather slow even when it doesn't do anything; skip the
unnecessary work where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129763
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Tue, 19 Apr 2011 16:16:58 +0000 (16:16 +0000)]
Support nested CALLSEQ_BEGIN/END; necessary for ARM byval support. <rdar://problem/
7662569>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129761
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 19 Apr 2011 15:23:29 +0000 (15:23 +0000)]
Trivial simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129759
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Apr 2011 06:14:45 +0000 (06:14 +0000)]
Tighten test case a bit.
Ideally, we would match an S-register to its containing D-register, but that
requires arithmetic (divide by 2).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129756
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Apr 2011 05:52:03 +0000 (05:52 +0000)]
Implement support for x86 fastisel of small fixed-sized memcpys, which are generated
en-mass for C++ PODs. On my c++ test file, this cuts the fast isel rejects by 10x
and shrinks the generated .s file by 5%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129755
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Apr 2011 05:15:59 +0000 (05:15 +0000)]
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129753
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Apr 2011 05:09:50 +0000 (05:09 +0000)]
Implement support for fast isel of calls of i1 arguments, even though they are illegal,
when they are a truncate from something else. This eliminates fully half of all the
fastisel rejections on a test c++ file I'm working with, which should make a substantial
improvement for -O0 compile of c++ code.
This fixed rdar://
9297003 - fast isel bails out on all functions taking bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129752
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Apr 2011 04:42:38 +0000 (04:42 +0000)]
Handle i1/i8/i16 constant integer arguments to calls by prepromoting them.
Before we would bail out on i1 arguments all together, now we just bail on
non-constant ones. Also, we used to emit extraneous code. e.g. test12 was:
movb $0, %al
movzbl %al, %edi
callq _test12
and test13 was:
movb $0, %al
xorl %edi, %edi
movb %al, 7(%rsp)
callq _test13f
Now we get:
movl $0, %edi
callq _test12
and:
movl $0, %edi
callq _test13f
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129751
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Apr 2011 04:26:32 +0000 (04:26 +0000)]
be layout aware, to produce:
testb $1, %al
je LBB0_2
## BB#1: ## %if.then
movb $0, %al
instead of:
testb $1, %al
jne LBB0_1
jmp LBB0_2
LBB0_1: ## %if.then
movb $0, %al
how 'bout that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129749
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Apr 2011 04:22:17 +0000 (04:22 +0000)]
fix rdar://
9297006 - fast isel bails out on trunc to i1 -> bools cry,
a common cause of fast isel rejects on c++ code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129748
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Apr 2011 01:21:49 +0000 (01:21 +0000)]
Change A9 scheduling itineraries VLD* / VST* entries default to "aligned". That
is, it assumes addresses are 64-bit aligned (which should be the more common
case). If the alignment is found not to be aligned, then getOperandLatency()
would adjust the operand latency computation by one to compensate for it.
rdar://
9294833
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129742
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Apr 2011 00:14:43 +0000 (00:14 +0000)]
Make tests register allocation independent again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129739
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Apr 2011 00:04:03 +0000 (00:04 +0000)]
Do not lose mem_operands while lowering VLD / VST intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129738
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 19 Apr 2011 00:03:17 +0000 (00:03 +0000)]
Disable warning C4181: "qualifier applied to reference type; ignored"
This was causing a flooding of warnings with MSVC 2008. This warning was removed in MSVC 2010.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129737
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 18 Apr 2011 23:59:50 +0000 (23:59 +0000)]
docs: Use <Hn> as Heading elements instead of <DIV class="doc_foo">.
H1 ... doc_title
H2 ... doc_section
H3 ... doc_subsection
H4 ... doc_subsubsection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129736
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 18 Apr 2011 23:51:03 +0000 (23:51 +0000)]
Use ArrayRef variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129735
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 18 Apr 2011 22:44:46 +0000 (22:44 +0000)]
Add BumpPtrAllocator::getTotalMemory() to allow clients to query how much memory a BumpPtrAllocator allocated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129727
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 18 Apr 2011 22:27:20 +0000 (22:27 +0000)]
Remove test to check line numbers. There are other numerous tests in our test harness to check line number information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129725
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 18 Apr 2011 21:35:54 +0000 (21:35 +0000)]
Trim a few unneeded includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129723
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 18 Apr 2011 21:28:11 +0000 (21:28 +0000)]
Invert the meaning of printAliasInstr's return value. It now returns
true on success and false on failure. Update callers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129722
91177308-0d34-0410-b5e6-
96231b3b80d8