Dan Gohman [Sat, 23 Aug 2008 01:06:51 +0000 (01:06 +0000)]
Avoid creating shift-by-zero SDNodes in the common case of
i8* getelementptr. DAGCombine eliminates these, but this is
a fairly common case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55214
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 23 Aug 2008 00:50:30 +0000 (00:50 +0000)]
Move SelectionDAG's constructor out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55212
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 23 Aug 2008 00:42:16 +0000 (00:42 +0000)]
Add a clear() method to FoldingSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55210
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 22 Aug 2008 22:39:21 +0000 (22:39 +0000)]
Test all currently supported atomic builtins on x86-{32,64}.
These just test that they go through the BE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55208
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 22 Aug 2008 21:47:03 +0000 (21:47 +0000)]
Comprehensive test of FE handling of __sync builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55206
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Aug 2008 21:28:19 +0000 (21:28 +0000)]
Reapply r55191 and r55192.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55205
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 22 Aug 2008 21:27:49 +0000 (21:27 +0000)]
Make option variables static, so they won't cause nameclash
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55203
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 22 Aug 2008 20:51:05 +0000 (20:51 +0000)]
Reverting r55190, r55191, and r55192. They broke the build with this error message:
{standard input}:17:bad register name `%sil'
make[4]: *** [libgcc/./_addvsi3.o] Error 1
make[4]: *** Waiting for unfinished jobs....
{standard input}:23:bad register name `%dil'
{standard input}:28:bad register name `%dil'
make[4]: *** [libgcc/./_addvdi3.o] Error 1
{standard input}:18:bad register name `%sil'
make[4]: *** [libgcc/./_subvsi3.o] Error 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55200
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Aug 2008 19:26:10 +0000 (19:26 +0000)]
Fix the InsertBranch call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55192
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Aug 2008 19:21:41 +0000 (19:21 +0000)]
Support non-fallthrough unconditional branches in FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55191
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Aug 2008 19:19:31 +0000 (19:19 +0000)]
Anyext tweaks for x86. When extloading a value to i32 or i64, choose
instructions that define the full 32 or 64-bit value. When anyexting
from i8 to i16 or i32, it's not necessary to zero out the high
portion of the register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55190
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Aug 2008 18:26:07 +0000 (18:26 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55189
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Aug 2008 17:37:48 +0000 (17:37 +0000)]
Add FastISel support for PHINodes. Machine PHI nodes
are not yet updated properly, but that's a separate
task.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55187
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 22 Aug 2008 17:20:54 +0000 (17:20 +0000)]
Implement __sync_synchronize on ppc32. Patch by Gary Benson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55186
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Aug 2008 16:14:23 +0000 (16:14 +0000)]
Add an empty() member to FoldingSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55182
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Aug 2008 16:07:55 +0000 (16:07 +0000)]
Fix SmallVector's size calculation so that a size of 0 is
handled correctly, and change a few SmallVector uses to use
size 0 to more clearly reflect their intent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55181
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 22 Aug 2008 15:45:00 +0000 (15:45 +0000)]
improve support for systems that need unistd.h to get STDOUT_FILENO.
Patch contributed by Bjorn Reese!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55179
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Fri, 22 Aug 2008 08:44:47 +0000 (08:44 +0000)]
Also overload for char, since the "char" type depends on the host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55173
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Aug 2008 07:42:25 +0000 (07:42 +0000)]
Overload for both signed and unsigned char.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55171
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 22 Aug 2008 05:08:25 +0000 (05:08 +0000)]
consolidate DenseMapInfo implementations, and add one for std::pair.
Patch contributed by m-s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55167
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 22 Aug 2008 03:49:10 +0000 (03:49 +0000)]
Rewrite ppc code generated for __sync_{bool|val}_compare_and_swap
so that lwarx and stwcx are always executed the same number of times.
This is important for performance, I'm told.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55163
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Aug 2008 00:28:15 +0000 (00:28 +0000)]
Add a few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55157
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Aug 2008 00:20:26 +0000 (00:20 +0000)]
Factor out the predicate check code from DAGISelEmitter.cpp
and use it in FastISelEmitter.cpp, and make FastISel
subtarget aware. Among other things, this lets it work
properly on x86 targets that don't have SSE, where it
successfully selects x87 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55156
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 22 Aug 2008 00:04:26 +0000 (00:04 +0000)]
Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55154
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 21 Aug 2008 23:04:49 +0000 (23:04 +0000)]
Testcase for PR2585.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55151
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 21 Aug 2008 22:40:10 +0000 (22:40 +0000)]
Temporarily reverting r55137. This was causing the bootstrap to go into an
infinite loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55149
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 21 Aug 2008 22:39:33 +0000 (22:39 +0000)]
Fix write() when the string being written is larger than the buffer. This broke various ObjC testcases
with very long symbol names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55148
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 21 Aug 2008 22:36:36 +0000 (22:36 +0000)]
If part of the mask is "undef", then ignore it as we don't care what goes into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55147
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 21 Aug 2008 22:35:37 +0000 (22:35 +0000)]
Fix whitespace. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55146
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 22:34:25 +0000 (22:34 +0000)]
Add -mattr=sse2 so this test doesn't fail on non-x86 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55145
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 21 Aug 2008 21:26:06 +0000 (21:26 +0000)]
Make x86 and sse2 explicit for non-x86 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55141
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 21 Aug 2008 21:20:09 +0000 (21:20 +0000)]
Accept NOT of a constant vector of int.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55140
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 21 Aug 2008 21:00:15 +0000 (21:00 +0000)]
Fix a number of byval / memcpy / memset related codegen issues.
1. x86-64 byval alignment should be max of 8 and alignment of type. Previously the code was not doing what the commit message was saying.
2. Do not use byte repeat move and store operations. These are slow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55139
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 21 Aug 2008 20:58:52 +0000 (20:58 +0000)]
Move non-trivial methods out of line to avoid code-size bloat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55138
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 21 Aug 2008 20:45:12 +0000 (20:45 +0000)]
Fix ComputeMaskedBits to handle phis correctly. We need to take the
minimum of the known zeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55137
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 21 Aug 2008 19:54:16 +0000 (19:54 +0000)]
Treat floating point ST1 the same as ST0 when lowering for a call result
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55135
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 21 Aug 2008 19:51:25 +0000 (19:51 +0000)]
Remove unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55134
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 18:38:14 +0000 (18:38 +0000)]
Add libcalls for the new rounding opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55133
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 18:13:12 +0000 (18:13 +0000)]
Fix a typo that Dale noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55132
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 17:55:02 +0000 (17:55 +0000)]
Add libm-oriented ISD opcodes for rounding operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55130
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 17:37:05 +0000 (17:37 +0000)]
Have FastISel skip the multiply by 1 for getelementptr on i8*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55129
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 21 Aug 2008 17:33:01 +0000 (17:33 +0000)]
Allow inline asm nodes with empty bodies inside JIT.
This unbreaks explicit reg vars inside JIT, which are
implemented in such hacky way :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55128
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Aug 2008 17:31:45 +0000 (17:31 +0000)]
Switch from an O(n) method to an O(1) method for changing non-constant
operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55127
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 17:28:42 +0000 (17:28 +0000)]
getelementptr doesn't work on x86-64 yet, because it
has MOV64ri32 and no plain MOV64ri.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55126
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 17:25:26 +0000 (17:25 +0000)]
MVT::getMVT uses iPTR for pointer types, while we need the actual
intptr_t type in this case. FastISel can now select simple
getelementptr instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55125
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 16:36:34 +0000 (16:36 +0000)]
Simplify SelectRoot's interface, and factor out some common code
from all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55124
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 16:24:54 +0000 (16:24 +0000)]
Elements in DeadNodeSet are checked for use_empty() before they
are actually deleted, so it's not necessary to remove re-used
nodes from the set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55123
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 16:06:51 +0000 (16:06 +0000)]
SelectionDAGISel::SelectRootInit does not need to be virtual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55122
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 16:02:46 +0000 (16:02 +0000)]
Make HandleSDNode::getValue return an SDValue instead of
the full SDUse, which isn't needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55121
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 15:33:45 +0000 (15:33 +0000)]
Don't silently ignore errors when opening output streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55120
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 21 Aug 2008 08:38:54 +0000 (08:38 +0000)]
Clean up whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55117
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Aug 2008 06:41:07 +0000 (06:41 +0000)]
remove redundant include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55116
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Aug 2008 06:25:28 +0000 (06:25 +0000)]
Fix the build with gcc 4.3 as the host, patch by Zhongxing Xu!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55115
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 21 Aug 2008 06:20:47 +0000 (06:20 +0000)]
Implement operator<< in terms of basic types rather than [u]int*_t, which is better for portability. There might be some way to factor this all with metaprogramming magic, but I'm not sure how offhand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55114
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 21 Aug 2008 05:56:10 +0000 (05:56 +0000)]
Revert r54876 r54877 r54906 and r54907. Evan found that these caused a 20%
slowdown in bzip2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55113
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Aug 2008 05:51:43 +0000 (05:51 +0000)]
unbreak the CBE on treeadd an many others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55112
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 21 Aug 2008 05:36:03 +0000 (05:36 +0000)]
Fix build on GCC 4.3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55110
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 21 Aug 2008 04:28:31 +0000 (04:28 +0000)]
Remove size_t operator; this unbreaks the build on Linux. Committing on
the suggestion of resistor.
If this breaks some other platform, please go ahead and back this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55106
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Aug 2008 02:34:16 +0000 (02:34 +0000)]
recommit bcreader, handling packed structs correctly. Apparently
people want fast *and* correct. Sheesh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55102
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 21 Aug 2008 01:54:58 +0000 (01:54 +0000)]
Revert 55090, regressions in:
- Postgres
- llvm-test/SingleSource/UnitTests/{2006-01-23-InitializedBitField,
2004-11-28-GlobalBoolLayout, 2003-05-02-DependentPHI}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55100
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 01:41:07 +0000 (01:41 +0000)]
Basic fast-isel support for instructions with constant int operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55099
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 21 Aug 2008 01:19:11 +0000 (01:19 +0000)]
Type of first GEP operand is always the same as the target pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55097
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 00:35:26 +0000 (00:35 +0000)]
Remove the code that limited FastISel to certain fixed signatures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55096
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 00:19:43 +0000 (00:19 +0000)]
Improve the doxygen comment for SelectInstructions::SelectInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55094
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Aug 2008 00:19:05 +0000 (00:19 +0000)]
Begin making more use of the FastISelEmitter class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55093
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 21 Aug 2008 00:14:44 +0000 (00:14 +0000)]
Use raw_ostream throughout the AsmPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55092
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 21 Aug 2008 00:11:50 +0000 (00:11 +0000)]
Fix an N^2 issue handling constant resolution due to RAUW in large arrays
this speeds up the bcreader from 6.67s to 0.12s on a testcase Daniel
provided. rdar://
6158117
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55090
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 23:53:10 +0000 (23:53 +0000)]
Fix unused variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55089
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 20 Aug 2008 23:36:48 +0000 (23:36 +0000)]
Silence a compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55087
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 20 Aug 2008 22:45:34 +0000 (22:45 +0000)]
First cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55085
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 20 Aug 2008 22:27:40 +0000 (22:27 +0000)]
Add a new ConstantExpr::getWithOperands that takes any array of operands
instead of requiring an std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55084
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 21:47:28 +0000 (21:47 +0000)]
Remove an obsolete todo comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55080
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 21:45:57 +0000 (21:45 +0000)]
Factor the code for determining the target-specific instruction
namespace out of the isel emitters and into common code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55079
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 21:27:32 +0000 (21:27 +0000)]
Move the handling of ANY_EXTEND, SIGN_EXTEND_INREG, and TRUNCATE
out of X86ISelDAGToDAG.cpp C++ code and into tablegen code.
Among other things, using tablegen for these things makes them
friendlier to FastISel.
Tablegen can handle the case of i8 subregs on x86-32, but currently
the C++ code for that case uses MVT::Flag in a tricky way, and it
happens to schedule better in some cases. So for now, leave the
C++ code in place to handle the i8 case on x86-32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55078
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 21:10:53 +0000 (21:10 +0000)]
Simplify the BuildMI calls even more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55077
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 21:05:57 +0000 (21:05 +0000)]
Simplify FastISel's constructor argument list, make the FastISel
class hold a MachineRegisterInfo member, and make the
MachineBasicBlock be passed in to SelectInstructions rather
than the FastISel constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55076
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 20:47:32 +0000 (20:47 +0000)]
Dump the instruction that foiled ISel even when -debug is not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55075
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Aug 2008 20:32:05 +0000 (20:32 +0000)]
Don't hoist instructions that define a physical register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55074
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 18:16:32 +0000 (18:16 +0000)]
Make more use of the BuildMI API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55072
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 18:10:48 +0000 (18:10 +0000)]
Minor code reorganization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55071
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 18:09:38 +0000 (18:09 +0000)]
Minor whitespace cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55070
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 18:09:02 +0000 (18:09 +0000)]
Fix 80 column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55069
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 20 Aug 2008 17:50:32 +0000 (17:50 +0000)]
Kill off SimpleBBISel, it's replaced by FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55067
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 20 Aug 2008 17:02:31 +0000 (17:02 +0000)]
Move the fast-path (<=i64) cases of various APInt methods inline
and the slow-path cases out of line. This speeds up instcombine
a bit in real world cases. Patch contributed by m-s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55063
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 16:30:28 +0000 (16:30 +0000)]
Disable DAGCombine's alignment inference in "fast" codegen mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55059
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 15:58:01 +0000 (15:58 +0000)]
Change the FoldingSetNodeID usage for objects which carry
alignment and volatility information, such as loads and
stores, to reduce the number of integer values added to
the FoldingSetNodeID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55058
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 15:54:46 +0000 (15:54 +0000)]
Clean up a dead return missed in r55055.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55057
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 15:24:22 +0000 (15:24 +0000)]
Tablegen generated code already tests the opcode value, so it's not
necessary to use dyn_cast in these predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55055
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 14:58:41 +0000 (14:58 +0000)]
Use BitVector instead of std::vector<unsigned char>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55054
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 14:55:37 +0000 (14:55 +0000)]
It's not necessary to check if a value is null before delete[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55053
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 14:50:24 +0000 (14:50 +0000)]
Use cast instead of dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55052
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 14:00:56 +0000 (14:00 +0000)]
Avoid an empty-if-body warning in release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55050
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 13:50:12 +0000 (13:50 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55049
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 13:46:21 +0000 (13:46 +0000)]
Fix comment spacing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55047
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Wed, 20 Aug 2008 02:23:25 +0000 (02:23 +0000)]
Fixed shuffle optimizations to handle non power of 2 vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55035
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 01:44:30 +0000 (01:44 +0000)]
Fix the string for MVT::isVoid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55034
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 01:17:01 +0000 (01:17 +0000)]
Fix FastISel to recognize that the last block in the function does
not have a fall-through successor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55033
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 00:56:17 +0000 (00:56 +0000)]
Fix a leak in the FastISel code that Chris pointed out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55031
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Aug 2008 00:56:07 +0000 (00:56 +0000)]
Add a -march line for this test, and run it on x86-64 too for fun.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55030
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 20 Aug 2008 00:48:50 +0000 (00:48 +0000)]
Add remaining 64-bit atomic patterns for x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55029
91177308-0d34-0410-b5e6-
96231b3b80d8