oota-llvm.git
17 years agoFix a typo, thanks Bill!
Nate Begeman [Wed, 28 Feb 2007 09:16:38 +0000 (09:16 +0000)]
Fix a typo, thanks Bill!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34741 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMore Mach-O writer improvements.
Nate Begeman [Wed, 28 Feb 2007 07:40:50 +0000 (07:40 +0000)]
More Mach-O writer improvements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34740 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agouse high-level functions in CCState
Chris Lattner [Wed, 28 Feb 2007 07:09:55 +0000 (07:09 +0000)]
use high-level functions in CCState

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34739 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd methods for analysis of call results and return nodes.
Chris Lattner [Wed, 28 Feb 2007 07:09:40 +0000 (07:09 +0000)]
add methods for analysis of call results and return nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34738 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomake use of helper functions in CCState for analyzing formals and calls.
Chris Lattner [Wed, 28 Feb 2007 07:00:42 +0000 (07:00 +0000)]
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

17 years agoadd methods to analyze calls and formals.
Chris Lattner [Wed, 28 Feb 2007 06:56:37 +0000 (06:56 +0000)]
add methods to analyze calls and formals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34736 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a newline at end of file
Chris Lattner [Wed, 28 Feb 2007 06:42:11 +0000 (06:42 +0000)]
add a newline at end of file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34735 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoswitch LowerFastCCCallTo over to using the new fastcall description.
Chris Lattner [Wed, 28 Feb 2007 06:26:33 +0000 (06:26 +0000)]
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

17 years agoswitch LowerFastCCArguments over to using the autogenerated Fastcall description.
Chris Lattner [Wed, 28 Feb 2007 06:21:19 +0000 (06:21 +0000)]
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

17 years agoadd new CC_X86_32_FastCall calling conv, which describes fastcall on win32.
Chris Lattner [Wed, 28 Feb 2007 06:20:01 +0000 (06:20 +0000)]
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

17 years agorearrange code
Chris Lattner [Wed, 28 Feb 2007 06:10:12 +0000 (06:10 +0000)]
rearrange code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34731 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove fastcc (not fastcall) support
Chris Lattner [Wed, 28 Feb 2007 06:05:16 +0000 (06:05 +0000)]
remove fastcc (not fastcall) support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34730 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoswitch LowerCCCArguments over to using autogenerated CC.
Chris Lattner [Wed, 28 Feb 2007 05:46:49 +0000 (05:46 +0000)]
switch LowerCCCArguments over to using autogenerated CC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34729 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agosimplify sret handling
Chris Lattner [Wed, 28 Feb 2007 05:39:26 +0000 (05:39 +0000)]
simplify sret handling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34728 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoswitch LowerCCCCallTo over to using an autogenerated callingconv
Chris Lattner [Wed, 28 Feb 2007 05:31:48 +0000 (05:31 +0000)]
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

17 years agorename stuff
Chris Lattner [Wed, 28 Feb 2007 05:30:29 +0000 (05:30 +0000)]
rename stuff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34726 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agorename some CCActions, add CCIfInReg
Chris Lattner [Wed, 28 Feb 2007 05:29:33 +0000 (05:29 +0000)]
rename some CCActions, add CCIfInReg

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34725 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agorename some CCActions
Chris Lattner [Wed, 28 Feb 2007 05:29:06 +0000 (05:29 +0000)]
rename some CCActions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34724 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agocorrect dependency
Chris Lattner [Wed, 28 Feb 2007 05:10:40 +0000 (05:10 +0000)]
correct dependency

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34723 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoswitch return value passing and the x86-64 calling convention information
Chris Lattner [Wed, 28 Feb 2007 04:55:35 +0000 (04:55 +0000)]
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

17 years agomake subtarget references work.
Chris Lattner [Wed, 28 Feb 2007 04:51:41 +0000 (04:51 +0000)]
make subtarget references work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34721 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement CCPromoteToType
Chris Lattner [Wed, 28 Feb 2007 04:43:48 +0000 (04:43 +0000)]
implement CCPromoteToType

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34720 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDescribe how arbitrary precision integers are written to the bytecode.
Reid Spencer [Wed, 28 Feb 2007 02:33:06 +0000 (02:33 +0000)]
Describe how arbitrary precision integers are written to the bytecode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34719 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement reading of arbitrary precision integers.
Reid Spencer [Wed, 28 Feb 2007 02:25:48 +0000 (02:25 +0000)]
Implement reading of arbitrary precision integers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34718 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement writing of arbitrary precision integers.
Reid Spencer [Wed, 28 Feb 2007 02:25:20 +0000 (02:25 +0000)]
Implement writing of arbitrary precision integers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34717 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRegenerate.
Reid Spencer [Wed, 28 Feb 2007 02:24:54 +0000 (02:24 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34716 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement arbitrary integer constants through the use of APInt values.
Reid Spencer [Wed, 28 Feb 2007 02:24:27 +0000 (02:24 +0000)]
Implement arbitrary integer constants through the use of APInt values.
Positive, negative, and hexadecimal integer constants will now return an
APInt for values having > 64 bits of precision.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34715 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement support for aribrary precision integers by creating two new
Reid Spencer [Wed, 28 Feb 2007 02:23:44 +0000 (02:23 +0000)]
Implement support for aribrary precision integers by creating two new
tokens: ESAPINTVAL and EUAPINTVAL and adding an APInt* as a semantic value.
This allows us to extend the definition of an integer constant to allow
arbitrary precision integer constant values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34714 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agogetActiveWords should return the number of words, not the index of the
Reid Spencer [Wed, 28 Feb 2007 02:20:49 +0000 (02:20 +0000)]
getActiveWords should return the number of words, not the index of the
highest active words. Increment its result by one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34713 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a bug in RoundDoubleToAPInt where it would force the size to 64 bits
Reid Spencer [Wed, 28 Feb 2007 01:30:08 +0000 (01:30 +0000)]
Fix a bug in RoundDoubleToAPInt where it would force the size to 64 bits
instead of honoring the client's requested bit width.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34712 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake requiresRegisterScavenging determination on a per MachineFunction basis.
Evan Cheng [Wed, 28 Feb 2007 00:59:19 +0000 (00:59 +0000)]
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

17 years agoFix test case.
Evan Cheng [Wed, 28 Feb 2007 00:36:33 +0000 (00:36 +0000)]
Fix test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34710 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTemporary: make R12 available in ARM mode if RegScavenger is being used.
Evan Cheng [Wed, 28 Feb 2007 00:22:44 +0000 (00:22 +0000)]
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

17 years agoStart making use of RegScavenger.
Evan Cheng [Wed, 28 Feb 2007 00:21:58 +0000 (00:21 +0000)]
Start making use of RegScavenger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34708 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPEI now passes a RegScavenger ptr to eliminateFrameIndex.
Evan Cheng [Wed, 28 Feb 2007 00:21:17 +0000 (00:21 +0000)]
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

17 years agoMRegisterInfo disowns RegScavenger. It's immutable.
Evan Cheng [Wed, 28 Feb 2007 00:17:36 +0000 (00:17 +0000)]
MRegisterInfo disowns RegScavenger. It's immutable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34706 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoJoin two lines that can be joined.
Reid Spencer [Tue, 27 Feb 2007 23:49:07 +0000 (23:49 +0000)]
Join two lines that can be joined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34705 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd some syntactic sugar.
Reid Spencer [Tue, 27 Feb 2007 23:47:33 +0000 (23:47 +0000)]
Add some syntactic sugar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34704 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPull out the stops.
Reid Spencer [Tue, 27 Feb 2007 23:33:03 +0000 (23:33 +0000)]
Pull out the stops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34703 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemove some redundancy.
Reid Spencer [Tue, 27 Feb 2007 23:27:26 +0000 (23:27 +0000)]
Remove some redundancy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34702 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMinor tweak. Allocate r0 to r3 in reverse order, r3 is least likely to be livein...
Evan Cheng [Tue, 27 Feb 2007 23:03:55 +0000 (23:03 +0000)]
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

17 years agoSome more code clean up.
Evan Cheng [Tue, 27 Feb 2007 22:58:43 +0000 (22:58 +0000)]
Some more code clean up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34700 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoreenable generation of CC info
Chris Lattner [Tue, 27 Feb 2007 22:12:19 +0000 (22:12 +0000)]
reenable generation of CC info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34699 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoOops.
Evan Cheng [Tue, 27 Feb 2007 22:10:52 +0000 (22:10 +0000)]
Oops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34698 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoreapply
Chris Lattner [Tue, 27 Feb 2007 22:08:27 +0000 (22:08 +0000)]
reapply

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34697 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago*** empty log message ***
Chris Lattner [Tue, 27 Feb 2007 22:05:51 +0000 (22:05 +0000)]
*** empty log message ***

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34696 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement countLeadingOnes() and getMinSignedBits(). This helps to minimize
Reid Spencer [Tue, 27 Feb 2007 21:59:26 +0000 (21:59 +0000)]
Implement countLeadingOnes() and getMinSignedBits(). This helps to minimize
the bit width of negative numbers by computing the minimum bit width for a
negative value. E.g. 0x1800000000000000 could be just 0x8000000000000000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34695 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBack out previous commit temporarily.
Evan Cheng [Tue, 27 Feb 2007 21:47:22 +0000 (21:47 +0000)]
Back out previous commit temporarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34694 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBacking out
Evan Cheng [Tue, 27 Feb 2007 21:44:08 +0000 (21:44 +0000)]
Backing out
CodeGenTarget.cpp updated: 1.82 -> 1.83
Record.cpp updated: 1.55 -> 1.56
Record.h updated: 1.59 -> 1.60
TableGen.cpp updated: 1.47 -> 1.48
It's missing CallingConvEmitter.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34693 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoLet MRegisterInfo now owns RegScavenger; eliminateFrameIndex must preserve register...
Evan Cheng [Tue, 27 Feb 2007 21:12:35 +0000 (21:12 +0000)]
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

17 years agoLet MRegisterInfo now owns RegScavenger.
Evan Cheng [Tue, 27 Feb 2007 21:10:33 +0000 (21:10 +0000)]
Let MRegisterInfo now owns RegScavenger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34691 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRegScavenger interface change to make it more flexible.
Evan Cheng [Tue, 27 Feb 2007 21:09:48 +0000 (21:09 +0000)]
RegScavenger interface change to make it more flexible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34690 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoLet MRegisterInfo owns RegScavenger.
Evan Cheng [Tue, 27 Feb 2007 21:08:07 +0000 (21:08 +0000)]
Let MRegisterInfo owns RegScavenger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34689 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPass IsImp, IsKill, and IsDead to ChangeToRegister.
Evan Cheng [Tue, 27 Feb 2007 21:06:57 +0000 (21:06 +0000)]
Pass IsImp, IsKill, and IsDead to ChangeToRegister.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34688 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThis test passes on x86/Linux now.
Reid Spencer [Tue, 27 Feb 2007 20:46:44 +0000 (20:46 +0000)]
This test passes on x86/Linux now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34686 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement CCMatchIfCC in terms of CCMatchIf
Chris Lattner [Tue, 27 Feb 2007 20:45:02 +0000 (20:45 +0000)]
implement CCMatchIfCC in terms of CCMatchIf

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34685 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agobuild cc info
Chris Lattner [Tue, 27 Feb 2007 20:44:31 +0000 (20:44 +0000)]
build cc info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34684 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotarget for generating CC info
Chris Lattner [Tue, 27 Feb 2007 20:44:12 +0000 (20:44 +0000)]
target for generating CC info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34683 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoinitial support for calling convention generation, still unfinished.
Chris Lattner [Tue, 27 Feb 2007 20:43:37 +0000 (20:43 +0000)]
initial support for calling convention generation, still unfinished.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34682 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdjust to changes in the APInt interface.
Reid Spencer [Tue, 27 Feb 2007 20:25:25 +0000 (20:25 +0000)]
Adjust to changes in the APInt interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34681 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImprove APInt interface:
Reid Spencer [Tue, 27 Feb 2007 20:24:31 +0000 (20:24 +0000)]
Improve APInt interface:
1. Add unsigned and signed versions of methods so a "bool" argument doesn't
   need to be passed in.
2. Make the various getMin/getMax functions all be inline since they are
   so simple.
3. Simplify sdiv and srem code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34680 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoConform to single person attribution in file comment.
Reid Spencer [Tue, 27 Feb 2007 19:31:09 +0000 (19:31 +0000)]
Conform to single person attribution in file comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34678 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1205:
Reid Spencer [Tue, 27 Feb 2007 19:29:54 +0000 (19:29 +0000)]
For PR1205:
Implement review feedback:
1. Use new APInt::RoundDoubleToAPInt interface to specify the bit width so
   that we don't have to truncate or extend in constant folding.
2. Fix a pasteo in SDiv that prevented a check for overflow.
3. Fix the shift operators: undef happens when the shift amount is equal
   to the bitwidth.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34677 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUpdate for constant folding now generating undef and overflow correctly.
Reid Spencer [Tue, 27 Feb 2007 19:26:40 +0000 (19:26 +0000)]
Update for constant folding now generating undef and overflow correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34676 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoShifting by the bit width now produces undef, not 0.
Reid Spencer [Tue, 27 Feb 2007 19:22:36 +0000 (19:22 +0000)]
Shifting by the bit width now produces undef, not 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34675 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago1. Fix three serious bugs in the comparison code.
Reid Spencer [Tue, 27 Feb 2007 18:23:40 +0000 (18:23 +0000)]
1. Fix three serious bugs in the comparison code.
2. Change RoundDoubleToAPInt to take a bit width parameter. Use that
   parameter to limit the bit width of the result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34673 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAllow the RoundDoubleToAPInt function to specify a width to use.
Reid Spencer [Tue, 27 Feb 2007 18:22:31 +0000 (18:22 +0000)]
Allow the RoundDoubleToAPInt function to specify a width to use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34672 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoa note
Chris Lattner [Tue, 27 Feb 2007 17:21:09 +0000 (17:21 +0000)]
a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34670 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake getPassManagerType() const.
Devang Patel [Tue, 27 Feb 2007 15:00:39 +0000 (15:00 +0000)]
Make getPassManagerType() const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34669 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix parenthesis for BCTRL_{ELF|Macho} test.
Nicolas Geoffray [Tue, 27 Feb 2007 13:10:41 +0000 (13:10 +0000)]
Fix parenthesis for BCTRL_{ELF|Macho} test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34668 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDifferentiate between the MachO and the ELF ABI the CALL instruction.
Nicolas Geoffray [Tue, 27 Feb 2007 13:01:19 +0000 (13:01 +0000)]
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

17 years agoDuplicate use of LR, take 2.
Jim Laskey [Tue, 27 Feb 2007 11:55:45 +0000 (11:55 +0000)]
Duplicate use of LR, take 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34666 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded myself
Nicolas Geoffray [Tue, 27 Feb 2007 10:44:42 +0000 (10:44 +0000)]
Added myself

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34665 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAllow the AsmWriter to print out arbitrary precision integers.
Reid Spencer [Tue, 27 Feb 2007 08:34:09 +0000 (08:34 +0000)]
Allow the AsmWriter to print out arbitrary precision integers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34664 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCorrect the implelmentation of ConstantInt::getAllOnesValue() for bit
Reid Spencer [Tue, 27 Feb 2007 07:57:53 +0000 (07:57 +0000)]
Correct the implelmentation of ConstantInt::getAllOnesValue() for bit
widths > 64 bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34663 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoGet rid of extraneous // in file comment.
Reid Spencer [Tue, 27 Feb 2007 07:35:18 +0000 (07:35 +0000)]
Get rid of extraneous // in file comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34662 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd calling convention info
Chris Lattner [Tue, 27 Feb 2007 06:59:52 +0000 (06:59 +0000)]
Add calling convention info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34661 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1205:
Reid Spencer [Tue, 27 Feb 2007 06:23:51 +0000 (06:23 +0000)]
For PR1205:
Implement constant folding via APInt instead of uint64_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34660 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomove target independent calling convention stuff to TargetCallingConv.td
Chris Lattner [Tue, 27 Feb 2007 05:57:32 +0000 (05:57 +0000)]
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

17 years agofill in some holes
Chris Lattner [Tue, 27 Feb 2007 05:51:05 +0000 (05:51 +0000)]
fill in some holes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34658 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoswitch x86-64 return value lowering over to using same mechanism as argument
Chris Lattner [Tue, 27 Feb 2007 05:28:59 +0000 (05:28 +0000)]
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

17 years agoMinor refactoring of CC Lowering interfaces
Chris Lattner [Tue, 27 Feb 2007 05:13:54 +0000 (05:13 +0000)]
Minor refactoring of CC Lowering interfaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34656 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomove CC Lowering stuff to its own public interface
Chris Lattner [Tue, 27 Feb 2007 04:43:02 +0000 (04:43 +0000)]
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

17 years agorefactor x86-64 argument lowering yet again, this time eliminating templates,
Chris Lattner [Tue, 27 Feb 2007 04:18:15 +0000 (04:18 +0000)]
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

17 years agoConstantFolding.cpp/h -> ConstantFold.cpp/h to avoid confusion with
Chris Lattner [Tue, 27 Feb 2007 03:05:06 +0000 (03:05 +0000)]
ConstantFolding.cpp/h -> ConstantFold.cpp/h to avoid confusion with
lib/Analysis/ConstantFolding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34653 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBacking out Jim's LR spill changes. This was causing llvm-gcc bootstrapping
Evan Cheng [Tue, 27 Feb 2007 02:55:29 +0000 (02:55 +0000)]
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

17 years agoXFAIL this on x86-Linux until its fixed.
Reid Spencer [Tue, 27 Feb 2007 02:45:12 +0000 (02:45 +0000)]
XFAIL this on x86-Linux until its fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34651 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemove test cases that produce undefined results.
Reid Spencer [Tue, 27 Feb 2007 02:34:02 +0000 (02:34 +0000)]
Remove test cases that produce undefined results.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34650 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoforward() should not increment internal iterator. Its client may insert instruction...
Evan Cheng [Tue, 27 Feb 2007 01:58:48 +0000 (01:58 +0000)]
forward() should not increment internal iterator. Its client may insert instruction between now and next forward() call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34649 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSimplify and document RoundDoubleToAPInt.
Reid Spencer [Tue, 27 Feb 2007 01:28:10 +0000 (01:28 +0000)]
Simplify and document RoundDoubleToAPInt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34648 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1205:
Reid Spencer [Mon, 26 Feb 2007 23:54:03 +0000 (23:54 +0000)]
For PR1205:
Implement the first step towards arbitrary precision integer support in
LLVM. The APInt class provides arbitrary precision arithmetic and value
representation. This patch changes ConstantInt to use APInt as its value
representation without supporting bit widths > 64 yet. That change will
come after ConstantFolding handles bit widths > 64 bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34647 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago1. Make sure all delete operators of arrays use the array form of delete.
Reid Spencer [Mon, 26 Feb 2007 23:38:21 +0000 (23:38 +0000)]
1. Make sure all delete operators of arrays use the array form of delete.
2. Rewrite operator=(const APInt& RHS) to allow the RHS to be a different
   bit width than the LHS. This makes it possible to use APInt as the key
   of a DenseMap, as needed for the IntConstants map in Constants.cpp
3. Fix operator=(uint64_t) to clear unused bits in case the client assigns
   a value that has more bits than the APInt allows.
4. Assert that bit widths are equal in operator==
5. Revise getHashValue() to put the bit width in the low order six bits.
   This should help to make i1 0, i2 0, ... i64 0 all distinct in the
   IntConstants DenseMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34646 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoJoining an interval with a dead copy instruction. Shorten the live range to the last...
Evan Cheng [Mon, 26 Feb 2007 21:37:37 +0000 (21:37 +0000)]
Joining an interval with a dead copy instruction. Shorten the live range to the last use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34645 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix indentation.
Reid Spencer [Mon, 26 Feb 2007 21:06:05 +0000 (21:06 +0000)]
Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34643 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement the getHashValue method.
Reid Spencer [Mon, 26 Feb 2007 21:02:27 +0000 (21:02 +0000)]
Implement the getHashValue method.
Fix toString use of getValue to use getZExtValue()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34642 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago1. Split getValue() into getSExtValue() and getZExtValue() to match
Reid Spencer [Mon, 26 Feb 2007 20:57:12 +0000 (20:57 +0000)]
1. Split getValue() into getSExtValue() and getZExtValue() to match
   ConstantInt better.
2. Add a getHashValue() method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34641 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse efficient container SmallPtrSet
Devang Patel [Mon, 26 Feb 2007 20:22:50 +0000 (20:22 +0000)]
Use efficient container SmallPtrSet

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34640 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoalways lower to RETFLAG, never leave it as just ret.
Chris Lattner [Mon, 26 Feb 2007 19:44:02 +0000 (19:44 +0000)]
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

17 years agoDo not unswitch loop on same value again and again.
Devang Patel [Mon, 26 Feb 2007 19:31:58 +0000 (19:31 +0000)]
Do not unswitch loop on same value again and again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34638 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix attribution
Chris Lattner [Mon, 26 Feb 2007 18:56:07 +0000 (18:56 +0000)]
fix attribution

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34637 91177308-0d34-0410-b5e6-96231b3b80d8