Commit Graph

7559 Commits

Author SHA1 Message Date
Evan Cheng
861939152d More flexible TargetLowering LSR hooks for testing whether an immediate is a legal target address immediate or scale.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35074 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 23:29:01 +00:00
Evan Cheng
a8a155e77f More flexible TargetLowering LSR hooks for testing whether an immediate is
a legal target address immediate or scale.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 23:28:50 +00:00
Evan Cheng
37e8856f74 Stupid bug: SSE2 supports v2i64 add / sub.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35070 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 22:58:52 +00:00
Bill Wendling
c1fb0473ed Adding more arithmetic operators to MMX. This is an almost exact copy of
the addition. Please let me know if you have suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35055 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-10 09:57:05 +00:00
Evan Cheng
1a9da0d66c Minor stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35049 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:46:06 +00:00
Evan Cheng
44f4fca3c0 Add comments about LSR / ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35048 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:35:33 +00:00
Evan Cheng
2265b49193 Unfinished work and ideas related to register scavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35047 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:34:51 +00:00
Dale Johannesen
818c085232 apply comments from review of last patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35045 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:18:59 +00:00
Dale Johannesen
a6bc6fc170 Add some observations from CoreGraphics benchmark. Remove register
scavenging todo item, since it is now implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35044 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 17:58:17 +00:00
Evan Cheng
23a9570494 Implement inline asm modifier c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35035 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 22:42:46 +00:00
Bill Wendling
2f88dcdfb3 Added "padd*" support for MMX. Added MMX move stuff to X86InstrInfo so that
moves, loads, etc. are recognized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35031 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 22:09:11 +00:00
Evan Cheng
b582b1b1fc Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35030 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 21:59:30 +00:00
Evan Cheng
032953d747 Putting more constants which do not contain relocations into .literal{4|8|16}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35026 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 08:31:54 +00:00
Evan Cheng
bf822eb6a3 Change register allocation order to Dale's suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35021 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 02:56:40 +00:00
Evan Cheng
11788fde93 Bug fix. Not advancing the register scavenger iterator correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35020 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 02:55:08 +00:00
Evan Cheng
98ded765c2 For Darwin, put constant data into .const, .const_data, .literal{4|8|16}
sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35017 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 01:25:25 +00:00
Evan Cheng
f0b5d56efd Put constant data to .const, .const_data, .literal{4|8|16} sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35016 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 01:07:07 +00:00
Evan Cheng
be346c9476 Add ReadOnlySection directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35015 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 01:00:38 +00:00
Evan Cheng
603b83ebcd Only safe to use a call-clobbered or spilled callee-saved register as scratch register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35010 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 20:30:36 +00:00
Bill Wendling
c32a7f98ab Remove useless pattern fragments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35009 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 18:23:09 +00:00
Anton Korobeynikov
d0b82b301d Refactoring of formal parameter flags. Enable properly use of
zext/sext/aext stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 16:25:09 +00:00
Bill Wendling
bc9bffa27b Properly support v8i8 and v4i16 types. It now converts them to v2i32 for
load and stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35002 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 05:43:18 +00:00
Anton Korobeynikov
a6199c87c2 Fix DWARF debugging information on x86/Linux and (hopefully)
Mingw32/Cygwin targets. This fixes PR978


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35000 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 02:47:57 +00:00
Evan Cheng
cb20998b3f ARM always use register scavenger. No longer reserves R12.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34999 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 02:46:23 +00:00
Evan Cheng
0ea12ec848 Fix some brittle code. Watch out for cases where register scavenger is pointing to deleted instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34998 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 02:38:05 +00:00
Evan Cheng
3d06cf4584 Fix one more Thumb eliminateFrameIndex bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34990 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 00:12:18 +00:00
Evan Cheng
e6257632fc Register scavenging is now on by default for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34987 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 22:02:53 +00:00
Evan Cheng
a90f3408b3 Make load / store optimizer use register scavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 21:59:20 +00:00
Bill Wendling
a31bd27f12 Add LOAD/STORE support for MMX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34978 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 18:53:42 +00:00
Evan Cheng
cc1c427266 Code clean up. Prepare to use register scavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34976 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 18:02:41 +00:00
Evan Cheng
28b3c45109 Minor interface change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34967 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 10:05:14 +00:00
Evan Cheng
140e33cfd1 Scavenge a register using the register scavenger when needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34966 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 10:03:56 +00:00
Anton Korobeynikov
1d9baccc9b Use new SDIselParamAttr enumeration. This removes "magick" constants
from formal attributes' flags processing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34963 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 08:12:33 +00:00
Chris Lattner
b9a7bea99c Switch PPC return lower to use an autogenerated CC description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34940 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 00:59:59 +00:00
Bill Wendling
229baffc4e Add the emms intrinsic for MMX support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34938 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 23:09:45 +00:00
Lauro Ramos Venancio
6d7dd8ef46 Use init_array/fini_array sections for static contructors/destructors when the ABI is AAPCS.
Fix SingleSource/Regression/C/ConstructorDestructorAttributes test on arm-linux-gnueabi.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34931 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 17:59:58 +00:00
Jeff Cohen
ca5183d445 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34917 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 00:00:42 +00:00
Chris Lattner
569bdc7bb7 add missing braces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34905 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 06:13:52 +00:00
Reid Spencer
bdc75089ab Make sure that when we store a value it is masked to its correct bit
width. This helps CBE work with non-standard integer bit widths.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34885 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 16:33:33 +00:00
Nick Lewycky
f54949dc49 Emit low/high immediate loads properly for Linux/PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34871 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 05:29:51 +00:00
Evan Cheng
ae6421935b X86-64 VACOPY needs custom expansion. va_list is a struct { i32, i32, i8*, i8* }.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34857 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 23:16:35 +00:00
Anton Korobeynikov
f7dcfa81c5 Simplify things
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34849 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 21:50:27 +00:00
Chris Lattner
82932a5e4a argument lowering should copy from the vreg shadows of live-in arguments
passed in registers, not directly from the pregs themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34838 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 05:12:29 +00:00
Chris Lattner
9b6f57c303 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34837 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 05:04:52 +00:00
Dale Johannesen
9f8e50d4ed eliminate unnecessary reset of SP in epilog on darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34824 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 01:17:17 +00:00
Reid Spencer
1ede29c951 Wrap a long line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34799 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 19:48:16 +00:00
Anton Korobeynikov
9dd9abd87f Ensure that fastcall'ed function is correctly mangled & stack is
properly aligned


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34788 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 16:29:22 +00:00
Nicolas Geoffray
43c6e7cd9b Implemented the frameaddress intrinsic for PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34787 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 13:11:38 +00:00
Evan Cheng
c1c2de0ae7 Use a spilled free callee-saved register as scratch register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34785 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 08:57:52 +00:00
Evan Cheng
f49407b790 - Track which callee-saved registers are spilled.
- Some code clean up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34783 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 08:26:31 +00:00
Evan Cheng
cda067bad9 Switch from std::vector<bool> to BitVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34781 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 07:52:44 +00:00
Bill Wendling
f1d6006ad6 Get rid of verboten <iostream> include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34777 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 06:05:39 +00:00
Dale Johannesen
b71aa2b6ca Changes requested in review of last pass. Also pulled isThumb into a
member, instead of resetting in every function that uses it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34764 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 23:20:38 +00:00
Evan Cheng
ad78ef2154 Doh. ARM::PC is obvious a reserved register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34763 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 23:12:34 +00:00
Dale Johannesen
f1b214d3ca Add intelligence about where to break large blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34755 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 18:41:23 +00:00
Chris Lattner
eac6607d7c remove dead option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34754 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 18:39:53 +00:00
Chris Lattner
70500805d5 bugfix: fastcall does not require the first two params to be marked 'inreg',
they always get registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34748 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 18:35:11 +00:00
Nate Begeman
fec910c3b9 More Mach-O writer improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34740 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 07:40:50 +00:00
Chris Lattner
e32bbf61c0 use high-level functions in CCState
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34739 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 07:09:55 +00:00
Chris Lattner
638402b253 make use of helper functions in CCState for analyzing formals and calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34737 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 07:00:42 +00:00
Chris Lattner
f5d280a0a6 switch LowerFastCCCallTo over to using the new fastcall description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34734 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 06:26:33 +00:00
Chris Lattner
fc664c1bc0 switch LowerFastCCArguments over to using the autogenerated Fastcall description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34733 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 06:21:19 +00:00
Chris Lattner
011bcc8cdd add new CC_X86_32_FastCall calling conv, which describes fastcall on win32.
Factor out a CC_X86_32_Common convention, which is the part shared between
ccc, stdcall and fastcall


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34732 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 06:20:01 +00:00
Chris Lattner
fcf1a3de7a rearrange code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34731 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 06:10:12 +00:00
Chris Lattner
2db39b865e remove fastcc (not fastcall) support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34730 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 06:05:16 +00:00
Chris Lattner
f39f771b02 switch LowerCCCArguments over to using autogenerated CC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34729 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 05:46:49 +00:00
Chris Lattner
c0bdf3460c simplify sret handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 05:39:26 +00:00
Chris Lattner
423c5f44f8 switch LowerCCCCallTo over to using an autogenerated callingconv
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34727 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 05:31:48 +00:00
Chris Lattner
370bdda526 rename stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34726 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 05:30:29 +00:00
Chris Lattner
62247f62ce rename some CCActions, add CCIfInReg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34725 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 05:29:33 +00:00
Chris Lattner
59ed56b9ee switch return value passing and the x86-64 calling convention information
over to being autogenerated from the X86CallingConv.td file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34722 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 04:55:35 +00:00
Chris Lattner
3d5591038a make subtarget references work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34721 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 04:51:41 +00:00
Evan Cheng
36230cdda4 Make requiresRegisterScavenging determination on a per MachineFunction basis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34711 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 00:59:19 +00:00
Evan Cheng
41a4d562f7 Temporary: make R12 available in ARM mode if RegScavenger is being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34709 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 00:22:44 +00:00
Evan Cheng
1b051fc6a4 Start making use of RegScavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34708 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 00:21:58 +00:00
Evan Cheng
5e6df4647e PEI now passes a RegScavenger ptr to eliminateFrameIndex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34707 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-28 00:21:17 +00:00
Evan Cheng
15991bf775 Minor tweak. Allocate r0 to r3 in reverse order, r3 is least likely to be livein to a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34701 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 23:03:55 +00:00
Chris Lattner
3e8a541bf4 reenable generation of CC info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34699 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 22:12:19 +00:00
Evan Cheng
3fae29acef Back out previous commit temporarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34694 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 21:47:22 +00:00
Evan Cheng
5ef9226f30 Let MRegisterInfo now owns RegScavenger; eliminateFrameIndex must preserve register kill info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34692 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 21:12:35 +00:00
Chris Lattner
f45803012c implement CCMatchIfCC in terms of CCMatchIf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34685 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 20:45:02 +00:00
Chris Lattner
8bcc4aea47 build cc info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34684 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 20:44:31 +00:00
Chris Lattner
dbec2d9dcf a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34670 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 17:21:09 +00:00
Nicolas Geoffray
05c180b347 Fix parenthesis for BCTRL_{ELF|Macho} test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34668 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 13:10:41 +00:00
Nicolas Geoffray
63f8fb1993 Differentiate between the MachO and the ELF ABI the CALL instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34667 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 13:01:19 +00:00
Jim Laskey
d313a9b148 Duplicate use of LR, take 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34666 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 11:55:45 +00:00
Chris Lattner
d637a8b436 Add calling convention info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34661 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 06:59:52 +00:00
Chris Lattner
00836648ae move target independent calling convention stuff to TargetCallingConv.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34659 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 05:57:32 +00:00
Chris Lattner
d50110d8dc fill in some holes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34658 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 05:51:05 +00:00
Chris Lattner
9774c915f1 switch x86-64 return value lowering over to using same mechanism as argument
lowering uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34657 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 05:28:59 +00:00
Chris Lattner
13513b7a50 Minor refactoring of CC Lowering interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34656 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 05:13:54 +00:00
Chris Lattner
362e98a5f5 move CC Lowering stuff to its own public interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34655 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 04:43:02 +00:00
Chris Lattner
9c71ab77cd refactor x86-64 argument lowering yet again, this time eliminating templates,
'clients', etc, and adding CCValAssign instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34654 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 04:18:15 +00:00
Evan Cheng
3d3d627513 Backing out Jim's LR spill changes. This was causing llvm-gcc bootstrapping
to infinite loop:
PPCMachineFunctionInfo.h updated: 1.2 -> 1.3
PPCRegisterInfo.cpp updated: 1.110 -> 1.111
PPCRegisterInfo.h updated: 1.28 -> 1.29


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 02:55:29 +00:00
Chris Lattner
caddd44be7 always lower to RETFLAG, never leave it as just ret.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34639 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 19:44:02 +00:00
Chris Lattner
bffc1b3c4e fix attribution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34637 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 18:56:07 +00:00
Chris Lattner
31c8a6d511 Add a description of the X86-64 calling convention and the return
conventions.  This doesn't do anything yet, but may in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34636 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 18:17:14 +00:00
Chris Lattner
6e50f8cfe9 switch to smallvector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34633 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 07:59:53 +00:00
Chris Lattner
14dd4c9735 initial hack at splitting the x86-64 calling convention info out from the
mechanics that process it.  I'm still not happy with this, but it's a step
in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34631 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 07:50:02 +00:00
Chris Lattner
cc7b07a0ff the truncate must always be done, it's only the assert that is conditional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34628 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 05:21:05 +00:00
Chris Lattner
54e3efde46 add an accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34625 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 04:01:25 +00:00
Chris Lattner
df5cdb5288 in X86-64 CCC, i8/i16 arguments are already properly zext/sext'd on input.
Capture this so that downstream zext/sext's are optimized out.  This
compiles:
  int test(short X) { return (int)X; }

to:

_test:
        movl %edi, %eax
        ret

instead of:

_test:
        movswl %di, %eax
        ret


GCC produces this bizarre code:

_test:
        movw    %di, -12(%rsp)
        movswl  -12(%rsp),%eax
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34623 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 03:18:56 +00:00
Chris Lattner
c30654cc96 Fix an X86-64 abi bug. We now compile:
void foo(short);
void bar(unsigned short A) {
  foo(A);
}

into:

_bar:
        subq $8, %rsp
        movswl %di, %edi
        call _foo
        addq $8, %rsp
        ret

instead of:

_bar:
        subq $8, %rsp
        call _foo
        addq $8, %rsp
        ret

Testcase here: test/CodeGen/X86/x86-64-shortint.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34615 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 23:10:46 +00:00
Chris Lattner
7e22977c0f fix CodeGen/X86/2007-02-25-FastCCStack.ll, a regression from my patch last
night:  fastcc returns should only go in XMM0 if we have SSE2 or above.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34613 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 22:23:46 +00:00
Chris Lattner
4ddf7a4ca6 no really, this is the right patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34605 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 20:01:40 +00:00
Chris Lattner
640c0ac01d always promote float varargs to double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34604 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 19:59:18 +00:00
Chris Lattner
1fa3d9ef93 one important bugfix: PPC32 didn't have both elf and macho support for
external symbols and global addresses.  Add the missing ones.

one important workaround: PPCISD::CALL is matched by both PPCcall_ELF
and PPCcall_Macho, disable the _ELF patterns for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34601 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 19:20:53 +00:00
Dale Johannesen
ce74de46dd cosmetic changes from review of last patch. obvious
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34598 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 18:31:31 +00:00
Chris Lattner
5e265b29ea fastcc functions that return double values now return them in xmm0 on x86-32.
This implements CodeGen/X86/fp-stack-ret.ll:test[23]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34592 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 09:31:16 +00:00
Chris Lattner
4dfccf4b48 allow vectors to be passed to stdcall/fastcall functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34590 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 09:14:25 +00:00
Chris Lattner
2a9bdd74f2 move LowerRET into the 'Return Value Calling Convention Implementation'
section of the file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34589 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 09:12:39 +00:00
Chris Lattner
339b439d47 make all Lower*CallTo implementations use LowerCallResult to handle their
result value stuff.  This eliminates a bunch of duplicated code and now
GetRetValueLocs is the sole place that decides where a value is returned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34588 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 09:10:05 +00:00
Chris Lattner
09c75a4372 pass the calling convention into Lower*CallTo, instead of using ad-hoc flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34587 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 09:06:15 +00:00
Chris Lattner
3085e15117 factor a bunch of code out of LowerCCCCallTo into a new LowerCallResult
function.  This function now uses GetRetValueLocs to determine *where*
the result values are located and concerns itself with *how* to pull the
values out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34586 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 08:59:22 +00:00
Chris Lattner
2b02a4409f move some code around, pass in calling conv, even though it is unused
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34585 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 08:29:00 +00:00
Chris Lattner
cb18656734 simplify result value lowering by splitting the selection of *where* to return
registers out from the logic of *how* to return them.

This changes X86-64 to mark EAX live out when returning a 32-bit value,
where before it marked RAX liveout.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34582 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 08:15:11 +00:00
Chris Lattner
7d53a1c45e make void-return not a special case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34579 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 07:18:38 +00:00
Chris Lattner
5a88b837f2 eliminate a bunch more temporary vectors from X86 lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34578 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 07:10:00 +00:00
Chris Lattner
d96d072332 eliminate temporary vectors created during X86 lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34577 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 06:40:16 +00:00
Chris Lattner
9cb9626abf remove std::vector's in RET lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34576 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 06:21:57 +00:00
Chris Lattner
9f0bc659c8 implement support for the linux/ppc function call ABI. Patch by
Nicolas Geoffray!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34574 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 05:34:32 +00:00
Chris Lattner
eb95d41cd3 Add XLForm_1_ext template, patch by Nicolas Geoffray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34573 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 05:07:49 +00:00
Chris Lattner
456bc87e78 Improve JIT support for linux/ppc: Patch by Nicolas Geoffray!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34572 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 05:04:13 +00:00
Dale Johannesen
598270a68d remove crediting of Evan Cheng and me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34568 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 01:42:36 +00:00
Dale Johannesen
99c49a4b94 Removed WaterListOffset, inserted BBOffsets. Remove TODO item about this
from README.
When no water available, use end of block if in range.  (More to do here.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34563 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 00:47:03 +00:00
Bill Wendling
145aad04db PR1164:
Generate local names with a "llvm_cbe_" prefix using the actual name of the
variable instead of a temporary name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 22:45:08 +00:00
Lauro Ramos Venancio
acdfa445ac bugfix: SP wasn't updated for varargs when frame pointer was eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 21:53:48 +00:00
Jim Laskey
2a27a7598b Don't spill LR as a callee saved register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34533 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 20:34:16 +00:00
Lauro Ramos Venancio
600c383e5c Fix stack alignment in functions with varargs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34532 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 20:32:57 +00:00
Dale Johannesen
88e37ae366 rewrite of constant islands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34523 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 05:02:36 +00:00
Evan Cheng
04321f70f5 Added -march=thumb; removed -enable-thumb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34521 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 03:14:31 +00:00
Evan Cheng
cdc694440b 80 col. violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34520 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 03:03:16 +00:00
Anton Korobeynikov
6641309c36 External weak linkage is supported by recent binutils on mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34519 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 01:58:50 +00:00
Evan Cheng
0fa1b6d1b1 By default, spills kills the register being stored.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34515 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 01:10:04 +00:00
Evan Cheng
ead7590581 Add option to turn on register scavenger; By default, spills kills the register being stored.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34514 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 01:09:11 +00:00
Chris Lattner
c740d06290 remove obsolete file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34506 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 23:48:43 +00:00
Jim Laskey
2ad9f17fee Simplify lowering and selection of exception ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34488 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 14:56:36 +00:00
Jim Laskey
62819f3144 Support to provide exception and selector registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34482 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:54:50 +00:00
Jim Laskey
bda9b0ec7b Add support for changes in DwarfWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34478 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:47:38 +00:00
Jim Laskey
a15be8ce3a Add TAI field for exception table section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:43:40 +00:00
Evan Cheng
f46847172a ELF / PIC requires GOT be in the EBX register during calls via PLT GOT pointer.
Add implicit uses of EBX to calls to ensure liveintervalanalysis does not treat
the GOT in EBX move as dead upon definition.
This should fix PR1207.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34470 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 21:18:14 +00:00
Dan Gohman
e26bff22db Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34456 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 20:52:03 +00:00
Evan Cheng
58866f43fa How the heck did I forget patterns for llvm.x86.sse2.cmp.sd?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34434 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 00:39:09 +00:00
Reid Spencer
4ecd9ee061 Simplify some code by moving variable declarations into the only block that
uses them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34432 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 23:30:10 +00:00
Reid Spencer
f734ea21a3 Implement support for non-standard integer bit widths of any size. The
rules alignment is to pick the alignment that corresponds to the smallest
specified alignment that is larger than the bit width of the type or the
largest specified integer alignment if none are larger than the bitwidth
of the type. For the byte size, the size returned is the next larger
multiple of the alignment for that type (using the above rule). This patch
also changes bit widths from "short" to "uint32_t" to ensure there are
enough bits to specify any bit width that LLVM can handle (currently 2^23);
16-bits isn't enough.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34431 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 22:35:00 +00:00
Evan Cheng
b371f457b0 Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34428 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 21:49:54 +00:00
Reid Spencer
a284cbf667 For PR1207:
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34399 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 03:20:00 +00:00
Evan Cheng
eceada6728 Added getReservedRegs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34376 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 11:06:00 +00:00
Chris Lattner
dee5a5a52c Fix ixaddrs as well, allowing ppc64 to compile to:
_test2:
        li r2, 0
        lis r3, 1
        std r2, 9024(r3)
        blr

instead of:

_test2:
        lis r2, 1
        li r3, 0
        ori r2, r2, 9024
        std r3, 0(r2)
        blr

This implements CodeGen/PowerPC/LargeAbsoluteAddr.ll:test2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34373 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 06:57:26 +00:00
Chris Lattner
bc681d6af4 Compile test/CodeGen/PowerPC/LargeAbsoluteAddr.ll to:
_test:
        lis r2, 743
        li r3, 0
        stw r3, 32751(r2)
        blr

instead of:

_test:
        li r2, 0
        stw r2, 32751(48693248)
        blr

Implement support for ppc64 as well, allowing it to produce better code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34371 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 06:44:03 +00:00
Chris Lattner
affeb56480 Do not dereference invalid ranges. Generalize targetdata alignment model.
This fixes the UnitTests/Vector/sumarray-dbl regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34358 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 00:41:42 +00:00
Chris Lattner
3ebb2e0034 Fix CodeGen/PowerPC/2007-02-16-AlignPacked.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34356 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 23:11:51 +00:00
Reid Spencer
52dc96842e Remove an unnecessary predicate.
Patch by Scott Michel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34354 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 22:42:40 +00:00
Chris Lattner
ae6f1fa36b simplify some code, ensure that packed structures get abi alignment of 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34352 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 22:25:34 +00:00
Chris Lattner
3dd074afcb fix incorrect encoding of vminsw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34351 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 21:20:09 +00:00
Andrew Lenharth
c909605bf7 This was done recently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34338 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 02:11:59 +00:00
Reid Spencer
1f43787bf0 For PR1195:
PACKED_ALIGN -> VECTOR_ALIGN


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34330 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 22:07:05 +00:00
Reid Spencer
16db3caba8 For PR1202:
Make sure we found an existing Alignment before overwriting it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34308 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 18:34:36 +00:00
Evan Cheng
61de82d885 Use BitVector instead of vector<bool> which can be extremely slow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34302 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 05:59:24 +00:00
Reid Spencer
ac9dcb94dd For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 03:39:18 +00:00
Reid Spencer
9d6565a5b1 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:26:10 +00:00
Reid Spencer
b7d61101b1 Fixed packed structure breakage from earlier TargetData patch; applied
Chris Lattner's code style suggestions.

Patch by Scott Michel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34292 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:11:06 +00:00
Chris Lattner
d2b7cec527 Generalize TargetData strings, to support more interesting forms of data.
Patch by Scott Michel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34266 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 05:52:17 +00:00
Andrew Lenharth
921a83a809 Well this isn't as ugly and it works better. At least gcc bootstraps again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34254 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 23:41:16 +00:00
Chris Lattner
36e37d2944 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34249 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 21:44:43 +00:00
Lauro Ramos Venancio
7501605988 Add space between // and the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 20:06:15 +00:00
Lauro Ramos Venancio
3630e78db9 Add ABI information to ARM subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34245 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 19:52:28 +00:00
Lauro Ramos Venancio
876eaf1135 According to ARM EABI, 8-bytes function arguments must be 8-bytes aligned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34241 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 14:07:13 +00:00
Chris Lattner
48d3c108b6 more notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34204 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 21:20:26 +00:00
Chris Lattner
08ba1de2d2 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34202 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 20:26:34 +00:00
Chris Lattner
f6ca09a22b Switch LayoutInfo to be a DenseMap instead of an std::map. This speeds up
-load-vn -gcse by 2.3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34160 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:26:17 +00:00
Chris Lattner
a12bd03f07 add a typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34159 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:18:06 +00:00
Chris Lattner
9182e3f205 eliminate the std::vector from StructLayout, allocating the elements immediately
after the StructLayout object in memory.  This marginally improves locality,
speeding up -load-vn -gcse by ~0.8%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34158 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:15:41 +00:00
Chris Lattner
b0c39a3b4d encapsulate the rest of the StructLayout members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34157 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:59:22 +00:00
Chris Lattner
b1919e2f08 Privatize StructLayout::MemberOffsets, adding an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34156 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:55:17 +00:00
Chris Lattner
ec6478b8f3 Use ManagedStatic to manage LayoutInfo, instead of rolling our own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34154 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:43:18 +00:00
Chris Lattner
ddce8d21ea Change TargetData::getIndexedOffset interface to not require indices
in a vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34153 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:33:15 +00:00
Evan Cheng
e03cff6812 These vectors are frequently large. Use std::vector instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34109 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 23:59:14 +00:00
Evan Cheng
c99ef085b9 Add reference counting to constantpool entries. Delete the unused ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 20:54:44 +00:00
Chris Lattner
8abcfe11b5 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34101 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 17:38:01 +00:00
Nate Begeman
8c541bcc56 Remove fixed item
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34081 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 04:19:54 +00:00
Evan Cheng
6a9a76508c This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34072 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 23:53:38 +00:00
Andrew Lenharth
ac5a545043 return addresses, those I already have
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34056 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 17:37:41 +00:00
Bill Wendling
2f5bcb5f38 Fixed comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34040 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 06:05:08 +00:00
Bill Wendling
eb1ac33850 Moved the MachOWriter and ELFWriter out of the Target/* files. Placed the
definition of it into the CodeGen library. This is so that a backend doesn't
necessarily add in these writers if it doesn't use them (like in the lli
program).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34034 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:39:44 +00:00
Bill Wendling
50e4e88d97 Added new method to add a "simple" code emitter. That is, to only add
the code emitter and not set variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34033 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:38:33 +00:00
Bill Wendling
449c57a0f9 Dead files. Functionality has been taken over by the Add*Writer functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34029 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:32:51 +00:00
Evan Cheng
bd8251a9a6 isLowRegister() expects input is a physical register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34013 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:44:33 +00:00
Evan Cheng
403e4a4725 Rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34011 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:24:09 +00:00
Evan Cheng
5ebd10e5ac If sp offset will be materialized in a register. Clear the offset field of str / ldr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34010 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:19:58 +00:00
Evan Cheng
8fdbe560a0 Get rid of references to iostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34009 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:18:32 +00:00
Evan Cheng
2ef02a220e New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34000 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 09:22:15 +00:00
Evan Cheng
8bed6c968f In thumb mode, R3 is reserved, but it can be live in to the function. If
that is the case, whenever we use it as a scratch register, save it to R12
first and then restore it after the use.
This is a temporary and truly horrible workaround!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33999 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 09:17:36 +00:00
Evan Cheng
1f253d6e97 Update
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33998 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 08:37:57 +00:00
Evan Cheng
7142f8755a - If fp (r7) is used to reference stack objects, use [r, r] address mode.
- If there is a dynamic alloca, in the epilogue, restore the value of sp
  using r7 - offset.
- Other bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33997 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 08:37:31 +00:00
Evan Cheng
a01faf4a7a eliminateFrameIndex() is even more complicated if frame ptr is used instead of SP when there are dynamic alloca's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33975 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 02:44:23 +00:00
Evan Cheng
8e59ea998f Spill / restore should avoid modifying the condition register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33971 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 00:06:56 +00:00
Evan Cheng
8c1a73ad3f Select add FI, c correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33960 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 09:11:20 +00:00
Evan Cheng
40984d7449 foldMemoryOperand() cannot fold tMOVrr sp into load / store in thumb mode. tLDRspi / tSTRspi cannot target / store high registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33958 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 06:13:29 +00:00
Evan Cheng
88b633165a eliminateFrameIndex() bug when frame pointer is used as base register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33945 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 00:23:31 +00:00