oota-llvm.git
17 years agoUse a better algorithm for rounding sqrt results. Change the FIXME about
Reid Spencer [Fri, 2 Mar 2007 04:21:55 +0000 (04:21 +0000)]
Use a better algorithm for rounding sqrt results. Change the FIXME about
this to a NOTE: because pari/gp results start to get rounded incorrectly
after 192 bits of precision. APInt and pari/gp never differ by more than
1, but APInt is more accurate because it does not lose precision after 192
bits as does pari/gp.

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

17 years agoImplement unionWith.
Nick Lewycky [Fri, 2 Mar 2007 03:33:05 +0000 (03:33 +0000)]
Implement unionWith.

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

17 years agoswitch the inliner from being recursive to being iterative.
Chris Lattner [Fri, 2 Mar 2007 03:11:20 +0000 (03:11 +0000)]
switch the inliner from being recursive to being iterative.

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

17 years agoFix an unequal bitwidth issue.
Reid Spencer [Fri, 2 Mar 2007 02:59:25 +0000 (02:59 +0000)]
Fix an unequal bitwidth issue.

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

17 years agogrammaro
Chris Lattner [Fri, 2 Mar 2007 02:57:34 +0000 (02:57 +0000)]
grammaro

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

17 years agoMake it 64-bit safe.
Evan Cheng [Fri, 2 Mar 2007 02:31:37 +0000 (02:31 +0000)]
Make it 64-bit safe.

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

17 years agoAdd a FIXME
Reid Spencer [Fri, 2 Mar 2007 02:01:34 +0000 (02:01 +0000)]
Add a FIXME

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

17 years agoFix a typo.
Reid Spencer [Fri, 2 Mar 2007 01:31:31 +0000 (01:31 +0000)]
Fix a typo.

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

17 years agoFix a problem where shifting by 64-bits leads to incorrect results on PPC
Reid Spencer [Fri, 2 Mar 2007 01:19:42 +0000 (01:19 +0000)]
Fix a problem where shifting by 64-bits leads to incorrect results on PPC
but not on X86 becuase shift by word size is "undefined".

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

17 years agoeliminate unnecessary reset of SP in epilog on darwin
Dale Johannesen [Fri, 2 Mar 2007 01:17:17 +0000 (01:17 +0000)]
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

17 years agoReverse a premature commital.
Reid Spencer [Fri, 2 Mar 2007 00:31:39 +0000 (00:31 +0000)]
Reverse a premature commital.

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

17 years agoPrefer non-virtual calls to ConstantInt::isZero over virtual calls to
Reid Spencer [Fri, 2 Mar 2007 00:28:52 +0000 (00:28 +0000)]
Prefer non-virtual calls to ConstantInt::isZero over virtual calls to
Constant::isNullValue() in situations where it is possible.

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

17 years agoAdd a non-virtual test for zero, isZero, and rename isUnitValue isOne.
Reid Spencer [Fri, 2 Mar 2007 00:27:06 +0000 (00:27 +0000)]
Add a non-virtual test for zero, isZero, and rename isUnitValue isOne.
These will be used in upcoming patches to avoid virtual function call when
the client knows it is a ConstantInt.

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

17 years agoAdd an abs() function to get the absolute value.
Reid Spencer [Thu, 1 Mar 2007 23:37:09 +0000 (23:37 +0000)]
Add an abs() function to get the absolute value.

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

17 years agoCombine two lines that can be.
Reid Spencer [Thu, 1 Mar 2007 23:30:25 +0000 (23:30 +0000)]
Combine two lines that can be.

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

17 years agoRemove virtual keyword from method that doesn't need to be virtual.
Reid Spencer [Thu, 1 Mar 2007 23:20:52 +0000 (23:20 +0000)]
Remove virtual keyword from method that doesn't need to be virtual.

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

17 years agoMake it possible to create an SCEVUnknown from an APInt as well as an int.
Reid Spencer [Thu, 1 Mar 2007 22:28:51 +0000 (22:28 +0000)]
Make it possible to create an SCEVUnknown from an APInt as well as an int.

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

17 years agoAlthough probably not necessary, guard against a potential assertion by
Reid Spencer [Thu, 1 Mar 2007 21:54:37 +0000 (21:54 +0000)]
Although probably not necessary, guard against a potential assertion by
using isNullValue() instead of getZExtValue() == 0.

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

17 years agoUse isUnitValue() instead of getZExtValue() == 1 which will prevent an
Reid Spencer [Thu, 1 Mar 2007 21:51:23 +0000 (21:51 +0000)]
Use isUnitValue() instead of getZExtValue() == 1 which will prevent an
assert if the ConstantInt's value is large.

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

17 years agoAdd an isUnitValue method for comparison against 1. This just follows a
Reid Spencer [Thu, 1 Mar 2007 21:50:41 +0000 (21:50 +0000)]
Add an isUnitValue method for comparison against 1. This just follows a
common pattern with isNullValue, isAllOnesValue, etc. It also helps to
prevent things like getZExtValue() == 1, which could assert for large
bitwidths.

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

17 years agoUse GCC intrinsics when available, and use smarter fallbacks when not.
Owen Anderson [Thu, 1 Mar 2007 21:16:30 +0000 (21:16 +0000)]
Use GCC intrinsics when available, and use smarter fallbacks when not.

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

17 years agoClarify the use of getValue/getSExtValue/getZExtValue and add the new
Reid Spencer [Thu, 1 Mar 2007 21:05:33 +0000 (21:05 +0000)]
Clarify the use of getValue/getSExtValue/getZExtValue and add the new
APInt constructor.

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

17 years agoUse APInt conversion to string so the result is correct regardless of the
Reid Spencer [Thu, 1 Mar 2007 21:00:32 +0000 (21:00 +0000)]
Use APInt conversion to string so the result is correct regardless of the
bit width of the ConstantInt being converted.

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

17 years agoMake output for ConstantInt construction correct for any bitwidth.
Reid Spencer [Thu, 1 Mar 2007 20:55:43 +0000 (20:55 +0000)]
Make output for ConstantInt construction correct for any bitwidth.

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

17 years agoUse the APInt versions of the bit-wise conversions of float/double to int
Reid Spencer [Thu, 1 Mar 2007 20:44:23 +0000 (20:44 +0000)]
Use the APInt versions of the bit-wise conversions of float/double to int
and back. While this is not strictly necessary, it does pave the way for
future changes in casting. It should now be possible to improve vector
casting to deal with un-equal fp/int sizes.

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

17 years agoAdd doubleToBits and floatToBits methods.
Reid Spencer [Thu, 1 Mar 2007 20:39:01 +0000 (20:39 +0000)]
Add doubleToBits and floatToBits methods.

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

17 years agoUse modern variable name. ConstantUnsignedInt is long since dead. No
Reid Spencer [Thu, 1 Mar 2007 20:27:41 +0000 (20:27 +0000)]
Use modern variable name. ConstantUnsignedInt is long since dead. No
functional change with this patch.

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

17 years agoEmit eh filter info.
Jim Laskey [Thu, 1 Mar 2007 20:26:43 +0000 (20:26 +0000)]
Emit eh filter info.

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

17 years agoCollect eh filter info.
Jim Laskey [Thu, 1 Mar 2007 20:25:32 +0000 (20:25 +0000)]
Collect eh filter info.

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

17 years agoUse a simpler constructor for ConstantInt.
Reid Spencer [Thu, 1 Mar 2007 20:25:31 +0000 (20:25 +0000)]
Use a simpler constructor for ConstantInt.

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

17 years agoLower eh filter intrinsic.
Jim Laskey [Thu, 1 Mar 2007 20:24:30 +0000 (20:24 +0000)]
Lower eh filter intrinsic.

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

17 years agoAdd eh filter intrinsic.
Jim Laskey [Thu, 1 Mar 2007 20:23:39 +0000 (20:23 +0000)]
Add eh filter intrinsic.

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

17 years agoAdd bitsToDouble and bitsToFloat methods for re-interpretation of bits as FP.
Reid Spencer [Thu, 1 Mar 2007 20:06:51 +0000 (20:06 +0000)]
Add bitsToDouble and bitsToFloat methods for re-interpretation of bits as FP.

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

17 years agoWrap a long line.
Reid Spencer [Thu, 1 Mar 2007 19:48:16 +0000 (19:48 +0000)]
Wrap a long line.

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

17 years agoAvoid a potential assert out if the loop increment is > 64 bits.
Reid Spencer [Thu, 1 Mar 2007 19:45:00 +0000 (19:45 +0000)]
Avoid a potential assert out if the loop increment is > 64 bits.

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

17 years agoRegenerate.
Reid Spencer [Thu, 1 Mar 2007 19:41:47 +0000 (19:41 +0000)]
Regenerate.

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

17 years agoThe 64-bit constructor for ConstantInt changes from int64_t to uint64_t.
Reid Spencer [Thu, 1 Mar 2007 19:33:52 +0000 (19:33 +0000)]
The 64-bit constructor for ConstantInt changes from int64_t to uint64_t.
This caused a warning for construction with -1. Avoid the warning by using
-1ULL instead.

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

17 years agoConstruct ConstantInt with simpler constructor.
Reid Spencer [Thu, 1 Mar 2007 19:32:33 +0000 (19:32 +0000)]
Construct ConstantInt with simpler constructor.

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

17 years agoUse a simpler constructor when constructing ConstantInt. Also, replace
Reid Spencer [Thu, 1 Mar 2007 19:32:01 +0000 (19:32 +0000)]
Use a simpler constructor when constructing ConstantInt. Also, replace
verbose code to sext/trunc or zext/trunc and APInt with new methods on
that class.

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

17 years agoUse a simpler constructor when constructing ConstantInst.
Reid Spencer [Thu, 1 Mar 2007 19:31:12 +0000 (19:31 +0000)]
Use a simpler constructor when constructing ConstantInst.

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

17 years agoDrop the ConstantInt(const Type&, const APInt&) constructor. It is
Reid Spencer [Thu, 1 Mar 2007 19:30:34 +0000 (19:30 +0000)]
Drop the ConstantInt(const Type&, const APInt&) constructor. It is
redundant and more verbose than the ConstantInt(const APInt&) constructor.

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

17 years agoMake the static table of results in sqrt const.
Reid Spencer [Thu, 1 Mar 2007 17:47:31 +0000 (17:47 +0000)]
Make the static table of results in sqrt const.

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

17 years agoFix last night's 445.gobmk breakage which was caused by comparison of
Reid Spencer [Thu, 1 Mar 2007 17:17:21 +0000 (17:17 +0000)]
Fix last night's 445.gobmk breakage which was caused by comparison of
APInt's of unequal bitwidth.

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

17 years agoAdd methods for bit width modification: sextOrTrunc, zextOrTrunc.
Reid Spencer [Thu, 1 Mar 2007 17:15:32 +0000 (17:15 +0000)]
Add methods for bit width modification: sextOrTrunc, zextOrTrunc.

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

17 years agoEnsure that fastcall'ed function is correctly mangled & stack is
Anton Korobeynikov [Thu, 1 Mar 2007 16:29:22 +0000 (16:29 +0000)]
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

17 years agoImplemented the frameaddress intrinsic for PPC.
Nicolas Geoffray [Thu, 1 Mar 2007 13:11:38 +0000 (13:11 +0000)]
Implemented the frameaddress intrinsic for PPC.

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

17 years agoDelete register scavenger when done with it.
Evan Cheng [Thu, 1 Mar 2007 10:23:33 +0000 (10:23 +0000)]
Delete register scavenger when done with it.

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

17 years agoUse a spilled free callee-saved register as scratch register.
Evan Cheng [Thu, 1 Mar 2007 08:57:52 +0000 (08:57 +0000)]
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

17 years agoAdd a version of FindUnusedReg that restrict search to a specific set of registers.
Evan Cheng [Thu, 1 Mar 2007 08:56:24 +0000 (08:56 +0000)]
Add a version of FindUnusedReg that restrict search to a specific set of registers.

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

17 years ago- Track which callee-saved registers are spilled.
Evan Cheng [Thu, 1 Mar 2007 08:26:31 +0000 (08:26 +0000)]
- 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

17 years agoRemove the "isSigned" parameters from ConstantRange. It turns out they
Reid Spencer [Thu, 1 Mar 2007 07:54:15 +0000 (07:54 +0000)]
Remove the "isSigned" parameters from ConstantRange. It turns out they
are not needed as the results are the same with or without it.

Patch by Nicholas Lewycky.

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

17 years agoSwitch from std::vector<bool> to BitVector.
Evan Cheng [Thu, 1 Mar 2007 07:52:44 +0000 (07:52 +0000)]
Switch from std::vector<bool> to BitVector.

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

17 years agoAPIntify various computations in ScalarEvolution
Reid Spencer [Thu, 1 Mar 2007 07:25:48 +0000 (07:25 +0000)]
APIntify various computations in ScalarEvolution

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

17 years agoUse a real table in sqrt to shorten and quicken the code.
Reid Spencer [Thu, 1 Mar 2007 06:23:32 +0000 (06:23 +0000)]
Use a real table in sqrt to shorten and quicken the code.
Thanks for the idea Chris.

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

17 years agoGet rid of verboten <iostream> include.
Bill Wendling [Thu, 1 Mar 2007 06:05:39 +0000 (06:05 +0000)]
Get rid of verboten <iostream> include.

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

17 years agoUse the GCC built-in for PopulationCount when it's available, and use a faster
Owen Anderson [Thu, 1 Mar 2007 05:41:28 +0000 (05:41 +0000)]
Use the GCC built-in for PopulationCount when it's available, and use a faster
algorithm when it's not.  This should be particularly noticeable in the
64-bit case.

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

17 years agoAdd a square root function.
Reid Spencer [Thu, 1 Mar 2007 05:39:56 +0000 (05:39 +0000)]
Add a square root function.

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

17 years agoReduce #includage by taking a method out of line.
Reid Spencer [Thu, 1 Mar 2007 04:02:06 +0000 (04:02 +0000)]
Reduce #includage by taking a method out of line.

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

17 years agoA restore is promoted to copy (or deleted entirely), remove the kill from the last...
Evan Cheng [Thu, 1 Mar 2007 02:27:30 +0000 (02:27 +0000)]
A restore is promoted to copy (or deleted entirely), remove the kill from the last use of the targetted register.

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

17 years agoInterface clean up.
Evan Cheng [Thu, 1 Mar 2007 02:25:51 +0000 (02:25 +0000)]
Interface clean up.

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

17 years agoAdd an IntegerType::getMask() method to get an APInt mask for the type.
Reid Spencer [Thu, 1 Mar 2007 02:25:03 +0000 (02:25 +0000)]
Add an IntegerType::getMask() method to get an APInt mask for the type.

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

17 years agoInterface clean up.
Evan Cheng [Thu, 1 Mar 2007 02:19:39 +0000 (02:19 +0000)]
Interface clean up.

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

17 years agoClean up interface.
Evan Cheng [Thu, 1 Mar 2007 02:18:06 +0000 (02:18 +0000)]
Clean up interface.

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

17 years agoOops.
Evan Cheng [Thu, 1 Mar 2007 02:05:35 +0000 (02:05 +0000)]
Oops.

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

17 years agoTrack all joined registers and eliminate unneeded kills after all joining are done.
Evan Cheng [Thu, 1 Mar 2007 02:03:03 +0000 (02:03 +0000)]
Track all joined registers and eliminate unneeded kills after all joining are done.

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

17 years agoMachineBasicBlock fields should not be public.
Evan Cheng [Thu, 1 Mar 2007 02:00:40 +0000 (02:00 +0000)]
MachineBasicBlock fields should not be public.

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

17 years agoFor PR1205:
Reid Spencer [Wed, 28 Feb 2007 23:31:17 +0000 (23:31 +0000)]
For PR1205:
Make GetConstantFactor compute its result using an APInt.

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

17 years agoChanges requested in review of last pass. Also pulled isThumb into a
Dale Johannesen [Wed, 28 Feb 2007 23:20:38 +0000 (23:20 +0000)]
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

17 years agoDoh. ARM::PC is obvious a reserved register.
Evan Cheng [Wed, 28 Feb 2007 23:12:34 +0000 (23:12 +0000)]
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

17 years agoFor PR1205:
Reid Spencer [Wed, 28 Feb 2007 22:03:51 +0000 (22:03 +0000)]
For PR1205:
Adjust to changes in ConstantRange interface.

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

17 years agoMove ConstantRange class to lib/Support from lib/Analysis and make its
Reid Spencer [Wed, 28 Feb 2007 22:02:48 +0000 (22:02 +0000)]
Move ConstantRange class to lib/Support from lib/Analysis and make its
interface not depend on Type or ICmpInst.

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

17 years agoProvide an ICmpInst::makeConstantRange to generate a ConstantRange value
Reid Spencer [Wed, 28 Feb 2007 22:00:54 +0000 (22:00 +0000)]
Provide an ICmpInst::makeConstantRange to generate a ConstantRange value
from a predicate and an APInt. This is removed from ConstantRange class
so that ConstantRange doesn't have to depend on lib/VMCore.

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

17 years agoChain is on second operand.
Jim Laskey [Wed, 28 Feb 2007 20:43:58 +0000 (20:43 +0000)]
Chain is on second operand.

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

17 years agoFor PR1205:
Reid Spencer [Wed, 28 Feb 2007 19:57:34 +0000 (19:57 +0000)]
For PR1205:
Remove ConstantInt from ConstantRange interface and adjust its users to
compensate.

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

17 years agoImplement a convenience method to construct a ConstantInt directly from an
Reid Spencer [Wed, 28 Feb 2007 19:50:21 +0000 (19:50 +0000)]
Implement a convenience method to construct a ConstantInt directly from an
APInt. The implied type is the integer type that corresponds to the bit
width of the APInt.

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

17 years agoFor PR1205:
Reid Spencer [Wed, 28 Feb 2007 18:57:32 +0000 (18:57 +0000)]
For PR1205:
First round of ConstantRange changes. This makes all CR constructors use
only APInt and not use ConstantInt. Clients are adjusted accordingly.

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

17 years agoAdd intelligence about where to break large blocks.
Dale Johannesen [Wed, 28 Feb 2007 18:41:23 +0000 (18:41 +0000)]
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

17 years agoremove dead option
Chris Lattner [Wed, 28 Feb 2007 18:39:53 +0000 (18:39 +0000)]
remove dead option

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

17 years agoEliminate enable-x86-fastcc
Chris Lattner [Wed, 28 Feb 2007 18:38:58 +0000 (18:38 +0000)]
Eliminate enable-x86-fastcc

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

17 years agoHandle mix of personalities.
Jim Laskey [Wed, 28 Feb 2007 18:38:31 +0000 (18:38 +0000)]
Handle mix of personalities.

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

17 years agoProvide a more meaningful name.
Jim Laskey [Wed, 28 Feb 2007 18:37:50 +0000 (18:37 +0000)]
Provide a more meaningful name.

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

17 years agoMERGE_VALUES unnecessary.
Jim Laskey [Wed, 28 Feb 2007 18:37:04 +0000 (18:37 +0000)]
MERGE_VALUES unnecessary.

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

17 years agofastcc -> fastcall
Chris Lattner [Wed, 28 Feb 2007 18:35:36 +0000 (18:35 +0000)]
fastcc -> fastcall

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

17 years agobugfix: fastcall does not require the first two params to be marked 'inreg',
Chris Lattner [Wed, 28 Feb 2007 18:35:11 +0000 (18:35 +0000)]
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

17 years agofastcc -> fastcall
Chris Lattner [Wed, 28 Feb 2007 18:21:50 +0000 (18:21 +0000)]
fastcc -> fastcall

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

17 years agofastcc -> fastcall
Chris Lattner [Wed, 28 Feb 2007 17:42:50 +0000 (17:42 +0000)]
fastcc -> fastcall

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

17 years agoFor PR1205:
Reid Spencer [Wed, 28 Feb 2007 17:36:23 +0000 (17:36 +0000)]
For PR1205:
Convert ConstantRange class to use APInt internally as its value type for
the constant range, instead of ConstantInt.

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

17 years agoMake the trunc/sext/zext methods return APInt& so that these operations
Reid Spencer [Wed, 28 Feb 2007 17:34:32 +0000 (17:34 +0000)]
Make the trunc/sext/zext methods return APInt& so that these operations
can be chained together with other operations.

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

17 years agoMake APInt a little more friendly to its users:
Reid Spencer [Wed, 28 Feb 2007 17:33:36 +0000 (17:33 +0000)]
Make APInt a little more friendly to its users:
  * Add support for + and - of a uint64_t.
  * Make trunc/sext/zext return *this so it can be chained with other ops
  * Add smin, smax, umin, umax functions for getting min/max values.

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

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