1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

30604 Commits

Author SHA1 Message Date
Reid Spencer
d86182b19b Add an abs() function to get the absolute value.
llvm-svn: 34819
2007-03-01 23:37:09 +00:00
Reid Spencer
f8f8413839 Combine two lines that can be.
llvm-svn: 34818
2007-03-01 23:30:25 +00:00
Reid Spencer
c5d33cef76 Remove virtual keyword from method that doesn't need to be virtual.
llvm-svn: 34817
2007-03-01 23:20:52 +00:00
Reid Spencer
ee77d22f26 Make it possible to create an SCEVUnknown from an APInt as well as an int.
llvm-svn: 34816
2007-03-01 22:28:51 +00:00
Reid Spencer
e5456dea52 Although probably not necessary, guard against a potential assertion by
using isNullValue() instead of getZExtValue() == 0.

llvm-svn: 34815
2007-03-01 21:54:37 +00:00
Reid Spencer
3a7689fe22 Use isUnitValue() instead of getZExtValue() == 1 which will prevent an
assert if the ConstantInt's value is large.

llvm-svn: 34814
2007-03-01 21:51:23 +00:00
Reid Spencer
2ce72a4bd8 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.

llvm-svn: 34813
2007-03-01 21:50:41 +00:00
Owen Anderson
070c37407c Use GCC intrinsics when available, and use smarter fallbacks when not.
llvm-svn: 34812
2007-03-01 21:16:30 +00:00
Reid Spencer
0814741c79 Clarify the use of getValue/getSExtValue/getZExtValue and add the new
APInt constructor.

llvm-svn: 34811
2007-03-01 21:05:33 +00:00
Reid Spencer
327ae8b712 Use APInt conversion to string so the result is correct regardless of the
bit width of the ConstantInt being converted.

llvm-svn: 34810
2007-03-01 21:00:32 +00:00
Reid Spencer
b7ff81c0dc Make output for ConstantInt construction correct for any bitwidth.
llvm-svn: 34809
2007-03-01 20:55:43 +00:00
Reid Spencer
5790924b21 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.

llvm-svn: 34808
2007-03-01 20:44:23 +00:00
Reid Spencer
003170430b Add doubleToBits and floatToBits methods.
llvm-svn: 34807
2007-03-01 20:39:01 +00:00
Reid Spencer
5d9574f37e Use modern variable name. ConstantUnsignedInt is long since dead. No
functional change with this patch.

llvm-svn: 34806
2007-03-01 20:27:41 +00:00
Jim Laskey
0b6492d5df Emit eh filter info.
llvm-svn: 34805
2007-03-01 20:26:43 +00:00
Jim Laskey
73e3ad1b10 Collect eh filter info.
llvm-svn: 34804
2007-03-01 20:25:32 +00:00
Reid Spencer
d7c97384ac Use a simpler constructor for ConstantInt.
llvm-svn: 34803
2007-03-01 20:25:31 +00:00
Jim Laskey
5f932644e9 Lower eh filter intrinsic.
llvm-svn: 34802
2007-03-01 20:24:30 +00:00
Jim Laskey
88c98a4128 Add eh filter intrinsic.
llvm-svn: 34801
2007-03-01 20:23:39 +00:00
Reid Spencer
90b6227b81 Add bitsToDouble and bitsToFloat methods for re-interpretation of bits as FP.
llvm-svn: 34800
2007-03-01 20:06:51 +00:00
Reid Spencer
381752cb34 Wrap a long line.
llvm-svn: 34799
2007-03-01 19:48:16 +00:00
Reid Spencer
30758bbe85 Avoid a potential assert out if the loop increment is > 64 bits.
llvm-svn: 34798
2007-03-01 19:45:00 +00:00
Reid Spencer
29c98b589c Regenerate.
llvm-svn: 34797
2007-03-01 19:41:47 +00:00
Reid Spencer
30eac3e0b1 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.

llvm-svn: 34796
2007-03-01 19:33:52 +00:00
Reid Spencer
288f1db60d Construct ConstantInt with simpler constructor.
llvm-svn: 34795
2007-03-01 19:32:33 +00:00
Reid Spencer
125af87a25 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.

llvm-svn: 34794
2007-03-01 19:32:01 +00:00
Reid Spencer
b0a7bfa105 Use a simpler constructor when constructing ConstantInst.
llvm-svn: 34793
2007-03-01 19:31:12 +00:00
Reid Spencer
b4e877c488 Drop the ConstantInt(const Type&, const APInt&) constructor. It is
redundant and more verbose than the ConstantInt(const APInt&) constructor.

llvm-svn: 34792
2007-03-01 19:30:34 +00:00
Reid Spencer
c94231581b Make the static table of results in sqrt const.
llvm-svn: 34791
2007-03-01 17:47:31 +00:00
Reid Spencer
18d663b62c Fix last night's 445.gobmk breakage which was caused by comparison of
APInt's of unequal bitwidth.

llvm-svn: 34790
2007-03-01 17:17:21 +00:00
Reid Spencer
6a95676875 Add methods for bit width modification: sextOrTrunc, zextOrTrunc.
llvm-svn: 34789
2007-03-01 17:15:32 +00:00
Anton Korobeynikov
eaf27d276a Ensure that fastcall'ed function is correctly mangled & stack is
properly aligned

llvm-svn: 34788
2007-03-01 16:29:22 +00:00
Nicolas Geoffray
4b5b81198a Implemented the frameaddress intrinsic for PPC.
llvm-svn: 34787
2007-03-01 13:11:38 +00:00
Evan Cheng
7d470c14cf Delete register scavenger when done with it.
llvm-svn: 34786
2007-03-01 10:23:33 +00:00
Evan Cheng
07dcde8ba2 Use a spilled free callee-saved register as scratch register.
llvm-svn: 34785
2007-03-01 08:57:52 +00:00
Evan Cheng
0aa68b9246 Add a version of FindUnusedReg that restrict search to a specific set of registers.
llvm-svn: 34784
2007-03-01 08:56:24 +00:00
Evan Cheng
8d3d4155e5 - Track which callee-saved registers are spilled.
- Some code clean up.

llvm-svn: 34783
2007-03-01 08:26:31 +00:00
Reid Spencer
3f3487918c 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.

llvm-svn: 34782
2007-03-01 07:54:15 +00:00
Evan Cheng
f771a323c2 Switch from std::vector<bool> to BitVector.
llvm-svn: 34781
2007-03-01 07:52:44 +00:00
Reid Spencer
036051c002 APIntify various computations in ScalarEvolution
llvm-svn: 34780
2007-03-01 07:25:48 +00:00
Reid Spencer
0d77fe7f06 Use a real table in sqrt to shorten and quicken the code.
Thanks for the idea Chris.

llvm-svn: 34779
2007-03-01 06:23:32 +00:00
Bill Wendling
2aabf75e82 Get rid of verboten <iostream> include.
llvm-svn: 34777
2007-03-01 06:05:39 +00:00
Owen Anderson
cbbf9aa6b0 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.

llvm-svn: 34776
2007-03-01 05:41:28 +00:00
Reid Spencer
b6dd32889e Add a square root function.
llvm-svn: 34775
2007-03-01 05:39:56 +00:00
Reid Spencer
32d0051c64 Reduce #includage by taking a method out of line.
llvm-svn: 34774
2007-03-01 04:02:06 +00:00
Evan Cheng
ad431d7a94 A restore is promoted to copy (or deleted entirely), remove the kill from the last use of the targetted register.
llvm-svn: 34773
2007-03-01 02:27:30 +00:00
Evan Cheng
ce7f2618a9 Interface clean up.
llvm-svn: 34772
2007-03-01 02:25:51 +00:00
Reid Spencer
4937dcdf1f Add an IntegerType::getMask() method to get an APInt mask for the type.
llvm-svn: 34771
2007-03-01 02:25:03 +00:00
Evan Cheng
15a878202b Interface clean up.
llvm-svn: 34770
2007-03-01 02:19:39 +00:00
Evan Cheng
b2afac27e9 Clean up interface.
llvm-svn: 34769
2007-03-01 02:18:06 +00:00