Commit Graph

24365 Commits

Author SHA1 Message Date
Owen Anderson 9371964f47 Use raw_ostream throughout the AsmPrinter.
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Chris Lattner 0bed49ccd7 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

llvm-svn: 55090
2008-08-21 00:11:50 +00:00
Dan Gohman 6a0780cdd7 Fix unused variable warnings.
llvm-svn: 55089
2008-08-20 23:53:10 +00:00
Evan Cheng f5a7e51c81 Silence a compiler warning.
llvm-svn: 55087
2008-08-20 23:36:48 +00:00
Evan Cheng 864fcc198d First cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst.
llvm-svn: 55085
2008-08-20 22:45:34 +00:00
Chris Lattner b078e28338 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 814f291664 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 a4305cec93 Simplify the BuildMI calls even more.
llvm-svn: 55077
2008-08-20 21:10:53 +00:00
Dan Gohman 02c84b8910 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 43d1c7c607 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 cd01e89852 Don't hoist instructions that define a physical register.
llvm-svn: 55074
2008-08-20 20:32:05 +00:00
Dan Gohman 07a34a5f69 Make more use of the BuildMI API.
llvm-svn: 55072
2008-08-20 18:16:32 +00:00
Dan Gohman 24e8f0cfe6 Minor code reorganization.
llvm-svn: 55071
2008-08-20 18:10:48 +00:00
Dan Gohman 2471f6ce0f Minor whitespace cleanup.
llvm-svn: 55070
2008-08-20 18:09:38 +00:00
Dan Gohman 39a5ffb03f Fix 80 column violation.
llvm-svn: 55069
2008-08-20 18:09:02 +00:00
Evan Cheng 7b9cd58596 Kill off SimpleBBISel, it's replaced by FastISel.
llvm-svn: 55067
2008-08-20 17:50:32 +00:00
Chris Lattner 1ac3e2545b 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 837c13a029 Disable DAGCombine's alignment inference in "fast" codegen mode.
llvm-svn: 55059
2008-08-20 16:30:28 +00:00
Dan Gohman 2da2bedc72 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 3ad7e96f8a Clean up a dead return missed in r55055.
llvm-svn: 55057
2008-08-20 15:54:46 +00:00
Dan Gohman 8823b0d245 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 f6aa60ff71 Use BitVector instead of std::vector<unsigned char>.
llvm-svn: 55054
2008-08-20 14:58:41 +00:00
Dan Gohman 0f23237b0c 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 c8f9da50ec Use cast instead of dyn_cast.
llvm-svn: 55052
2008-08-20 14:50:24 +00:00
Dan Gohman c63a46ef39 Avoid an empty-if-body warning in release builds.
llvm-svn: 55050
2008-08-20 14:00:56 +00:00
Dan Gohman 1ed0681284 Fix indentation.
llvm-svn: 55049
2008-08-20 13:50:12 +00:00
Dan Gohman a21bdda961 Fix comment spacing.
llvm-svn: 55047
2008-08-20 13:46:21 +00:00
Mon P Wang 1b2c061b73 Fixed shuffle optimizations to handle non power of 2 vectors
llvm-svn: 55035
2008-08-20 02:23:25 +00:00
Dan Gohman e8f9a00424 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 98265cae87 Fix a leak in the FastISel code that Chris pointed out.
llvm-svn: 55031
2008-08-20 00:56:17 +00:00
Dale Johannesen 6f765f392c Add remaining 64-bit atomic patterns for x86-64.
llvm-svn: 55029
2008-08-20 00:48:50 +00:00
Dan Gohman 847ebb90b8 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 f6884373c2 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
Bill Wendling f00f3055d8 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 d5834e90dc Get rid of a couple of dynamic_cast.
llvm-svn: 55022
2008-08-20 00:28:12 +00:00
Dan Gohman b16a7783c5 Add FastISel support for floating-point operations.
llvm-svn: 55021
2008-08-20 00:23:20 +00:00
Dan Gohman a3e4d5a5e1 Add FastISel support for several more binary operators.
llvm-svn: 55020
2008-08-20 00:11:48 +00:00
Bill Wendling e79740851f 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 697284fe0a 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 214343fbbe Support unconditional fall-through branches in FastISel.
llvm-svn: 55014
2008-08-19 22:31:46 +00:00
Owen Anderson 2a458775db 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 daef7f43af Instantiate FastISel for X86.
llvm-svn: 55011
2008-08-19 21:45:35 +00:00
Dan Gohman 4619e93bd3 The X86 target will soon have an implementation of createFastISel.
llvm-svn: 55010
2008-08-19 21:32:53 +00:00
Dan Gohman 547ce65467 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
Dan Gohman c55fdcc935 Handle the case where target-specific fastisel code doesn't have
a desired opcode.

llvm-svn: 55005
2008-08-19 20:43:22 +00:00
Owen Anderson c75ae13566 The fast-path still needs to set kill markers and spill/restore points as appropriate.
With this patch, all of MultiSource/Applications and all of SPEC2000/2006 pass with
the SimpleSpiller and this fast-path enabled.

llvm-svn: 55000
2008-08-19 20:09:52 +00:00
Dale Johannesen 5afbf510aa Add support for 8 and 16 bit forms of __sync
builtins on X86.

Change "lock" instructions to be on a separate line.
This is needed to work around a bug in the Darwin
assembler.

llvm-svn: 54999
2008-08-19 18:47:28 +00:00
Gordon Henriksen 1298fb90d3 Delete a dead field.
llvm-svn: 54995
2008-08-19 17:09:26 +00:00
Gordon Henriksen 72bd9dfdad [PR2327] Leverage TargetRegisterInfo to compute frame offsets for GC metadata.
llvm-svn: 54994
2008-08-19 17:06:35 +00:00
Nicolas Geoffray d58c8e759f Update the JIT exception writer to better mimic the codegen exception writer.
Also skip indirect encoding for platforms that ask for one: we direclty
write an address, not a pointer to the address.

llvm-svn: 54987
2008-08-19 14:48:14 +00:00