1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

3195 Commits

Author SHA1 Message Date
Jim Laskey
8cc5a0d2fe Need to handle static declarations properly.
llvm-svn: 33022
2007-01-08 22:15:18 +00:00
Chris Lattner
3e42a4147a llvm 2.0 doesn't support llvm.isunordered.*
llvm-svn: 32994
2007-01-07 08:52:43 +00:00
Chris Lattner
b6f6d3a00c remove support for llvm.isunordered
llvm-svn: 32992
2007-01-07 08:37:22 +00:00
Chris Lattner
aa5051ae7f Change the interface to Module::getOrInsertFunction to be easier to use,to resolve PR1088, and to help PR411.
This simplifies many clients also

llvm-svn: 32989
2007-01-07 08:12:01 +00:00
Evan Cheng
d378a229c5 Expand fcopysign to the bitwise sequence if select is marked as expensive.
llvm-svn: 32940
2007-01-05 23:33:44 +00:00
Evan Cheng
cb71f273ff Bug in ExpandFCOPYSIGNToBitwiseOps(). Clear the old sign bit of operand 0
before or'ing in the sign bit of operand 1.

llvm-svn: 32930
2007-01-05 21:31:51 +00:00
Evan Cheng
237ec557ae CopyToReg source operand can be a register as well. e.g. Copy from GlobalBaseReg.
llvm-svn: 32929
2007-01-05 20:59:06 +00:00
Evan Cheng
8d09e52569 GEP subscript is interpreted as a signed value.
llvm-svn: 32888
2007-01-05 01:46:20 +00:00
Chris Lattner
45c7c69c77 fix PowerPC/2007-01-04-ArgExtension.ll, a bug handling K&R prototypes with
the recent signless changes.

llvm-svn: 32884
2007-01-04 22:22:37 +00:00
Evan Cheng
7674a71585 Expand fcopysign to a series of bitwise of operations when it's profitable to
do so.

llvm-svn: 32881
2007-01-04 21:56:39 +00:00
Reid Spencer
20d9040d17 Legalizer doesn't do an ANY_EXTEND if we don't ask for one so make sure
that we default to an ANY_EXTEND if no parameter attribute is set on the
result value of a function.

llvm-svn: 32836
2007-01-03 16:49:33 +00:00
Jim Laskey
4308b27af2 NULL names should pass validation.
llvm-svn: 32835
2007-01-03 13:46:20 +00:00
Jim Laskey
c0dfc41747 Silence warning.
llvm-svn: 32834
2007-01-03 13:36:40 +00:00
Reid Spencer
87c68ceb32 Restore previous behavior of defaulting to ZEXT. This works around two
things: (1) preventing PR1071 and (2) working around missing parameter
attributes for bool type. (2) will be fixed shortly. When PR1071 is fixed,
this patch should be undone.

llvm-svn: 32831
2007-01-03 05:03:05 +00:00
Reid Spencer
92c52fe025 Two changes:
1. Switch expression and cases are compared signed and are sign extended.
2. For function results needing extended, do SIGN_EXTEND if the SExtAttribute
   is set and ZERO_EXTEND if the ZExtAttribute is set, otherwise just let
   the Legalizer do ANY_EXTEND.
This fixes the recent regression in kimwitu++ and probably the llvm-gcc
bootstrap issue we had today.

llvm-svn: 32830
2007-01-03 04:25:33 +00:00
Reid Spencer
206bcb64c1 Clean up from recent changes. Comment the new parameter to ExpandLibCall.
Consolidate some lines of code and remove duplication.

llvm-svn: 32829
2007-01-03 04:22:32 +00:00
Evan Cheng
09bcc91be2 - Fixing naming inconsistency: calleesave -> calleesaved.
- Make use of spillCalleeSavedRegisters() and restoreCalleeSavedRegisters().

llvm-svn: 32822
2007-01-02 21:31:15 +00:00
Reid Spencer
dda168599d For PR950:
Three changes:
1. Convert signed integer types to signless versions.
2. Implement the @sext and @zext parameter attributes. Previously the
   type of an function parameter was used to determine whether it should
   be sign extended or zero extended before the call. This information is
   now communicated via the function type's parameter attributes.
3. The interface to LowerCallTo had to be changed in order to accommodate
   the parameter attribute information. Although it would have been
   convenient to pass in the FunctionType itself, there isn't always one
   present in the caller. Consequently, a signedness indication for the
   result type and for each parameter was provided for in the interface
   to this method. All implementations were changed to make the adjustment
   necessary.

llvm-svn: 32788
2006-12-31 05:55:36 +00:00
Reid Spencer
4428c3483b For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.

llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Jim Laskey
7ee1bda593 Need to walk the derived chain of typedefs to get actual size.
llvm-svn: 32744
2006-12-22 20:03:42 +00:00
Evan Cheng
a70d66df55 Debug dump error.
llvm-svn: 32743
2006-12-22 02:04:05 +00:00
Reid Spencer
3dc538fe7c Just print integer constants as signed values. The actual signedness
doesn't matter as it is determined in the way the constant is used.

llvm-svn: 32733
2006-12-21 19:04:23 +00:00
Reid Spencer
66611d3e06 Simplify all the casting business and get rid of isSigned().
llvm-svn: 32731
2006-12-21 08:28:31 +00:00
Evan Cheng
564ef2e7f4 getLoad() and getStore() calls missed SVOffset operand. Thanks to Dan Gohman
for pointing it out!

llvm-svn: 32712
2006-12-20 01:27:29 +00:00
Chris Lattner
a975b95adb Eliminate static ctors from Statistics
llvm-svn: 32698
2006-12-19 22:41:21 +00:00
Anton Korobeynikov
391dc74af0 Fix for PR1059: http://llvm.org/PR1059
llvm-svn: 32685
2006-12-19 21:04:20 +00:00
Evan Cheng
9e0ae42e6d May need to promote the operand (either sign_extend_inreg or and) before
expanding a {s|u}int_to_fp.

llvm-svn: 32665
2006-12-19 01:44:04 +00:00
Evan Cheng
975589f630 LegalizeSetCCOperands() may end up inserting libcalls. They need to be
properly serialized. Do not clear LastCallSEQ_END until that is done.

llvm-svn: 32659
2006-12-18 22:55:34 +00:00
Reid Spencer
f6bd59ba81 Convert the last uses of CastInst::createInferredCast to a normal cast
creation. These changes are still temporary but at least this pushes
knowledge of signedness out closer to where it can be determined properly
and allows signedness to be removed from VMCore.

llvm-svn: 32654
2006-12-18 08:47:13 +00:00
Rafael Espindola
08c0825f18 move ExtWeakSymbols to AsmPrinter
llvm-svn: 32648
2006-12-18 03:37:18 +00:00
Bill Wendling
34f4c12ae7 Fixed so that it dereferences the ostream pointer.
llvm-svn: 32640
2006-12-17 11:15:53 +00:00
Bill Wendling
7f6a73eb5c Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.

llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Chris Lattner
8b1e4d1edf Fix PR1049 and CodeGen/Generic/2006-12-16-InlineAsmCrash.ll
by producing target constants instead of constants.  Constants can get
selected to li/movri instructions, which causes the scheduler to explode.

llvm-svn: 32633
2006-12-16 21:14:48 +00:00
Evan Cheng
7775b33a32 Cannot combine an indexed load / store any further.
llvm-svn: 32629
2006-12-16 06:25:23 +00:00
Evan Cheng
a966bf47ec Expand FP undef
llvm-svn: 32623
2006-12-16 02:20:50 +00:00
Jeff Cohen
c396e18e8e The best unbreakage yet, addressing Bill's concerns.
llvm-svn: 32622
2006-12-16 02:15:42 +00:00
Evan Cheng
d4fd650c5f Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.
llvm-svn: 32621
2006-12-16 02:10:30 +00:00
Evan Cheng
b0292a750a Expand fabs / fneg to and / xor.
llvm-svn: 32619
2006-12-16 00:52:40 +00:00
Jeff Cohen
03161dd132 An even better unbreakage...
llvm-svn: 32617
2006-12-15 22:57:14 +00:00
Evan Cheng
ea9ab75427 Fix select_cc, select expansion to soft-fp bugs.
llvm-svn: 32616
2006-12-15 22:42:55 +00:00
Jim Laskey
0809c79c60 This code was usurping the sextload expand in teh legalizer. Just make
sure the right conditions are checked.

llvm-svn: 32611
2006-12-15 21:38:30 +00:00
Chris Lattner
3e789e232f silence a bogus warning
llvm-svn: 32597
2006-12-15 07:36:19 +00:00
Evan Cheng
a221cb0b2c Minor clean up.
llvm-svn: 32593
2006-12-15 06:41:01 +00:00
Evan Cheng
4e661ebef9 Expand FP compares to soft-fp call(s)
llvm-svn: 32590
2006-12-15 02:59:56 +00:00
Jim Laskey
19b276f67f 1. Tidy up jump table info.
2. Allow the jit to handle PIC relocable jump tables.

llvm-svn: 32581
2006-12-14 19:17:33 +00:00
Evan Cheng
2f7cae1f57 Fix a long-standing spiller bug:
If a spillslot value is available in a register, and there is a noop copy that
targets that register, the spiller correctly decide not to invalidate the
spillslot register.

However, even though the noop copy does not clobbers the value. It does start a
new intersecting live range. That means the spillslot register is available for
use but should not be reused for a two-address instruction modref operand which
would clobber the new live range.

When we remove the noop copy, update the available information by clearing the
canClobber bit.

llvm-svn: 32576
2006-12-14 07:54:05 +00:00
Evan Cheng
10389e802b More soft-fp work.
llvm-svn: 32559
2006-12-13 20:57:08 +00:00
Evan Cheng
e200668366 Expand (f64 extload f32) to (f64 fp_ext (load f32)) if f64 type action is expand.
llvm-svn: 32527
2006-12-13 03:19:57 +00:00
Evan Cheng
d5d848048f Expand fsqrt, fsin, and fcos to libcalls.
llvm-svn: 32526
2006-12-13 02:38:13 +00:00
Evan Cheng
f72f8a7730 Expand f32 / f64 to i32 / i64 conversion to soft-fp library calls.
llvm-svn: 32523
2006-12-13 01:57:55 +00:00