Commit Graph

37173 Commits

Author SHA1 Message Date
Evan Cheng
5c80760fdf Refactor inline asm constraint matching code out of SDIsel into TargetLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47587 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 02:33:44 +00:00
Devang Patel
9a8a88b72d Remove debugging help.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47585 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 01:42:38 +00:00
Nick Kledzik
55998ba767 test svn commit capability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47584 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 01:36:52 +00:00
Devang Patel
d9d99ff8e8 Update bitcode reader and writer to handle multiple return values.
Take 2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47583 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 01:29:32 +00:00
Devang Patel
aaeb60ae40 Pass const vectors by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47577 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 00:12:13 +00:00
Eli Friedman
faa999565f Add missing include (for ptrdiff_t).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47576 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 23:35:32 +00:00
Dan Gohman
545914311a Revert the assert for MUL_LOHI with an unused high result; Chris
pointed out that this isn't correct at -O0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47575 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 22:43:48 +00:00
Andrew Lenharth
a7b33db5e9 when making bytecode modules, link as library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47574 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 22:41:55 +00:00
Dale Johannesen
14e2ea9a55 Revise previous patch per review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47573 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 22:29:22 +00:00
Dan Gohman
437d452adb Factor the assert for indexed loads/stores out of LoadSDNode
and StoreSDNode into LSBaseSDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47570 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 22:16:29 +00:00
Dan Gohman
c2d9b5fcdf Add an assert to verify that we don't see an
{S,U}MUL_LOHI with an unused high value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47569 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 22:15:55 +00:00
Dan Gohman
fcf81db600 Remove the hack that turned an {S,U}MUL_LOHI with an unused high
result into a MUL late in the X86 codegen process. ISD::MUL is
once again Legal on X86, so this is no longer needed. And, the
hack was suboptimal; see PR1874 for details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 21:57:04 +00:00
Dan Gohman
f6283fd27b Make some static variables const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47566 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 21:39:34 +00:00
Chris Lattner
f8d8b2b53a add an assertion to catch a null PATypeHolder, patch by Erick Tryzelaar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47563 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 21:28:46 +00:00
Dan Gohman
2e68b6f52d Convert MaskedValueIsZero and all its users to use APInt. Also add
a SignBitIsZero function to simplify a common use case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 21:11:39 +00:00
Chris Lattner
63602b8a69 add LSBaseSDNode::getOffset at Dan's request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 19:31:21 +00:00
Evan Cheng
e83a27516c All remat'ed loads cannot be folded into two-address code. Not just argument loads. This change doesn't really have any impact on codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47557 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 19:24:01 +00:00
Chris Lattner
6110224fa6 prune #includes, fit in 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47556 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 19:21:38 +00:00
Chris Lattner
5f27ba1197 make this self contained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47555 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 19:20:57 +00:00
Dale Johannesen
079f2a66ae Expand removal of MMX memory copies to allow 1 level
of TokenFactor underneath chain (seems to be enough)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47554 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 19:20:14 +00:00
Dan Gohman
4fc3d5dac2 Add a new method to SDNode/SDOperand named getValueSizeInBits
that combines getValueType and MVT::getSizeInBits, since this
occurrs frequently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47552 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 19:08:02 +00:00
Duncan Sands
1a9c9df1db In debug builds check that the key property holds: all
result and operand types are legal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47546 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 16:21:21 +00:00
Evan Cheng
79a0c1e46c Correctly determine whether a argument load can be folded into its uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47545 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 08:50:41 +00:00
Owen Anderson
c0808a7e1d Fix an issue where GVN was performing the return slot optimization when it was
not safe.  This is fixed by more aggressively checking that the return slot is
not used elsewhere in the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47544 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 04:08:09 +00:00
Evan Cheng
b9a905781e Temporarily reverting 46959.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 03:57:32 +00:00
Owen Anderson
0f7ea1ab10 Fix an issue where GVN would try to use an instruction before its definition when performing return slot optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47541 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 00:40:41 +00:00
Duncan Sands
14fd63cae8 Add support to LegalizeTypes for building legal vectors
out of illegal elements (BUILD_VECTOR).  Uses and beefs
up BUILD_PAIR, though it didn't really have to.  Like
most of LegalizeTypes, does not support soft-float.
This cures all "make check" vector building failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47537 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-24 07:36:03 +00:00
Bill Wendling
181eb737b2 Some platforms use the same name for 32-bit and 64-bit registers (like
%r3 on PPC) in their ASM files. However, it's hard for humans to read
during debugging. Adding a new field to the register data that lets you
specify a different name to be printed than the one that goes into the
ASM file -- %x3 instead of %r3, for instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47534 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-24 00:56:13 +00:00
Evan Cheng
1df439773c Backing out r47521 for now. This has broken a number of tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47533 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 19:32:32 +00:00
Scott Michel
a59d469e9b Merge current work back to tree to minimize diffs and drift. Major highlights
for CellSPU modifications:

- SPUInstrInfo.td refactoring: "multiclass" really is _your_ friend.
- Other improvements based on refactoring effort in SPUISelLowering.cpp,
  esp. in SPUISelLowering::PerformDAGCombine(), where zero amount shifts and
  rotates are now eliminiated, other scalar-to-vector-to-scalar silliness
  is also eliminated.
- 64-bit operations are being implemented, _muldi3.c gcc runtime now
  compiles and generates the right code. More work still needs to be done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47532 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 18:41:37 +00:00
Zhou Sheng
f65a0f7860 Testcase for Revision 47478.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47531 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 10:59:51 +00:00
Evan Cheng
249ded3fa8 Rematerialization logic was overly conservative when it comes to loads from fixed stack slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47529 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 03:38:34 +00:00
Evan Cheng
aaa1d4265e Update test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47527 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 02:57:25 +00:00
Evan Cheng
298bbe82cb If remating a machine instr with virtual register operand, make sure the vr is avaliable at all uses regardless of whether it would be folded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 02:14:42 +00:00
Evan Cheng
18924f11c1 Remat of pic loads are now on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47525 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 02:08:30 +00:00
Evan Cheng
c19eca38ef Turning on remat of pic loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 02:07:42 +00:00
Dan Gohman
61e015fe74 Fix a bug that caused opt and other tools to silently ignore
invalid command-line options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47523 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 01:55:25 +00:00
Evan Cheng
b2a0abce1e No need recognize load from a fixed argument slot as re-materializable. LiveIntervalAnalysis already handles it as a special case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47522 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 01:47:44 +00:00
Devang Patel
e9fabd94ab Properly read and write bitcodes for multiple return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47521 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 01:44:55 +00:00
Evan Cheng
dd3465eed1 Recognize loads of arguments as re-materializable first. Therefore if isReallyTriviallyReMaterializable() returns true it doesn't confuse it as a "normal" re-materializable instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47520 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 01:44:27 +00:00
Devang Patel
2007173203 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47519 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 01:17:37 +00:00
Devang Patel
155b8746ba Use isa check instead of getTypeID() check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47518 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 01:17:17 +00:00
Ted Kremenek
57daefa187 Fixed buffer overflow reported by Argiris Kirtzidis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47517 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 01:11:40 +00:00
Devang Patel
4d4a5e0bd2 Remove unnecessary "inline" keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47516 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 01:11:02 +00:00
Devang Patel
377e04b926 print getresult operand and its type directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47514 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 01:04:26 +00:00
Evan Cheng
28c9fc630c Really. Why doesn't every arch support MMX?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 00:56:14 +00:00
Devang Patel
d7313c5608 Use dyn_cast instead of isa + cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47511 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 00:47:00 +00:00
Evan Cheng
0cc83b6e85 Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47510 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 00:46:11 +00:00
Devang Patel
6bfc63bef9 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47509 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 00:38:56 +00:00
Devang Patel
57ef4f46c1 To support multiple return values, now ret instruction supports multiple operands instead of one aggregate operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47508 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23 00:35:18 +00:00