Commit Graph

40898 Commits

Author SHA1 Message Date
Bill Wendling
fb018d0433 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
2008-08-20 20:32:05 +00:00
Dan Gohman
cb34cd7b5e Make more use of the BuildMI API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55072 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 18:16:32 +00:00
Dan Gohman
4cbe0662ab Minor code reorganization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55071 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 18:10:48 +00:00
Dan Gohman
77ad79689d Minor whitespace cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55070 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 18:09:38 +00:00
Dan Gohman
b7864a9e23 Fix 80 column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55069 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 18:09:02 +00:00
Evan Cheng
d420789301 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
2008-08-20 17:50:32 +00:00
Chris Lattner
98f8ccfad0 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
2008-08-20 17:02:31 +00:00
Dan Gohman
a267651b7e 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
2008-08-20 16:30:28 +00:00
Dan Gohman
b8d2f550b8 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
2008-08-20 15:58:01 +00:00
Dan Gohman
cb0fe7c226 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
2008-08-20 15:54:46 +00:00
Dan Gohman
67ca6be16a 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
2008-08-20 15:24:22 +00:00
Dan Gohman
c53ec49885 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
2008-08-20 14:58:41 +00:00
Dan Gohman
eace52f12d 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
2008-08-20 14:55:37 +00:00
Dan Gohman
d8ed2a7184 Use cast instead of dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55052 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 14:50:24 +00:00
Dan Gohman
7a30bc4e7c 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
2008-08-20 14:00:56 +00:00
Dan Gohman
08293f6b6c Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55049 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 13:50:12 +00:00
Dan Gohman
1e684cf1ef Fix comment spacing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55047 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 13:46:21 +00:00
Mon P Wang
4f5ca2cf80 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
2008-08-20 02:23:25 +00:00
Dan Gohman
ba6783ec8c Fix the string for MVT::isVoid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55034 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 01:44:30 +00:00
Dan Gohman
e6798b757a 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
2008-08-20 01:17:01 +00:00
Dan Gohman
cc8430f742 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
2008-08-20 00:56:17 +00:00
Dan Gohman
5c6aea9714 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
2008-08-20 00:56:07 +00:00
Dale Johannesen
a99e38495f 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
2008-08-20 00:48:50 +00:00
Dan Gohman
3e697cfa97 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55028 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:47:54 +00:00
Dan Gohman
a7f2dff98e Fix FastISel to recognize unhandled operands, such as constants
that aren't available as virtual registers (for now).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55026 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:35:17 +00:00
Chris Lattner
80b7bc865a ll printer prints each zeroinit on the same line now, update regex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:33:57 +00:00
Bill Wendling
5bf1b4eacd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55023 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:28:16 +00:00
Evan Cheng
a044dfcb5a Get rid of a couple of dynamic_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55022 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:28:12 +00:00
Dan Gohman
8014e86580 Add FastISel support for floating-point operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55021 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:23:20 +00:00
Dan Gohman
bdedd44773 Add FastISel support for several more binary operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55020 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 00:11:48 +00:00
Bill Wendling
108ecf3975 Add support for the __sync_sub_and_fetch atomics and friends for X86. The code
was already present, but not hooked up to anything.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55018 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 23:09:18 +00:00
Dan Gohman
d3aedf445c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55016 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 22:37:59 +00:00
Dan Gohman
78eca170e9 Add code to call FastISel, and a command-line option to enable it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55015 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 22:33:34 +00:00
Dan Gohman
6f2766d597 Support unconditional fall-through branches in FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55014 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 22:31:46 +00:00
Owen Anderson
a41e47afc1 Allow the fast-path spilling code to attempt folding, but still leaving out remat and splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55012 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 22:12:11 +00:00
Dan Gohman
1adf1b03af Instantiate FastISel for X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55011 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 21:45:35 +00:00
Dan Gohman
d9f3c480a7 The X86 target will soon have an implementation of createFastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55010 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 21:32:53 +00:00
Dan Gohman
d4641a254c Add a TargetLowering hook for creating a FastISel object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55009 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 21:26:29 +00:00
Dan Gohman
cf711aa5b6 For now, restrict FastISel to instructions that only involve one
register class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55008 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 20:58:14 +00:00
Dan Gohman
d1d2ee8ccb Factor out the code to scan an instruction's operands into a
helper function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55007 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 20:56:30 +00:00
Dan Gohman
8133a52eb5 Use the BuildMI overload that sets up a destination register
instead of the one that doesn't and then adding it manually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 20:46:54 +00:00
Dan Gohman
32155acb8a Handle the case where target-specific fastisel code doesn't have
a desired opcode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55005 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 20:43:22 +00:00
Dan Gohman
379cad44ec Add more comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55004 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 20:36:33 +00:00
Dan Gohman
56e0f87dcc Fix indentation in FastISel tablegen-emitted code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55003 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 20:31:38 +00:00
Dan Gohman
f4137b5f40 Add more checking to filter out more kinds of things that
FastISel doesn't support yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55002 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 20:30:54 +00:00
Chris Lattner
d0743982e6 remove reference to really really old tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55001 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 20:17:48 +00:00
Owen Anderson
712c9f0690 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 20:09:52 +00:00
Dale Johannesen
140be2dfb7 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54999 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 18:47:28 +00:00
Dan Gohman
567263462f 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54998 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 18:07:49 +00:00
Dan Gohman
04b7dfb233 Add a few doxygen comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54997 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-19 18:06:12 +00:00