Evan Cheng
0a35c35153
Silence a compiler warning.
...
llvm-svn: 55087
2008-08-20 23:36:48 +00:00
Evan Cheng
c55f07023a
First cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst.
...
llvm-svn: 55085
2008-08-20 22:45:34 +00:00
Chris Lattner
7a310366a6
Add a new ConstantExpr::getWithOperands that takes any array of operands
...
instead of requiring an std::vector.
llvm-svn: 55084
2008-08-20 22:27:40 +00:00
Dan Gohman
d79f723519
Remove an obsolete todo comment.
...
llvm-svn: 55080
2008-08-20 21:47:28 +00:00
Dan Gohman
74bfad70e1
Factor the code for determining the target-specific instruction
...
namespace out of the isel emitters and into common code.
llvm-svn: 55079
2008-08-20 21:45:57 +00:00
Dan Gohman
411cc551cb
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.
llvm-svn: 55078
2008-08-20 21:27:32 +00:00
Dan Gohman
50af19179b
Simplify the BuildMI calls even more.
...
llvm-svn: 55077
2008-08-20 21:10:53 +00:00
Dan Gohman
ddebe95287
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.
llvm-svn: 55076
2008-08-20 21:05:57 +00:00
Dan Gohman
d8324c4066
Dump the instruction that foiled ISel even when -debug is not used.
...
llvm-svn: 55075
2008-08-20 20:47:32 +00:00
Bill Wendling
42a2073ed4
Don't hoist instructions that define a physical register.
...
llvm-svn: 55074
2008-08-20 20:32:05 +00:00
Dan Gohman
96efa9606f
Make more use of the BuildMI API.
...
llvm-svn: 55072
2008-08-20 18:16:32 +00:00
Dan Gohman
3606d17592
Minor code reorganization.
...
llvm-svn: 55071
2008-08-20 18:10:48 +00:00
Dan Gohman
44da988220
Minor whitespace cleanup.
...
llvm-svn: 55070
2008-08-20 18:09:38 +00:00
Dan Gohman
9e5e42e0d5
Fix 80 column violation.
...
llvm-svn: 55069
2008-08-20 18:09:02 +00:00
Evan Cheng
5ff34fa3b4
Kill off SimpleBBISel, it's replaced by FastISel.
...
llvm-svn: 55067
2008-08-20 17:50:32 +00:00
Chris Lattner
c9fdd97035
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.
llvm-svn: 55063
2008-08-20 17:02:31 +00:00
Dan Gohman
00ddda96c9
Disable DAGCombine's alignment inference in "fast" codegen mode.
...
llvm-svn: 55059
2008-08-20 16:30:28 +00:00
Dan Gohman
e1a5bc775e
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.
llvm-svn: 55058
2008-08-20 15:58:01 +00:00
Dan Gohman
2b904916b2
Clean up a dead return missed in r55055.
...
llvm-svn: 55057
2008-08-20 15:54:46 +00:00
Dan Gohman
ebba07cccf
Tablegen generated code already tests the opcode value, so it's not
...
necessary to use dyn_cast in these predicates.
llvm-svn: 55055
2008-08-20 15:24:22 +00:00
Dan Gohman
22c225c022
Use BitVector instead of std::vector<unsigned char>.
...
llvm-svn: 55054
2008-08-20 14:58:41 +00:00
Dan Gohman
9a43334166
It's not necessary to check if a value is null before delete[].
...
llvm-svn: 55053
2008-08-20 14:55:37 +00:00
Dan Gohman
a5921219e5
Use cast instead of dyn_cast.
...
llvm-svn: 55052
2008-08-20 14:50:24 +00:00
Dan Gohman
7f2b41c9e2
Avoid an empty-if-body warning in release builds.
...
llvm-svn: 55050
2008-08-20 14:00:56 +00:00
Dan Gohman
2555c4a2ca
Fix indentation.
...
llvm-svn: 55049
2008-08-20 13:50:12 +00:00
Dan Gohman
e409b06d46
Fix comment spacing.
...
llvm-svn: 55047
2008-08-20 13:46:21 +00:00
Mon P Wang
e5aefd3967
Fixed shuffle optimizations to handle non power of 2 vectors
...
llvm-svn: 55035
2008-08-20 02:23:25 +00:00
Dan Gohman
ed5e30b819
Fix the string for MVT::isVoid.
...
llvm-svn: 55034
2008-08-20 01:44:30 +00:00
Dan Gohman
d0da06c817
Fix FastISel to recognize that the last block in the function does
...
not have a fall-through successor.
llvm-svn: 55033
2008-08-20 01:17:01 +00:00
Dan Gohman
472f4b49b6
Fix a leak in the FastISel code that Chris pointed out.
...
llvm-svn: 55031
2008-08-20 00:56:17 +00:00
Dan Gohman
bb28e0fc6d
Add a -march line for this test, and run it on x86-64 too for fun.
...
llvm-svn: 55030
2008-08-20 00:56:07 +00:00
Dale Johannesen
69c9d47dce
Add remaining 64-bit atomic patterns for x86-64.
...
llvm-svn: 55029
2008-08-20 00:48:50 +00:00
Dan Gohman
023bedddc4
Add support for running SelectionDAG if FastISel fails. This is under
...
a command-line option, so that the default behavior is an abort, which
is useful for exposing code that isn't supported yet.
llvm-svn: 55028
2008-08-20 00:47:54 +00:00
Dan Gohman
f298c31918
Fix FastISel to recognize unhandled operands, such as constants
...
that aren't available as virtual registers (for now).
llvm-svn: 55026
2008-08-20 00:35:17 +00:00
Chris Lattner
63d8801e51
ll printer prints each zeroinit on the same line now, update regex
...
llvm-svn: 55025
2008-08-20 00:33:57 +00:00
Bill Wendling
ab390189dc
Revert r55018 and apply the correct "fix" for the 64-bit sub_and_fetch atomic.
...
Just expand it like the other X-bit sub_and_fetches.
llvm-svn: 55023
2008-08-20 00:28:16 +00:00
Evan Cheng
4fa90a1d3e
Get rid of a couple of dynamic_cast.
...
llvm-svn: 55022
2008-08-20 00:28:12 +00:00
Dan Gohman
455abe7436
Add FastISel support for floating-point operations.
...
llvm-svn: 55021
2008-08-20 00:23:20 +00:00
Dan Gohman
ce636764de
Add FastISel support for several more binary operators.
...
llvm-svn: 55020
2008-08-20 00:11:48 +00:00
Bill Wendling
ab7c8c091e
Add support for the __sync_sub_and_fetch atomics and friends for X86. The code
...
was already present, but not hooked up to anything.
llvm-svn: 55018
2008-08-19 23:09:18 +00:00
Dan Gohman
d5c84e8061
Fast-isel is now *minimally* functional. Add a testcase to
...
demonstrate the extent of its capabilities. Note that it
only attempts to operate on one of the blocks in this
testcase.
llvm-svn: 55016
2008-08-19 22:37:59 +00:00
Dan Gohman
1b18b91296
Add code to call FastISel, and a command-line option to enable it.
...
llvm-svn: 55015
2008-08-19 22:33:34 +00:00
Dan Gohman
25efe2087b
Support unconditional fall-through branches in FastISel.
...
llvm-svn: 55014
2008-08-19 22:31:46 +00:00
Owen Anderson
5325218d4b
Allow the fast-path spilling code to attempt folding, but still leaving out remat and splitting.
...
llvm-svn: 55012
2008-08-19 22:12:11 +00:00
Dan Gohman
b1ba73eeed
Instantiate FastISel for X86.
...
llvm-svn: 55011
2008-08-19 21:45:35 +00:00
Dan Gohman
36e732b8fc
The X86 target will soon have an implementation of createFastISel.
...
llvm-svn: 55010
2008-08-19 21:32:53 +00:00
Dan Gohman
08c860eb56
Add a TargetLowering hook for creating a FastISel object.
...
llvm-svn: 55009
2008-08-19 21:26:29 +00:00
Dan Gohman
ebba5dd8be
For now, restrict FastISel to instructions that only involve one
...
register class.
llvm-svn: 55008
2008-08-19 20:58:14 +00:00
Dan Gohman
69eb9fb38e
Factor out the code to scan an instruction's operands into a
...
helper function.
llvm-svn: 55007
2008-08-19 20:56:30 +00:00
Dan Gohman
7a23fc0fb0
Use the BuildMI overload that sets up a destination register
...
instead of the one that doesn't and then adding it manually.
llvm-svn: 55006
2008-08-19 20:46:54 +00:00