Commit Graph

37796 Commits

Author SHA1 Message Date
Duncan Sands
276dcbdc8d Introduce a new node for holding call argument
flags.  This is needed by the new legalize types
infrastructure which wants to expand the 64 bit
constants previously used to hold the flags on
32 bit machines.  There are two functional changes:
(1) in LowerArguments, if a parameter has the zext
attribute set then that is marked in the flags;
before it was being ignored; (2) PPC had some bogus
code for handling two word arguments when using the
ELF 32 ABI, which was hard to convert because of
the bogusness.  As suggested by the original author
(Nicolas Geoffray), I've disabled it for the moment.
Tested with "make check" and the Ada ACATS testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48640 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 09:14:45 +00:00
Duncan Sands
1d57a752a2 Fix the build for gcc-4.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48639 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 08:32:17 +00:00
Chris Lattner
920c37afc5 remove Evan's "ugly hack" that sorta attempted to get
x86-64 return conventions correct, but was never enabled.
We can now do the "right thing" with multiple return values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48635 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 06:50:21 +00:00
Chris Lattner
24e0a546b4 Add support for calls that return two FP values in
ST(0)/ST(1).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48634 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 06:38:26 +00:00
Chris Lattner
ae60ddc22a disable a bogus assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48633 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 06:01:05 +00:00
Chris Lattner
0353526ed1 Enable support for returning two long-double values in ST(0)/ST(1).
This allows us to compile fp-stack-2results.ll into:

_test:
	fldz
	fld1
	ret

which returns 1 in ST(0) and 0 in ST(1).  This is needed for x86-64
_Complex long double.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 05:57:20 +00:00
Chris Lattner
41dc0fcb68 Teach masked value is zero about add and sub, and use MVIZ to
simplify things like (X & 4) >> 1 == 2  --> (X & 4) == 4.

since it is obvious that the shift doesn't remove any bits.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48631 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 05:19:58 +00:00
Evan Cheng
fa5a91a71e Undo 48570. Correctly match mmx shift instructions with an immediate operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48627 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 00:40:09 +00:00
Gabor Greif
2197b8092c ignore the Output/ directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 00:10:42 +00:00
Gabor Greif
490e69f03c this directory is accidentally added
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 00:03:49 +00:00
Devang Patel
9f83512ce8 These passes preserve CFG.
This patch fixes Benchmarks/Trimaran/enc-pc1/enc-pc1 failure reported by Grawp-PIC i386 nightly tester


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48623 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 23:27:18 +00:00
Devang Patel
488b678a49 Incorporate feedback.
- Fix loop nest.
- Use RetVals.size()
- Check for null return value.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48605 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 18:30:32 +00:00
Gordon Henriksen
69cf031ee3 C and Objective Caml bindings for mem2reg and reg2mem.
Patch by Erick Tryzelaar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48602 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 17:16:03 +00:00
Andrew Lenharth
52d34d94c8 enable -analyze for andersens
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48601 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 15:36:44 +00:00
Zhou Sheng
2b3407f5b3 Take the old function's name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48588 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 08:05:05 +00:00
Nick Lewycky
6eabd74d1a ubyte and sbyte? what are those?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48585 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 06:19:51 +00:00
Chris Lattner
f70107fe1c add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48583 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 04:46:13 +00:00
Christopher Lamb
b9b0428004 Check even more carefully before applying this DAGCombine transform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48580 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 04:31:39 +00:00
Devang Patel
4f4c28f75f Restore isCFGOnly property of various analysis passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48579 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 02:25:21 +00:00
Evan Cheng
260e07ec8c Fix this xform: (sra (shl X, m), result_size) -> (sign_extend (trunc (shl X, result_size - n - m)))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48578 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 02:18:41 +00:00
Chris Lattner
71a2cb25eb detabify llvm, patch by Mike Stump!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48577 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 01:22:40 +00:00
Devang Patel
bed7e68498 Keep track of analysis information inherited from Module pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48576 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 01:09:53 +00:00
Scott Michel
79698f60c4 Add more patterns to match in the integer comparison test harnesses.
Fix bugs encountered, mostly due to range matching for immediates;
the CellSPU's 10-bit immediates are sign extended, covering a
larger range of unsigned values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48575 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 00:51:36 +00:00
Evan Cheng
71d83741d2 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48573 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-20 00:20:23 +00:00
Evan Cheng
dff1dcac6c Add intrinsics to match mmx shift builtin's with immediate operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48569 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 23:38:52 +00:00
Devang Patel
ac3844d3f9 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 23:05:52 +00:00
Andrew Lenharth
230293b4c5 style and spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48562 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 22:32:43 +00:00
Devang Patel
b9c432fe77 #if 1 .. #endif markers do not add any value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 22:24:25 +00:00
Evan Cheng
55e641b766 Remove dead options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48556 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 22:02:26 +00:00
Devang Patel
c758209153 PassInfo keep tracks whether a pass is an analysis pass or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48554 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 21:56:59 +00:00
Dan Gohman
7925ed05d0 Add support for multiple return values for the PPC target by
converting call result lowering to use the CallingConvLowering
infastructure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48552 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 21:39:28 +00:00
Andrew Lenharth
50b5742157 llvm-ld deserves disable-verify too. opt shouldn't have all the fun options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48550 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 20:49:51 +00:00
Arnold Schwaighofer
4fe3073cfb Don't loose incoming argument registers. Fix documentation style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48545 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 16:39:45 +00:00
Duncan Sands
c35595fd2a Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48543 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 10:59:59 +00:00
Christopher Lamb
15cbde3cf6 Fix X86's isTruncateFree to not claim that truncate to i1 is free. This fixes Bill's testcase that failed for r48491.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 08:30:06 +00:00
Tanya Lattner
e6d5d39c07 Upgrade tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48538 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 07:28:33 +00:00
Tanya Lattner
ce7d5db4d8 Upgrade tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48536 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 05:39:35 +00:00
Chris Lattner
d8ff3caaa0 add some convenience methods for creating GEP instructions and
struct types.  Patch by David Chisnall, with some tweaks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48531 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 05:06:05 +00:00
Tanya Lattner
7f40dea2f1 Upgrade tests to not use llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48530 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 04:36:04 +00:00
Tanya Lattner
f396cc8730 Upgrade tests to not use llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48529 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 04:14:49 +00:00
Gordon Henriksen
3400097966 C bindings for Module-, Function-, and BasicBlock::iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48528 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 03:47:18 +00:00
Tanya Lattner
3a4c856323 Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48527 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 03:47:13 +00:00
Evan Cheng
82a6d23700 Fixed a coalescer bug caused by a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 02:26:36 +00:00
Gordon Henriksen
dc1ce7bdc6 C and Objective Caml bindings for the various getParent methods of the IR.
Based on Erick Tryzelaar's patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48523 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 01:11:35 +00:00
Evan Cheng
94202018c5 Fix live variables issues:
1. If part of a register is re-defined, an implicit kill and an implicit def are added to denote read / mod / write. However, this should only be necessary if the register is actually read later. This is a performance issue.
2. If a sub-register is being defined, and it doesn't have a previous use, do not add a implicit kill to the last use of a super-register:
   = EAX, AX<imp-use,kill>
...
AX =
In this case, EAX is live but AX is killed, this is wrong and will cause the coalescer to do bad things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48521 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 00:52:20 +00:00
Devang Patel
c7fe32e840 Do not use virtual function to identify an analysis pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48520 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 00:48:41 +00:00
Bill Wendling
bebc3642d3 On Darwin, GCC issues a ".globl" for something that has a "visibility protected"
attribute instead of ".protected".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48516 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-18 23:38:12 +00:00
Evan Cheng
586ccac4ec Fix a x86-64 isel lowering bug that's been around forever. A x86-64 varargs function implicitly reads X86::AL, don't clobber it!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48515 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-18 23:36:35 +00:00
Scott Michel
050bc81936 Note that gcc 4.0.1 will trip internal LLVM asserts (e.g., pred_iterator) if compiling
for Release with optimization levels greater than -O0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-18 23:13:26 +00:00
Bill Wendling
dbfd894561 It might be nice to have this run as x86 on non-x86 platforms...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48511 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-18 22:38:22 +00:00