Commit Graph

22100 Commits

Author SHA1 Message Date
Bill Wendling
405abffd5e Miscellaneous clean-ups based on Evan's feedback:
- Cleaned up how the prologue-epilogue inserter loops over the instructions.
- Instead of restarting the processing of an instruction if we remove an
  implicit kill, just update the end iterator and make sure that the iterator
  isn't incremented.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47870 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 23:57:28 +00:00
Dan Gohman
220a823f8d Misc. APInt-ification in the DAGCombiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47869 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 23:51:38 +00:00
Dan Gohman
bb271ff9fe More APInt-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47868 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 23:35:36 +00:00
Dan Gohman
3370dd70ae Yet more APInt-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47867 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 22:37:52 +00:00
Dan Gohman
6c6cd1ccb5 More APInt-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47866 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 22:22:56 +00:00
Dan Gohman
4c1fa61652 Add support for lowering i64 SRA_PARTS and friends on x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47865 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 22:22:09 +00:00
Dan Gohman
050f550aeb More APInt-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47864 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 22:20:46 +00:00
Bill Wendling
7194aaf738 This is the initial check-in for adding register scavenging to PPC. (Currently,
PPC-64 doesn't work.) This also lowers the spilling of the CR registers so that
it uses a register other than the default R0 register (the scavenger scrounges
for one). A significant part of this patch fixes how kill information is
handled.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47863 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 22:19:16 +00:00
Bill Wendling
4a23d72ec2 Go through the machine instruction's operands to make sure that we're not
marking both a super- and sub-register as "killed". This removes implicit uses
that are marked as "killed".



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47862 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 22:14:33 +00:00
Bill Wendling
a0a570cec6 Make the register scavenger update the bookkeeping values for sub/super
registers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47861 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 22:12:25 +00:00
Bill Wendling
988a5782d3 Multiple instructions can be inserted when eliminating frame indexes. We need
the register scavenger to process all of those new instructions instead of just
the last one inserted.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47860 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 22:11:16 +00:00
Devang Patel
41e2397b72 s/isReturnStruct()/hasStructRetAttr()/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47857 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 21:46:28 +00:00
Devang Patel
6790943540 regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47849 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 18:58:47 +00:00
Devang Patel
d15d5e3bbe If a function uses multive values in ret instruction then it
is returning a struct value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47848 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 18:58:16 +00:00
Devang Patel
2a4821b2b3 Preserve paramater attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47847 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 18:36:03 +00:00
Chris Lattner
1a091447f4 Stub out a Path::GetMainExecutable call to find the path to the
main executable of a program.  This needs to be implemented on windows.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47835 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 02:55:43 +00:00
Chris Lattner
53b7277917 another random note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47831 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 19:29:42 +00:00
Chris Lattner
150943c178 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47830 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 19:27:34 +00:00
Chris Lattner
767486b1d5 Evan implemented these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47828 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 18:05:14 +00:00
Chris Lattner
3be4893dce Evan implemented this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 17:56:29 +00:00
Chris Lattner
ff939213db add support for lvsl, fixing PR1481
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47825 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 08:54:27 +00:00
Chris Lattner
4e22012ea4 add support for the sse.cmp.* intrinsics, which fixes sse.isamax with the CBE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47824 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 08:47:13 +00:00
Chris Lattner
2299fec22c refactor intrinsic handling code out into its own method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47823 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 08:29:41 +00:00
Chris Lattner
d9a706ecf9 fix printing of undef vectors, this fixes "simple" and "build" in UnitTests/Vector.
Now they all pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47820 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 08:14:45 +00:00
Chris Lattner
9152daf868 insertelement got the wrong operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47819 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 08:10:16 +00:00
Chris Lattner
e05252b476 Several changes:
* Simplify handling of byval, making it easier to understand and more 
    consistent.  This fixes PR2065.
  * Clean up and simplify handling of GEPs.  I can actually understand it now!
  * Implement support for GEP'ing into vectors, this fixes
    SingleSource/UnitTests/Vector/build2 among others.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47818 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 08:07:24 +00:00
Chris Lattner
939732afc2 Fix a bug I introduced in constant array and constant vector handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47816 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 05:46:57 +00:00
Chris Lattner
b1855add0c implement shufflevector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47815 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 05:41:07 +00:00
Chris Lattner
8728f1915f Add a new ShuffleVectorInst::getMaskValue method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47813 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 05:28:33 +00:00
Chris Lattner
0452ed6bd6 implement extractelement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47812 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 03:57:08 +00:00
Chris Lattner
33a44d928b implement insertelement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47811 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 03:52:39 +00:00
Chris Lattner
90683abb56 respect isSigned for vector types, fixing sdiv of vectors etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47810 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 03:41:23 +00:00
Chris Lattner
32cba8e063 print the attribute in the right place, this fixes function returning vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47809 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 03:39:43 +00:00
Chris Lattner
b61d41b8dd vector types are simple types. This fixes div/rem of vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47807 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 03:33:31 +00:00
Chris Lattner
85feab6c57 Print vector types appropriately. This gets basic vector code working
(PR1126)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47806 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 03:29:50 +00:00
Chris Lattner
0a3d4d971d rename PT -> VT for VectorTypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47805 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 03:18:46 +00:00
Chris Lattner
c8b6d339d7 Print i32/i64 integer constants as 1u instead of ((unsigned int)1).
Use dyn_cast better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47804 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 03:16:38 +00:00
Chris Lattner
a11deb0392 Move pr717 to here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47803 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 02:51:40 +00:00
Nick Lewycky
fc82fabe00 Add an unwind_to field to basic blocks, making them Users instead of Values.
This is the first checkin for PR1269, the new EH infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 02:48:09 +00:00
Andrew Lenharth
fe0753efba good catch anton
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47800 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 23:18:21 +00:00
Andrew Lenharth
ce1105da43 make CAS work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47799 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 22:27:48 +00:00
Andrew Lenharth
26ed8697d4 all but CAS working on x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47798 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 21:52:34 +00:00
Nick Lewycky
1038222a9b Print the name, not a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47796 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 17:20:55 +00:00
Andrew Lenharth
ea7da50e5a Add lock prefix support to x86. Also add the instructions necessary for the atomic ops. They are still marked pseudo, since I cannot figure out what format to use, but they are the correct opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47795 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 13:37:02 +00:00
Chris Lattner
ab3b77834c Fix PR2113 by verifying allocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47792 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 09:01:57 +00:00
Chris Lattner
b822e70f36 allow specified inline threshold to be negative, as the value is
itself sometimes negative.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 08:09:51 +00:00
Dale Johannesen
3c8b59c546 Add MVT::is128BitVector and is64BitVector. Shrink
unaligned load/store code using them.  Per review
of unaligned load/store vector patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47782 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 03:40:57 +00:00
Evan Cheng
84d4a2b4ad Refactor / clean up code; remove td list scheduler special tie breaker (no real benefit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47779 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 00:39:47 +00:00
Devang Patel
c45b5d9f66 Fix cut-n-pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 23:41:13 +00:00
Devang Patel
ca891ecf91 Add pass to promote sret.
This pass transforms 

  %struct._Point = type { i32, i32, i32, i32, i32, i32 }
  define internal void @foo(%struct._Point* sret  %agg.result)

into

  %struct._Point = type { i32, i32, i32, i32, i32, i32 }
  define internal %struct._Point @foo()

This pass updates foo() clients appropriately to use
getresult instruction to extract return values.

This pass is not yet ready for prime time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47776 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 23:34:08 +00:00