oota-llvm.git
15 years agoTypo.
Evan Cheng [Sat, 13 Sep 2008 01:44:01 +0000 (01:44 +0000)]
Typo.

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

15 years agoRely on instruction format to determine so_reg operand for now.
Evan Cheng [Sat, 13 Sep 2008 01:38:29 +0000 (01:38 +0000)]
Rely on instruction format to determine so_reg operand for now.

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

15 years agoRevert 56176. All those instruction formats are still needed.
Evan Cheng [Sat, 13 Sep 2008 01:35:33 +0000 (01:35 +0000)]
Revert 56176. All those instruction formats are still needed.

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

15 years agoAccidentially flipped the condition.
Evan Cheng [Sat, 13 Sep 2008 01:29:57 +0000 (01:29 +0000)]
Accidentially flipped the condition.

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

15 years agoAdd debug dumps.
Evan Cheng [Sat, 13 Sep 2008 01:15:21 +0000 (01:15 +0000)]
Add debug dumps.

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

15 years agoEliminate unnecessary instruction formats.
Evan Cheng [Fri, 12 Sep 2008 23:15:39 +0000 (23:15 +0000)]
Eliminate unnecessary instruction formats.

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

15 years agoAddrmode 1 S bit can be dynamically set. Look for CPSR def.
Evan Cheng [Fri, 12 Sep 2008 22:45:55 +0000 (22:45 +0000)]
Addrmode 1 S bit can be dynamically set. Look for CPSR def.

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

15 years agoRewrite address mode 1 code emission routines.
Evan Cheng [Fri, 12 Sep 2008 22:01:15 +0000 (22:01 +0000)]
Rewrite address mode 1 code emission routines.

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

15 years agoThe "alias" keyword comes first.
Duncan Sands [Fri, 12 Sep 2008 20:48:21 +0000 (20:48 +0000)]
The "alias" keyword comes first.

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

15 years agoOn some targets, non-move instructions can become move instructions because of coales...
Evan Cheng [Fri, 12 Sep 2008 18:13:14 +0000 (18:13 +0000)]
On some targets, non-move instructions can become move instructions because of coalescing. e.g.
vr2 = OR vr0, vr1
=>
vr2 = OR vr1, vr1   // after coalescing vr0 with vr1

Update the value# of the destination register with the copy instruction if that happens.

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

15 years agoChange ConstantSDNode and ConstantFPSDNode to use ConstantInt* and
Dan Gohman [Fri, 12 Sep 2008 18:08:03 +0000 (18:08 +0000)]
Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* and
ConstantFP* instead of APInt and APFloat directly.

This reduces the amount of time to create ConstantSDNode
and ConstantFPSDNode nodes when ConstantInt* and ConstantFP*
respectively are already available, as is the case in
SelectionDAGBuild.cpp. Also, it reduces the amount of time
to legalize constants into constant pools, and the amount of
time to add ConstantFP operands to MachineInstrs, due to
eliminating ConstantInt::get and ConstantFP::get calls.

It increases the amount of work needed to create new constants
in cases where the client doesn't already have a ConstantInt*
or ConstantFP*, such as legalize expanding 64-bit integer constants
to 32-bit constants. And it adds a layer of indirection for the
accessor methods. But these appear to be outweight by the benefits
in most cases.

It will also make it easier to make ConstantSDNode and
ConstantFPNode more consistent with ConstantInt and ConstantFP.

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

15 years agoPass "earlyclobber" bit through to machine
Dale Johannesen [Fri, 12 Sep 2008 17:49:03 +0000 (17:49 +0000)]
Pass "earlyclobber" bit through to machine
representation; coalescer and RA need to know
about it.  No functional change.

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

15 years agoRename ConstantSDNode::getValue to getZExtValue, for consistency
Dan Gohman [Fri, 12 Sep 2008 16:56:44 +0000 (16:56 +0000)]
Rename ConstantSDNode::getValue to getZExtValue, for consistency
with ConstantInt. This led to fixing a bug in TargetLowering.cpp
using getValue instead of getAPIntValue.

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

15 years agoGive GlobalsModRef a whirl in the nightly testers.
Duncan Sands [Fri, 12 Sep 2008 08:23:37 +0000 (08:23 +0000)]
Give GlobalsModRef a whirl in the nightly testers.
I placed it just before GVN because that it is the
pass most likely to benefit from it.  Some quick
and dirty testing confirms that this is a decent
place for it.

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

15 years agoRather than marking all internal globals "Ref"
Duncan Sands [Fri, 12 Sep 2008 07:29:58 +0000 (07:29 +0000)]
Rather than marking all internal globals "Ref"
when a readonly declaration is called, set a
flag.  This is faster and uses less memory.
In theory it is less accurate, because before
only those internal globals that were read
by someone were being marked "Ref", but now
all are.  But in practice, thanks to other
passes, all internal globals of the kind
considered here will be both read and stored
to: those only read will have been turned
into constants, and those only stored to will
have been deleted.

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

15 years agoThe sequence for ppcf128 compares was not IEEE
Dale Johannesen [Fri, 12 Sep 2008 00:30:56 +0000 (00:30 +0000)]
The sequence for ppcf128 compares was not IEEE
safe in the presence of NaNs.

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

15 years agoOn 64-bit targets, change 32-bit getelementptr indices to be 64-bit
Dan Gohman [Thu, 11 Sep 2008 23:06:38 +0000 (23:06 +0000)]
On 64-bit targets, change 32-bit getelementptr indices to be 64-bit
getelementptr indices, inserting an explicit cast if necessary.
This helps expose the sign-extension operation to other optimizations.

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

15 years agoFix a vectorshuffle instcombine bug introduced by r55995.
Dan Gohman [Thu, 11 Sep 2008 22:47:57 +0000 (22:47 +0000)]
Fix a vectorshuffle instcombine bug introduced by r55995.
Patch by Nicolas Capens!

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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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