oota-llvm.git
16 years agoAllocateRWXMemory -> AllocateRWX.
Evan Cheng [Tue, 16 Sep 2008 17:28:18 +0000 (17:28 +0000)]
AllocateRWXMemory -> AllocateRWX.

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

16 years agoFCmpInst predicates UNO, ORD, FALSE, and TRUE are commutative.
Dan Gohman [Tue, 16 Sep 2008 16:44:00 +0000 (16:44 +0000)]
FCmpInst predicates UNO, ORD, FALSE, and TRUE are commutative.

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

16 years agoFix test to account for no more whitespace and that one of the matches is the
Bill Wendling [Tue, 16 Sep 2008 06:40:04 +0000 (06:40 +0000)]
Fix test to account for no more whitespace and that one of the matches is the
"declare" statement.

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

16 years agoRemove space that was forgotten.`
Bill Wendling [Tue, 16 Sep 2008 06:30:47 +0000 (06:30 +0000)]
Remove space that was forgotten.`

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

16 years agoDon't take the time to CheckDAGForTailCallsAndFixThem when tail calls
Dan Gohman [Tue, 16 Sep 2008 01:42:28 +0000 (01:42 +0000)]
Don't take the time to CheckDAGForTailCallsAndFixThem when tail calls
are not enabled. Instead just omit the tail call flag when calls are
created.

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

16 years agoFix spacing in the grep line for this test, following the recent
Dan Gohman [Tue, 16 Sep 2008 01:37:08 +0000 (01:37 +0000)]
Fix spacing in the grep line for this test, following the recent
SCEV-whitespace changes.

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

16 years agoRe-enables the new vector select in the bitcode reader, by modifying the
Dan Gohman [Tue, 16 Sep 2008 01:01:33 +0000 (01:01 +0000)]
Re-enables the new vector select in the bitcode reader, by modifying the
bitcode reader/writer as follows:

- add and use new bitcode FUNC_CODE_INST_VSELECT to handle the llvm
select opcode using either i1 or [N x i1] as the selector.
- retain old BITCODE FUNC_CODE_INST_SELECT in the bitcode reader to
handle select on i1 for backwards compatibility with existing bitcode
files.
- re-enable the vector-select.ll test program.

Also, rename the recently added bitcode opcode FUNC_CODE_INST_VCMP to
FUNC_CODE_INST_CMP2 and make the bitcode writer use it to handle
fcmp/icmp on scalars or vectors. In the bitcode writer, use
FUNC_CODE_INST_CMP for vfcmp/vicmp only. In the bitcode reader, have
FUNC_CODE_INST_CMP handle icmp/fcmp returning bool, for backwards
compatibility with existing bitcode files.

Patch by Preston Gurd!

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

16 years agoTeach ScalarEvolution to consider loop preheaders in the search for
Dan Gohman [Mon, 15 Sep 2008 22:18:04 +0000 (22:18 +0000)]
Teach ScalarEvolution to consider loop preheaders in the search for
an if statement that guards a loop, to allow indvars to avoid smax
operations in more situations.

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

16 years agoLive intervals for live-in registers should begin at the beginning of a basic block...
Owen Anderson [Mon, 15 Sep 2008 22:00:38 +0000 (22:00 +0000)]
Live intervals for live-in registers should begin at the beginning of a basic block, not at the first
instruction.  Also, their valno's should have an unknown def.  This has no effect currently, but was
causing issues when StrongPHIElimination was enabled.

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

16 years agoTeach LSR to optimize away SMAX operations for tripcounts in common
Dan Gohman [Mon, 15 Sep 2008 21:22:06 +0000 (21:22 +0000)]
Teach LSR to optimize away SMAX operations for tripcounts in common
cases.  See the comment above OptimizeSMax for the full story, and
the testcase for an example. This cancels out a pessimization
commonly attributed to indvars, and will allow us to lift some of
the artificial throttles in indvars, rather than add new ones.

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

16 years agoExtract optimization pass selection code from llvm-gcc into a separate routine.
Devang Patel [Mon, 15 Sep 2008 21:13:42 +0000 (21:13 +0000)]
Extract optimization pass selection code from llvm-gcc into a separate routine.
This can be used by other stand alone tools, such as 'opt'.

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

16 years agoFixed Bug 2751
Bruno Cardoso Lopes [Mon, 15 Sep 2008 21:06:55 +0000 (21:06 +0000)]
Fixed Bug 2751
http://llvm.org/bugs/show_bug.cgi?id=2751

Abicall was enabled even when static code model was provided
in the command line.
The correct behavior is to disable abicall when static is
specified.

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

16 years agoRe-enable SelectionDAG CSE for calls. It matters in the case of
Dan Gohman [Mon, 15 Sep 2008 19:46:03 +0000 (19:46 +0000)]
Re-enable SelectionDAG CSE for calls. It matters in the case of
libcalls, as in this testcase on ARM.

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

16 years agoAdded testcase for bswap allegrexel intrinsic
Bruno Cardoso Lopes [Mon, 15 Sep 2008 19:38:11 +0000 (19:38 +0000)]
Added testcase for bswap allegrexel intrinsic

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

16 years agoEnd of the GlobalsModRef experiment.
Duncan Sands [Mon, 15 Sep 2008 18:42:38 +0000 (18:42 +0000)]
End of the GlobalsModRef experiment.

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

16 years agoUpdate the LLVM polygen grammar for recent language changes:
Dan Gohman [Mon, 15 Sep 2008 16:10:51 +0000 (16:10 +0000)]
Update the LLVM polygen grammar for recent language changes:
x86_ssecallcc, function notes, and some whitespace adjustments.

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

16 years agoFix documentation for these functions; they do not only modify users within the
Nick Lewycky [Mon, 15 Sep 2008 06:31:52 +0000 (06:31 +0000)]
Fix documentation for these functions; they do not only modify users within the
block specified by the InstList. Patch by Stefanus Du Toit.

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

16 years agoCorrectly update kill infos after extending a live range and merge 2 val#'s; fix...
Evan Cheng [Mon, 15 Sep 2008 06:28:41 +0000 (06:28 +0000)]
Correctly update kill infos after extending a live range and merge 2 val#'s; fix 56165 - do not mark val# copy field if the copy does not define the val#.

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

16 years agoAdd "sample" documentation to sample project.
Nick Lewycky [Mon, 15 Sep 2008 05:31:29 +0000 (05:31 +0000)]
Add "sample" documentation to sample project.

This fixes part of PR2793.

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

16 years agoFix WriteAsOperand to not emit a leading space character. Adjust
Dan Gohman [Sun, 14 Sep 2008 17:21:12 +0000 (17:21 +0000)]
Fix WriteAsOperand to not emit a leading space character. Adjust
its callers to emit a space character before calling it when a
space is needed.

This fixes several spurious whitespace issues in
ScalarEvolution's debug dumps. See the test changes for
examples.

This also fixes odd space-after-tab indentation in the output
for switch statements, and changes calls from being printed like
this:
  call void @foo( i32 %x )
to this:
  call void @foo(i32 %x)

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

16 years agoadjust last patch per review feedback
Dale Johannesen [Sun, 14 Sep 2008 01:44:36 +0000 (01:44 +0000)]
adjust last patch per review feedback

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

16 years agominor correction
Gabor Greif [Sat, 13 Sep 2008 18:51:27 +0000 (18:51 +0000)]
minor correction

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

16 years agoRemove isImm(), isReg(), and friends, in favor of
Dan Gohman [Sat, 13 Sep 2008 17:58:21 +0000 (17:58 +0000)]
Remove isImm(), isReg(), and friends, in favor of
isImmediate(), isRegister(), and friends, to avoid confusion
about having two different names with the same meaning. I'm
not attached to the longer names, and would be ok with
changing to the shorter names if others prefer it.

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

16 years agoFix PR2792: treat volatile loads as writing memory somewhere.
Duncan Sands [Sat, 13 Sep 2008 12:45:50 +0000 (12:45 +0000)]
Fix PR2792: treat volatile loads as writing memory somewhere.
Treat stores as reading memory, just to play safe.

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

16 years agoFix random abort.
Evan Cheng [Sat, 13 Sep 2008 01:55:59 +0000 (01:55 +0000)]
Fix random abort.

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

16 years agoDefine CallSDNode, an SDNode subclass for use with ISD::CALL.
Dan Gohman [Sat, 13 Sep 2008 01:54:27 +0000 (01:54 +0000)]
Define CallSDNode, an SDNode subclass for use with ISD::CALL.
Currently it just holds the calling convention and flags
for isVarArgs and isTailCall.

And it has several utility methods, which eliminate magic
5+2*i and similar index computations in several places.

CallSDNodes are not CSE'd. Teach UpdateNodeOperands to handle
nodes that are not CSE'd gracefully.

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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

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