Commit Graph

28469 Commits

Author SHA1 Message Date
Reid Spencer 668d90f289 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
Reid Spencer 4800c38a75 Remove the two-argument (inferred cast) form of ConstantExpr::getCast now
that its last uses have been removed.

llvm-svn: 32653
2006-12-18 08:18:46 +00:00
Reid Spencer b83593e3ea Convert the last use of two-argument ConstantExpr::getCast into another
form so we can remove that method from ConstantExpr.

llvm-svn: 32652
2006-12-18 08:16:27 +00:00
Reid Spencer cf0c82f5fa Remove a call to Type::isSigned().
llvm-svn: 32651
2006-12-18 07:58:01 +00:00
Reid Spencer db6b6fb916 Revert last patch. ConstantInt isn't quite ready for signlessness.
llvm-svn: 32650
2006-12-18 04:22:56 +00:00
Reid Spencer a4044f35f4 Determine if the -enable-pic option was given.
llvm-svn: 32649
2006-12-18 04:11:16 +00:00
Rafael Espindola d7998d0e6d move ExtWeakSymbols to AsmPrinter
llvm-svn: 32648
2006-12-18 03:37:18 +00:00
Reid Spencer 0e60d55519 Add a couple little tests for SExt/ZExt of constants of a sign that doesn't
match.

llvm-svn: 32647
2006-12-18 01:11:46 +00:00
Reid Spencer 776311e000 Remove the last use of getUnsignedVersion and getSignedVersion from VMCore.
ConstantInt doesn't care about the sign of the type it represents. It only
cares about the bitwidth so there is no need to make the sign of the type
match the SExt or ZExt constant expression.

llvm-svn: 32646
2006-12-18 01:11:03 +00:00
Reid Spencer f5165ac0d1 Remove some clutter and make it keep going instead of stopping at the
first difference.

llvm-svn: 32645
2006-12-18 00:37:37 +00:00
Chris Lattner 811d75f71a Fix PR1057 (compilation on macos 10.3), patch by Scott Michel!
llvm-svn: 32644
2006-12-17 21:04:02 +00:00
Reid Spencer 8bd6317823 Use a predicate function to identify bitcast of fp and integer instead of
repeating the logic in two different parts of the code.

llvm-svn: 32643
2006-12-17 20:24:50 +00:00
Reid Spencer 174dc2f35e Fix PR1058:
Generate the BITCAST_TEMPORARY regardless of the uses or inlinability of
the instruction. This temporary is needed to perform the instruction, not
provide storage for its results.

llvm-svn: 32642
2006-12-17 18:50:51 +00:00
Bill Wendling 3307244ce9 Added example of how to code print() methods so that they will disappear
from the code if "cnull" is passed into them.

llvm-svn: 32641
2006-12-17 11:40:40 +00:00
Bill Wendling e33ce528da Fixed so that it dereferences the ostream pointer.
llvm-svn: 32640
2006-12-17 11:15:53 +00:00
Bill Wendling 1e48353346 Accidental submission.
llvm-svn: 32639
2006-12-17 11:13:13 +00:00
Bill Wendling e891701547 This snuck in. Reverted.
llvm-svn: 32638
2006-12-17 11:11:10 +00:00
Reid Spencer cb80954483 Fix problems in the CBE and InstructionCombining which use the isMaxValue
and isMinValue methods of ConstantInt. These have been broken since the
isSigned parameter was added. It is necessary to use the signed version
of the type in the call to isValueValidForType or else incorrect results
are returned.

llvm-svn: 32637
2006-12-17 06:07:30 +00:00
Bill Wendling a77f14265b 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
Reid Spencer 05a1fe5bf5 Allow an --enable-pic option to turn on -fPIC compiler option when building.
The default is disabled until we know this doesn't break anyone.

llvm-svn: 32635
2006-12-16 22:07:52 +00:00
Chris Lattner fd5f03ec3f when inserting a dummy argument to work-around the CBE not supporting
zero arg vararg functions, pass undef instead of 'int 0', which is cheaper.

llvm-svn: 32634
2006-12-16 21:21:53 +00:00
Chris Lattner 9bd5ed636c 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
Chris Lattner 5ffb07839d testcase for pr1049
llvm-svn: 32632
2006-12-16 21:12:49 +00:00
Chris Lattner cbc280f559 Fix one more broken testcase
llvm-svn: 32631
2006-12-16 20:27:43 +00:00
Chris Lattner 360a14be02 Apply B. Scott Michel's patch for PR1054, thanks!
llvm-svn: 32630
2006-12-16 20:23:42 +00:00
Evan Cheng 28cf4277bb Cannot combine an indexed load / store any further.
llvm-svn: 32629
2006-12-16 06:25:23 +00:00
Evan Cheng 5c65ea0db1 Typo.
llvm-svn: 32628
2006-12-16 06:21:55 +00:00
Chris Lattner a07e363aae Fix borken testcase
llvm-svn: 32627
2006-12-16 02:30:24 +00:00
Chris Lattner cf1eac3535 fix buggy testcase
llvm-svn: 32626
2006-12-16 02:29:22 +00:00
Chris Lattner cff7b8a9ca testcases for PR1042
llvm-svn: 32625
2006-12-16 02:26:57 +00:00
Chris Lattner 697617709c Fix PR1042, by tightening up the subtle rules with invoke value use.
llvm-svn: 32624
2006-12-16 02:25:35 +00:00
Evan Cheng 851e589eda Expand FP undef
llvm-svn: 32623
2006-12-16 02:20:50 +00:00
Jeff Cohen 29192e6274 The best unbreakage yet, addressing Bill's concerns.
llvm-svn: 32622
2006-12-16 02:15:42 +00:00
Evan Cheng 860004688a Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.
llvm-svn: 32621
2006-12-16 02:10:30 +00:00
Devang Patel abfbe3bfda Add getNumContainedPasses() and getContainedPass() inteface and use
it instead of passVectorBegin/End().

llvm-svn: 32620
2006-12-16 00:56:26 +00:00
Evan Cheng 388cbbf000 Expand fabs / fneg to and / xor.
llvm-svn: 32619
2006-12-16 00:52:40 +00:00
Devang Patel 56d48ec501 Cosmetic changes, based on Chris's review.
llvm-svn: 32618
2006-12-15 22:57:49 +00:00
Jeff Cohen b82309f1ab An even better unbreakage...
llvm-svn: 32617
2006-12-15 22:57:14 +00:00
Evan Cheng 884bc09d10 Fix select_cc, select expansion to soft-fp bugs.
llvm-svn: 32616
2006-12-15 22:42:55 +00:00
Jeff Cohen 75e93bc8c7 Complete unbreak of VC++ (Chris identified the simple fix).
llvm-svn: 32615
2006-12-15 22:06:08 +00:00
Jeff Cohen 9f46963f11 Partial unbreak of VC++ (stream stuff has no easy fix).
llvm-svn: 32614
2006-12-15 21:47:01 +00:00
Reid Spencer 496222a1a8 Remove an extraneous { at the end of a block.
llvm-svn: 32613
2006-12-15 21:46:37 +00:00
Jim Laskey a0850e98ee Patterns no longer needed due to fix in the DAG combiner.
llvm-svn: 32612
2006-12-15 21:39:31 +00:00
Jim Laskey 26df19ace6 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
Devang Patel 991aebacba Mark dump* routines const routines.
llvm-svn: 32610
2006-12-15 20:13:01 +00:00
Evan Cheng 2f4cdc78fa Some AT&T syntax assembler (e.g. Mac OS X) does not recognize the movq alias for i64 <-> XMM moves.
llvm-svn: 32609
2006-12-15 19:58:58 +00:00
Reid Spencer 5dd391b4bb Fix long standing issue with propagating error message back to caller. This
has been a problem since exceptions were removed from the BytecodeReader.
Error messages are now captured from ModuleProvider::releaseModule as well
as after a longjmp.

llvm-svn: 32608
2006-12-15 19:49:23 +00:00
Reid Spencer 1c6cb06ff5 For PR1050:
Convert asserts into error messages.

llvm-svn: 32607
2006-12-15 19:44:51 +00:00
Devang Patel ffca910d45 Move PMTopLevelManager and TImingInfo into anon namespace.
llvm-svn: 32606
2006-12-15 19:39:30 +00:00
Jim Laskey 73d307d12d Not all test cases are created equal. This fix is needed.
llvm-svn: 32605
2006-12-15 18:51:01 +00:00