Commit Graph

16502 Commits

Author SHA1 Message Date
Chris Lattner
0bb3af9ec1 Fix PR1061 and CodeGen/X86/2006-12-19-IntelSyntax.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32676 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 19:29:58 +00:00
Anton Korobeynikov
cd79df01c2 Partly fixed JITing on mingw32 platform. The support is not full due to
absence of dllimport JIT codegen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32673 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 15:24:18 +00:00
Reid Spencer
85e36e474d Clean up ConstantFoldCastInstruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32672 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 07:41:40 +00:00
Reid Spencer
390437fc6d Rewrite ConstantFoldCastInstruction so that it doesn't use any of the
ConstRules. Remove the casting rules from ConstRules and subclasses. This
cleans up ConstantFolding significantly. Passes all tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32671 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 03:15:47 +00:00
Evan Cheng
7df28dc9d7 May need to promote the operand (either sign_extend_inreg or and) before
expanding a {s|u}int_to_fp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 01:44:04 +00:00
Reid Spencer
9b11d518ae Make ConstantInt not care about sign any more. To ensure the AsmParser can
still check the validity of signed values an overload to isValueValidForType
was added to allow passing in an int64_t to check.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32663 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 01:28:19 +00:00
Chris Lattner
75de5ab9f5 Fix a bug in GetConstantFactor for affine expressions, in which the existing
code was wrong for things like 3+4*i.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32662 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 01:16:02 +00:00
Reid Spencer
c597a888c0 Remove a useless statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 23:40:19 +00:00
Evan Cheng
722cb36069 LegalizeSetCCOperands() may end up inserting libcalls. They need to be
properly serialized. Do not clear LastCallSEQ_END until that is done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 22:55:34 +00:00
Reid Spencer
d71b620c6c For PR1042:
Fix a thinko. We want to check the second case if the first cast *didn't*
trigger.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32657 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 21:56:29 +00:00
Rafael Espindola
3ef39ca6a1 macros -> Inline functions
Lauros's patch


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32656 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 11:07:09 +00:00
Reid Spencer
1bd82a5c65 Remove the createInferredCast methods now that their last uses have been
removed. All casting is now explicit and not inferred by VMCore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32655 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 08:52:59 +00:00
Reid Spencer
8a903db499 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 08:47:13 +00:00
Reid Spencer
d97321ceb3 Remove the two-argument (inferred cast) form of ConstantExpr::getCast now
that its last uses have been removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32653 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 08:18:46 +00:00
Reid Spencer
dc26a9b840 Convert the last use of two-argument ConstantExpr::getCast into another
form so we can remove that method from ConstantExpr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32652 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 08:16:27 +00:00
Reid Spencer
fdf15e1dc8 Revert last patch. ConstantInt isn't quite ready for signlessness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 04:22:56 +00:00
Rafael Espindola
15404d060b move ExtWeakSymbols to AsmPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32648 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 03:37:18 +00:00
Reid Spencer
d54d8fa45a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32646 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 01:11:03 +00:00
Chris Lattner
c1f400ccdd Fix PR1057 (compilation on macos 10.3), patch by Scott Michel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32644 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 21:04:02 +00:00
Reid Spencer
225866469f Use a predicate function to identify bitcast of fp and integer instead of
repeating the logic in two different parts of the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32643 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 20:24:50 +00:00
Reid Spencer
941cfda9c5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 18:50:51 +00:00
Bill Wendling
f2174da713 Fixed so that it dereferences the ostream pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32640 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 11:15:53 +00:00
Bill Wendling
c252fac907 This snuck in. Reverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32638 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 11:11:10 +00:00
Bill Wendling
5c7e326585 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 05:15:13 +00:00
Chris Lattner
95ca3a453a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 21:21:53 +00:00
Chris Lattner
36d439666c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32633 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 21:14:48 +00:00
Chris Lattner
3381f0a09d Apply B. Scott Michel's patch for PR1054, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32630 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 20:23:42 +00:00
Evan Cheng
e90460ee9a Cannot combine an indexed load / store any further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32629 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 06:25:23 +00:00
Chris Lattner
e3cbe03d13 Fix PR1042, by tightening up the subtle rules with invoke value use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32624 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 02:25:35 +00:00
Evan Cheng
aa975c1c47 Expand FP undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32623 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 02:20:50 +00:00
Jeff Cohen
4b607748d8 The best unbreakage yet, addressing Bill's concerns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32622 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 02:15:42 +00:00
Evan Cheng
0b1b9dcf22 Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 02:10:30 +00:00
Devang Patel
1554c85456 Add getNumContainedPasses() and getContainedPass() inteface and use
it instead of passVectorBegin/End().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32620 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 00:56:26 +00:00
Evan Cheng
966bf24491 Expand fabs / fneg to and / xor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 00:52:40 +00:00
Devang Patel
1a8038636c Cosmetic changes, based on Chris's review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32618 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 22:57:49 +00:00
Jeff Cohen
c21c5eeb4f An even better unbreakage...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32617 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 22:57:14 +00:00
Evan Cheng
19103b11ec Fix select_cc, select expansion to soft-fp bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 22:42:55 +00:00
Jeff Cohen
6ebe23584e Partial unbreak of VC++ (stream stuff has no easy fix).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32614 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 21:47:01 +00:00
Reid Spencer
c6d416ada1 Remove an extraneous { at the end of a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32613 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 21:46:37 +00:00
Jim Laskey
ba74cdf7f6 Patterns no longer needed due to fix in the DAG combiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32612 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 21:39:31 +00:00
Jim Laskey
f6c4ccfaab This code was usurping the sextload expand in teh legalizer. Just make
sure the right conditions are checked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32611 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 21:38:30 +00:00
Devang Patel
a52035a062 Mark dump* routines const routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 20:13:01 +00:00
Evan Cheng
9156ec66e4 Some AT&T syntax assembler (e.g. Mac OS X) does not recognize the movq alias for i64 <-> XMM moves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32609 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 19:58:58 +00:00
Reid Spencer
9b84ad14f4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32608 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 19:49:23 +00:00
Reid Spencer
cd5561a56e For PR1050:
Convert asserts into error messages.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32607 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 19:44:51 +00:00
Devang Patel
c2ff962bf9 Move PMTopLevelManager and TImingInfo into anon namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32606 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 19:39:30 +00:00
Jim Laskey
352235515f Not all test cases are created equal. This fix is needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32605 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 18:51:01 +00:00
Jim Laskey
182a5acdeb Not needed. Misinterpreted error message from other bug (Missing load/store
relocations.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32604 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 18:45:32 +00:00
Andrew Lenharth
8753c447a5 extern_weak linkage. fixes PR1038
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32603 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 17:35:32 +00:00
Jim Laskey
34da72645a Missing load/store relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32601 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 16:44:10 +00:00