oota-llvm.git
16 years agoAdd indirect tail call (function pointer) examples.
Arnold Schwaighofer [Thu, 11 Sep 2008 22:24:28 +0000 (22:24 +0000)]
Add indirect tail call (function pointer) examples.

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

16 years agoudpate header comment: s/VP/VFP/
Jim Grosbach [Thu, 11 Sep 2008 21:41:29 +0000 (21:41 +0000)]
udpate header comment: s/VP/VFP/

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

16 years agoWhen tailcallopt is enabled all fastcc calls must have an aligned argument stack...
Arnold Schwaighofer [Thu, 11 Sep 2008 20:28:43 +0000 (20:28 +0000)]
When tailcallopt is enabled all fastcc calls must have an aligned argument stack size. Add a test case.

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

16 years agoFix PR2748. Avoid coalescing physical register with virtual register which would...
Evan Cheng [Thu, 11 Sep 2008 20:07:10 +0000 (20:07 +0000)]
Fix PR2748. Avoid coalescing physical register with virtual register which would create illegal extract_subreg. e.g.
vr1024 = extract_subreg vr1025, 1
...
vr1024 = mov8rr AH
If vr1024 is coalesced with AH, the extract_subreg is now illegal since AH does not have a super-reg whose sub-register 1 is AH.

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

16 years agoFix a bug in ANY_EXTEND handling that was breaking 403.gcc on X86-64 in fast isel.
Owen Anderson [Thu, 11 Sep 2008 19:44:55 +0000 (19:44 +0000)]
Fix a bug in ANY_EXTEND handling that was breaking 403.gcc on X86-64 in fast isel.

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

16 years agoFix comment typo.
Duncan Sands [Thu, 11 Sep 2008 19:41:10 +0000 (19:41 +0000)]
Fix comment typo.

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

16 years agoIntrinsics don't touch internal global variables
Duncan Sands [Thu, 11 Sep 2008 19:35:55 +0000 (19:35 +0000)]
Intrinsics don't touch internal global variables
(unless passed one via a parameter), even if they
are IntrWriteMem.

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

16 years agoFix a copy+paste bug that Duncan spotted. For several
Dan Gohman [Thu, 11 Sep 2008 18:53:02 +0000 (18:53 +0000)]
Fix a copy+paste bug that Duncan spotted. For several
cases it was still getting lucky and detecting overflow
but it was clearly incorrect.

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

16 years agoFix PR2783 - coalescer bug. Missing a TargetRegisterInfo::isVirtualRegister check.
Evan Cheng [Thu, 11 Sep 2008 18:40:32 +0000 (18:40 +0000)]
Fix PR2783 - coalescer bug. Missing a TargetRegisterInfo::isVirtualRegister check.

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

16 years agoEliminate some unused methods.
Evan Cheng [Thu, 11 Sep 2008 17:31:47 +0000 (17:31 +0000)]
Eliminate some unused methods.

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

16 years agoIndentation.
Evan Cheng [Thu, 11 Sep 2008 17:31:12 +0000 (17:31 +0000)]
Indentation.

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

16 years agolib/Target/SubtargetFeature.cpp asserts that the FeatureKV[] table be sorted
Jim Grosbach [Thu, 11 Sep 2008 17:05:32 +0000 (17:05 +0000)]
lib/Target/SubtargetFeature.cpp asserts that the FeatureKV[] table be sorted
by its first field, but TableGen doesn't actually enforce creating it that
way. TableGen sorts the records that will be used to create it by the names
of the records, not the Name field of those records.

This patch corrects the sort to use the "Name" field of the record as the
sort key.

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

16 years agoIntrinsics don't read these kinds of global
Duncan Sands [Thu, 11 Sep 2008 15:43:12 +0000 (15:43 +0000)]
Intrinsics don't read these kinds of global
variables.

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

16 years agoChange getSubReg semantics. It now returns zero if the specified register doesn't...
Evan Cheng [Thu, 11 Sep 2008 06:25:25 +0000 (06:25 +0000)]
Change getSubReg semantics. It now returns zero if the specified register doesn't have a subreg of the specified index.

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

16 years agoFix a 80 column violation.
Evan Cheng [Thu, 11 Sep 2008 05:58:06 +0000 (05:58 +0000)]
Fix a 80 column violation.

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

16 years agoThe version of AtomicSDNode::AtomicSDNode used (only) for
Dale Johannesen [Thu, 11 Sep 2008 03:12:59 +0000 (03:12 +0000)]
The version of AtomicSDNode::AtomicSDNode used (only) for
cmp-and-swap reversed the Cmp and Swap arguments; comments
make it clear this is unintentional.  Unfortunately, the
x86 BE had a compensating reversal, which is removed here.
PPC is OK.

From inspection of the Alpha code I think it is OK, but
if somebody has that platform please check it out.  I
cannot test on that platform.

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

16 years agoIf ISD::ANY_EXTEND fails, try ISD::ZERO_EXTEND and ISD::SIGN_EXTEND before giving...
Owen Anderson [Thu, 11 Sep 2008 02:41:37 +0000 (02:41 +0000)]
If ISD::ANY_EXTEND fails, try ISD::ZERO_EXTEND and ISD::SIGN_EXTEND before giving up.  This fixes 445.gobmk on
X86-64 in fast isel.

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

16 years agoSuccumb utterly to compatibility and implement
Dale Johannesen [Thu, 11 Sep 2008 02:15:03 +0000 (02:15 +0000)]
Succumb utterly to compatibility and implement
__sync_fetch_and_nand as ANDC, even though that's
not what nand means.

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

16 years agoPropagate subreg index when promoting a load to a copy.
Evan Cheng [Thu, 11 Sep 2008 01:02:12 +0000 (01:02 +0000)]
Propagate subreg index when promoting a load to a copy.

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

16 years agoIn my analysis for r56076 I missed the case where the original
Dan Gohman [Thu, 11 Sep 2008 00:25:00 +0000 (00:25 +0000)]
In my analysis for r56076 I missed the case where the original
multiplication overflows.

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

16 years agoFix an icmp+sdiv optimization to check for and handle an overflow
Dan Gohman [Wed, 10 Sep 2008 23:30:57 +0000 (23:30 +0000)]
Fix an icmp+sdiv optimization to check for and handle an overflow
condition. This fixes PR2740.

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

16 years agoAdd more documentation advertising the -view-*-dags options.
Dan Gohman [Wed, 10 Sep 2008 22:23:41 +0000 (22:23 +0000)]
Add more documentation advertising the -view-*-dags options.

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

16 years agoX86FastISel support for double->float and float->double casts.
Dan Gohman [Wed, 10 Sep 2008 21:02:08 +0000 (21:02 +0000)]
X86FastISel support for double->float and float->double casts.

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

16 years agoFastISel support for i1 PHI nodes.
Dan Gohman [Wed, 10 Sep 2008 21:01:31 +0000 (21:01 +0000)]
FastISel support for i1 PHI nodes.

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

16 years agoFastISel support for i1 constants.
Dan Gohman [Wed, 10 Sep 2008 21:01:08 +0000 (21:01 +0000)]
FastISel support for i1 constants.

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

16 years agoFix a bug in the coalescer where it didn't check if a live interval existed before...
Owen Anderson [Wed, 10 Sep 2008 20:41:13 +0000 (20:41 +0000)]
Fix a bug in the coalescer where it didn't check if a live interval existed before trying to manipulate it.  This
was exposed by fast isel's handling of shifts on X86-64.  With this, FreeBench/pcompress2 passes on X86-64 in fast isel.

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

16 years agoAdd X86FastISel support for static allocas, and refences
Dan Gohman [Wed, 10 Sep 2008 20:11:02 +0000 (20:11 +0000)]
Add X86FastISel support for static allocas, and refences
to static allocas. As part of this change, refactor the
address mode code for laods and stores.

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

16 years agoFix PR2664 - spiller GetRegForReload wasn't respecting sub-register indices on machin...
Evan Cheng [Wed, 10 Sep 2008 20:08:45 +0000 (20:08 +0000)]
Fix PR2664 - spiller GetRegForReload wasn't respecting sub-register indices on machine operands.

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

16 years agoFix a fastcc + sret bug. If fastcc and sret, callee doesn't need to pop the hidden...
Evan Cheng [Wed, 10 Sep 2008 18:25:29 +0000 (18:25 +0000)]
Fix a fastcc + sret bug. If fastcc and sret, callee doesn't need to pop the hidden struct ptr; Re-enable fastcc.

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

16 years agoHandle new intrinsics with vector arguments.
Dale Johannesen [Wed, 10 Sep 2008 17:31:40 +0000 (17:31 +0000)]
Handle new intrinsics with vector arguments.
Patch by Paul Redmond.

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

16 years agoAdd a break statement that I accidentally deleted when
Dan Gohman [Wed, 10 Sep 2008 15:52:34 +0000 (15:52 +0000)]
Add a break statement that I accidentally deleted when
I shuffled the fast-isel command-line options around. This fixes
a bunch of fast-isel failures.

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

16 years agofix white spaces.
Devang Patel [Wed, 10 Sep 2008 14:49:55 +0000 (14:49 +0000)]
fix white spaces.

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

16 years agoFix name.
Duncan Sands [Wed, 10 Sep 2008 13:22:10 +0000 (13:22 +0000)]
Fix name.

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

16 years agoAdd trampoline support for the new FastCC calling
Duncan Sands [Wed, 10 Sep 2008 13:11:09 +0000 (13:11 +0000)]
Add trampoline support for the new FastCC calling
convention (not related to recent Ada testsuite
failures).

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

16 years agoTurn off the new FastCC for the moment. It causes
Duncan Sands [Wed, 10 Sep 2008 13:09:24 +0000 (13:09 +0000)]
Turn off the new FastCC for the moment.  It causes
a slew of Ada testsuite failures on x86-32 linux.
Seems to be related to the use of float.

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

16 years agoRemove unnecessary bit-wise AND from the limited precision work.
Bill Wendling [Wed, 10 Sep 2008 06:26:10 +0000 (06:26 +0000)]
Remove unnecessary bit-wise AND from the limited precision work.

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

16 years agoFix 80 col violation.
Daniel Dunbar [Wed, 10 Sep 2008 04:16:29 +0000 (04:16 +0000)]
Fix 80 col violation.

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

16 years agoFix a warning about comparing signed and unsigned values.
Dan Gohman [Wed, 10 Sep 2008 01:09:32 +0000 (01:09 +0000)]
Fix a warning about comparing signed and unsigned values.

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

16 years agoFix typo.
Evan Cheng [Wed, 10 Sep 2008 00:30:50 +0000 (00:30 +0000)]
Fix typo.

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

16 years agoCheck that both operands are f32 before attempting to lower.
Bill Wendling [Wed, 10 Sep 2008 00:24:59 +0000 (00:24 +0000)]
Check that both operands are f32 before attempting to lower.

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

16 years agoImplement "visitPow". This is mainly used to see if we have a pow() call of this
Bill Wendling [Wed, 10 Sep 2008 00:20:20 +0000 (00:20 +0000)]
Implement "visitPow". This is mainly used to see if we have a pow() call of this
form:

          powf(10.0f, x);

If this is the case, and also we want limited precision floating-point
calculations, then lower to do the limited-precision stuff.

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

16 years agoA few more places where FPOW is being ignored.
Evan Cheng [Tue, 9 Sep 2008 23:35:53 +0000 (23:35 +0000)]
A few more places where FPOW is being ignored.

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

16 years agoChange -fast-isel-no-abort to -fast-isel-abort, which now defaults
Dan Gohman [Tue, 9 Sep 2008 23:05:00 +0000 (23:05 +0000)]
Change -fast-isel-no-abort to -fast-isel-abort, which now defaults
to being off by default. Also, add assertion checks to check that
the various fast-isel-related command-line options are only used
when -fast-isel itself is enabled.

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

16 years agoLegalizer was missing code that expand fpow to a libcall.
Evan Cheng [Tue, 9 Sep 2008 23:02:14 +0000 (23:02 +0000)]
Legalizer was missing code that expand fpow to a libcall.

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

16 years agoAdding 6-, 12-, and 18-bit limited-precision floating-point support for exp2
Bill Wendling [Tue, 9 Sep 2008 22:39:21 +0000 (22:39 +0000)]
Adding 6-, 12-, and 18-bit limited-precision floating-point support for exp2
function.

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

16 years agoMove the uglier parts of deciding not to emit a
Dale Johannesen [Tue, 9 Sep 2008 22:29:13 +0000 (22:29 +0000)]
Move the uglier parts of deciding not to emit a
UsedDirective for some symbols in llvm.used into
Darwin-specific code.  I've decided LessPrivateGlobal
is potentially a useful abstraction and left it in
the target-independent area, with improved comment.

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

16 years agoAdd support for 6-, 12-, and 18-bit limited precision calculations of exp for
Bill Wendling [Tue, 9 Sep 2008 22:13:54 +0000 (22:13 +0000)]
Add support for 6-, 12-, and 18-bit limited precision calculations of exp for
floating-point numbers.

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

16 years agoFix a minor wording ambiguity in the Developer Policy.
Dan Gohman [Tue, 9 Sep 2008 22:13:09 +0000 (22:13 +0000)]
Fix a minor wording ambiguity in the Developer Policy.

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

16 years agoAdd a new option, -fast-isel-verbose, that can be used with
Dan Gohman [Tue, 9 Sep 2008 22:06:46 +0000 (22:06 +0000)]
Add a new option, -fast-isel-verbose, that can be used with
-fast-isel-no-abort to get a dump of all unhandled instructions,
without an abort.

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

16 years agoClear preference when it no longer makes sense.
Evan Cheng [Tue, 9 Sep 2008 21:44:23 +0000 (21:44 +0000)]
Clear preference when it no longer makes sense.

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

16 years agoRemove.
Devang Patel [Tue, 9 Sep 2008 21:41:34 +0000 (21:41 +0000)]
Remove.

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

16 years agoif loop induction variable is always sign or zero extended then
Devang Patel [Tue, 9 Sep 2008 21:41:07 +0000 (21:41 +0000)]
if loop induction variable is always sign or zero extended then
extend the type of induction variable.

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

16 years agoAdd assertion check.
Devang Patel [Tue, 9 Sep 2008 21:38:40 +0000 (21:38 +0000)]
Add assertion check.

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

16 years agofix overflow check.
Devang Patel [Tue, 9 Sep 2008 20:54:34 +0000 (20:54 +0000)]
fix overflow check.

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

16 years agoClean this up, based on Evan's suggestions.
Owen Anderson [Tue, 9 Sep 2008 20:47:17 +0000 (20:47 +0000)]
Clean this up, based on Evan's suggestions.

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

16 years ago- Add support for 6-, 12-, and 18-bit limited precision floating-point "log"
Bill Wendling [Tue, 9 Sep 2008 20:39:27 +0000 (20:39 +0000)]
- Add support for 6-, 12-, and 18-bit limited precision floating-point "log"
  values.
- Refactored some of the code.

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

16 years agoFix PR2757. Ignore liveinterval register allocation preference if the preference...
Evan Cheng [Tue, 9 Sep 2008 20:22:01 +0000 (20:22 +0000)]
Fix PR2757. Ignore liveinterval register allocation preference if the preference register is not in the right register class. This can happen due to sub-register coalescing.

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

16 years agoMake safer variant of alias resolution routine to be default
Anton Korobeynikov [Tue, 9 Sep 2008 20:05:04 +0000 (20:05 +0000)]
Make safer variant of alias resolution routine to be default

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

16 years agoSimplify this some more. No functionality change.
Duncan Sands [Tue, 9 Sep 2008 19:56:34 +0000 (19:56 +0000)]
Simplify this some more.  No functionality change.

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

16 years agoResolve aliases, when possible
Anton Korobeynikov [Tue, 9 Sep 2008 19:04:59 +0000 (19:04 +0000)]
Resolve aliases, when possible

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

16 years agoAdd limited precision floating-point conversions of log10 for 6- and 18-bit
Bill Wendling [Tue, 9 Sep 2008 18:42:23 +0000 (18:42 +0000)]
Add limited precision floating-point conversions of log10 for 6- and 18-bit
precisions.

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

16 years agoMark IMPLICIT_DEF as being rematerializable and cheap-as-a-move.
Dan Gohman [Tue, 9 Sep 2008 18:25:28 +0000 (18:25 +0000)]
Mark IMPLICIT_DEF as being rematerializable and cheap-as-a-move.
It's already special-cased and treated as rematerializable within
LiveIntervals; this allows it to be handled by other passes
such as TwoAddressInstrctionPass.

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

16 years agoFix typo
Anton Korobeynikov [Tue, 9 Sep 2008 18:24:07 +0000 (18:24 +0000)]
Fix typo

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

16 years agoFix incorrect linker behaviour: we shouldn't resolve weak aliases.
Anton Korobeynikov [Tue, 9 Sep 2008 18:23:48 +0000 (18:23 +0000)]
Fix incorrect linker behaviour: we shouldn't resolve weak aliases.

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

16 years agoReplace explicit pointer-size constants to TargetData query.
Anton Korobeynikov [Tue, 9 Sep 2008 18:22:57 +0000 (18:22 +0000)]
Replace explicit pointer-size constants to TargetData query.
No functionality change.

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

16 years agoMake SimplifyDemandedVectorElts simplify vectors with multiple
Dan Gohman [Tue, 9 Sep 2008 18:11:14 +0000 (18:11 +0000)]
Make SimplifyDemandedVectorElts simplify vectors with multiple
users, and teach it about shufflevector instructions.

Also, fix a subtle bug in SimplifyDemandedVectorElts'
insertelement code.

This is a patch that was originally written by Eli Friedman,
with some fixes and cleanup by me.

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

16 years agoSimplify.
Devang Patel [Tue, 9 Sep 2008 17:56:50 +0000 (17:56 +0000)]
Simplify.
Fix outdated comment.

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

16 years agofit in 80 cols, minor tweaks
Gabor Greif [Tue, 9 Sep 2008 17:52:13 +0000 (17:52 +0000)]
fit in 80 cols, minor tweaks

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

16 years agoOptimization suggested by Matthijs Kooijman.
Duncan Sands [Tue, 9 Sep 2008 13:44:24 +0000 (13:44 +0000)]
Optimization suggested by Matthijs Kooijman.

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

16 years agoCorrect callgraph construction. It has two problems:
Duncan Sands [Tue, 9 Sep 2008 12:40:47 +0000 (12:40 +0000)]
Correct callgraph construction.  It has two problems:
(1) code left over from the days of ConstantPointerRef:
if a use of a function is a GlobalValue then that is
not considered a reason to add an edge from the external
node, even though the use may be as an initializer for
an externally visible global!  There might be some point
to this behaviour when the use is by an alias (though the
code predated aliases by some centuries), but I think
PR2782 is a better way of handling that.  (2) If function
F calls function G, and also G is a parameter to the
call, then an F->G edge is not added to the callgraph.
While this doesn't seem to matter much, adding such an
edge makes the callgraph more regular.
In addition, the new code should be faster as well as
simpler.

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

16 years agoUpdate VC++ project files.
Argyrios Kyrtzidis [Tue, 9 Sep 2008 11:38:37 +0000 (11:38 +0000)]
Update VC++ project files.

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

16 years agoCheck for type legality before materializing integer constants in fast isel. With...
Owen Anderson [Tue, 9 Sep 2008 06:32:02 +0000 (06:32 +0000)]
Check for type legality before materializing integer constants in fast isel.  With this change,
all of MultiSource/Applications passes on Darwin/X86 under FastISel.

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

16 years agoAllow use of ssh to perform remote execution.
Evan Cheng [Tue, 9 Sep 2008 06:11:26 +0000 (06:11 +0000)]
Allow use of ssh to perform remote execution.

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

16 years agoRemove the code that protected FastISel from aborting in
Dan Gohman [Tue, 9 Sep 2008 02:40:04 +0000 (02:40 +0000)]
Remove the code that protected FastISel from aborting in
the case of loads, stores, and conditional branches. It can
handle those now, so any that aren't handled should trigger
the abort.

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

16 years agoTemporarily disable vector select in the bitcode reader. The
Dan Gohman [Tue, 9 Sep 2008 02:08:49 +0000 (02:08 +0000)]
Temporarily disable vector select in the bitcode reader. The
way it handles the type of the condition is breaking plain
scalar select in the case that the value is a
forward-reference.

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

16 years agoFix a constant lowering bug. Now we can do load and store instructions with funky...
Evan Cheng [Tue, 9 Sep 2008 01:26:59 +0000 (01:26 +0000)]
Fix a constant lowering bug. Now we can do load and store instructions with funky getelementptr embedded in the address operand.

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

16 years agoFix logic for not emitting no-dead-strip for some
Dale Johannesen [Tue, 9 Sep 2008 01:21:22 +0000 (01:21 +0000)]
Fix logic for not emitting no-dead-strip for some
objects in llvm.used (thanks Anton).  Makes visible
the magic 'l' prefix for symbols on Darwin which are
to be passed through the assembler, then removed at
linktime (previously all references to this had been
hidden in the ObjC FE code, oh well).

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

16 years agoUpdate generated files.
Dan Gohman [Tue, 9 Sep 2008 01:13:24 +0000 (01:13 +0000)]
Update generated files.

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

16 years agoFix simplifycfg crash in handing block merge.
Devang Patel [Tue, 9 Sep 2008 01:06:56 +0000 (01:06 +0000)]
Fix simplifycfg crash in handing block merge.

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

16 years agoExtend the vcmp/fcmp LLVM IR instructions to take vectors as arguments
Dan Gohman [Tue, 9 Sep 2008 01:02:47 +0000 (01:02 +0000)]
Extend the vcmp/fcmp LLVM IR instructions to take vectors as arguments
and, if so, to return a vector of boolean as a result;

Extend the select LLVM IR instruction to allow you to specify a result
type which is a vector of boolean, in which case the result will be an
element-wise selection instead of choosing one vector or the other; and

Update LangRef.html to describe these changes.

This patch was contributed by Preston Gurd!

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

16 years agoAdd support for floating-point calculations of log2 with limited precisions of 6
Bill Wendling [Tue, 9 Sep 2008 00:28:24 +0000 (00:28 +0000)]
Add support for floating-point calculations of log2 with limited precisions of 6
and 18.

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

16 years agos/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g
Devang Patel [Mon, 8 Sep 2008 22:14:17 +0000 (22:14 +0000)]
s/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g

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

16 years agoDon't suppress no-dead-strip for used static functions.
Dale Johannesen [Mon, 8 Sep 2008 21:21:49 +0000 (21:21 +0000)]
Don't suppress no-dead-strip for used static functions.

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

16 years agoReapply 55902: Add test for checking proper lowering of eh_return & unwind init intri...
Anton Korobeynikov [Mon, 8 Sep 2008 21:14:36 +0000 (21:14 +0000)]
Reapply 55902: Add test for checking proper lowering of eh_return & unwind init intrinsics on 32bit x86 targets

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

16 years agoReapply 55903: Testcase for 64-bit lowering of eh_return & unwind_init
Anton Korobeynikov [Mon, 8 Sep 2008 21:14:19 +0000 (21:14 +0000)]
Reapply 55903: Testcase for 64-bit lowering of eh_return & unwind_init

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

16 years agoReapply 55904: Unbreak and fix indentation
Anton Korobeynikov [Mon, 8 Sep 2008 21:13:56 +0000 (21:13 +0000)]
Reapply 55904: Unbreak and fix indentation

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

16 years agoReapply 55901: Drop unused variable
Anton Korobeynikov [Mon, 8 Sep 2008 21:13:33 +0000 (21:13 +0000)]
Reapply 55901: Drop unused variable

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

16 years agoReapply 55900: We do support EH on x86-64!
Anton Korobeynikov [Mon, 8 Sep 2008 21:13:08 +0000 (21:13 +0000)]
Reapply 55900: We do support EH on x86-64!

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

16 years agoReapply 55899: First draft of EH support on x86/64-linux
Anton Korobeynikov [Mon, 8 Sep 2008 21:12:47 +0000 (21:12 +0000)]
Reapply 55899: First draft of EH support on x86/64-linux
Now with fix, which prevents subtle codegen bug to trigger on darwin.
No fix for bug though, it's still there.

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

16 years agoReapply blindly reverted 55898: Implement FRAME_TO_ARGS_OFFSET for x86-64
Anton Korobeynikov [Mon, 8 Sep 2008 21:12:11 +0000 (21:12 +0000)]
Reapply blindly reverted 55898: Implement FRAME_TO_ARGS_OFFSET for x86-64

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

16 years agoFix a few I's that were meant to be renamed to BI's.
Dan Gohman [Mon, 8 Sep 2008 20:37:59 +0000 (20:37 +0000)]
Fix a few I's that were meant to be renamed to BI's.

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

16 years agoAdd a target triple; apparently LLVM doesn't use 64-bit
Dan Gohman [Mon, 8 Sep 2008 20:16:18 +0000 (20:16 +0000)]
Add a target triple; apparently LLVM doesn't use 64-bit
data directives on darwin.

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

16 years agoReverting r55898 as well. This wasn't reverted in the original revert...
Bill Wendling [Mon, 8 Sep 2008 19:42:32 +0000 (19:42 +0000)]
Reverting r55898 as well. This wasn't reverted in the original revert...

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

16 years agoAccidental commit of partial 'stack canaries' code
Bill Wendling [Mon, 8 Sep 2008 18:12:00 +0000 (18:12 +0000)]
Accidental commit of partial 'stack canaries' code

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

16 years agoRemove these testcases associated with changes between r 55898 and r 55909.
Bill Wendling [Mon, 8 Sep 2008 18:00:39 +0000 (18:00 +0000)]
Remove these testcases associated with changes between r 55898 and r 55909.

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

16 years agoRedo the 3 existing low-precision expansions to
Dale Johannesen [Mon, 8 Sep 2008 18:00:26 +0000 (18:00 +0000)]
Redo the 3 existing low-precision expansions to
use float constants.  An oversight by the numerics
people who supplied this.

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

16 years agoReverting r55898 to r55909. One of these patches was causing an ICE during the full...
Bill Wendling [Mon, 8 Sep 2008 17:59:12 +0000 (17:59 +0000)]
Reverting r55898 to r55909. One of these patches was causing an ICE during the full bootstrap on Darwin:

/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include
-O2  -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../llvm-gcc.src/gcc
-I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include
-I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include
-I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include
-DSHARED -m64 -DL_negdi2 -c ../../llvm-gcc.src/gcc/libgcc2.c -o
libgcc/x86_64/_negdi2_s.o
Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) &&
TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical
register live information"), function runOnMachineFunction, file
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp,
line 311.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include
-O2  -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../llvm-gcc.src/gcc
-I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include
-I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include
-I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include
-DSHARED -m64 -DL_lshrdi3 -c ../../llvm-gcc.src/gcc/libgcc2.c -o
libgcc/x86_64/_lshrdi3_s.o
../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
{standard input}:unknown:Undefined local symbol LBB21_11
{standard input}:unknown:Undefined local symbol LBB21_12
{standard input}:unknown:Undefined local symbol LBB21_13
{standard input}:unknown:Undefined local symbol LBB21_8

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

16 years agoHandle calls which produce i1 results: promote to i8 but and it with 1 to get the...
Evan Cheng [Mon, 8 Sep 2008 17:15:42 +0000 (17:15 +0000)]
Handle calls which produce i1 results: promote to i8 but and it with 1 to get the low bit.

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

16 years agoRemove unused counter.
Devang Patel [Mon, 8 Sep 2008 17:14:54 +0000 (17:14 +0000)]
Remove unused counter.

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

16 years agoIn visitUREM, arrange for the temporary UDIV node to be
Dan Gohman [Mon, 8 Sep 2008 16:59:01 +0000 (16:59 +0000)]
In visitUREM, arrange for the temporary UDIV node to be
revisited, consistent with the code in visitSREM.

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