Christopher Lamb [Thu, 18 Oct 2007 19:28:55 +0000 (19:28 +0000)]
Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43144
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Oct 2007 18:49:29 +0000 (18:49 +0000)]
Fix PR1735 and Transforms/DeadArgElim/2007-10-18-VarargsReturn.ll by
fixing some obviously broken code :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43141
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Oct 2007 18:26:40 +0000 (18:26 +0000)]
Fix the command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43140
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 18 Oct 2007 17:54:49 +0000 (17:54 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43136
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Oct 2007 16:26:24 +0000 (16:26 +0000)]
this doesn't need dynamic_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43133
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Oct 2007 16:12:54 +0000 (16:12 +0000)]
remove dead file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43131
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Oct 2007 16:11:18 +0000 (16:11 +0000)]
Reduce reliance on rtti info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43130
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Oct 2007 16:10:48 +0000 (16:10 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43129
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Oct 2007 16:10:17 +0000 (16:10 +0000)]
update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43128
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Oct 2007 15:57:29 +0000 (15:57 +0000)]
This requires rtti info because tblgen uses commandline,
and tblgen requires rtti.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43127
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Oct 2007 15:54:45 +0000 (15:54 +0000)]
tblgen uses dynamic_cast heavily, so it needs rtti info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43126
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Thu, 18 Oct 2007 12:31:51 +0000 (12:31 +0000)]
Updated VC++ build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43123
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 18 Oct 2007 11:53:05 +0000 (11:53 +0000)]
Work around downrev gccs which do not inherit visibility of the
Registry<>::iterator member class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43122
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 18 Oct 2007 11:31:21 +0000 (11:31 +0000)]
Missing 'public' keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43121
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 18 Oct 2007 08:32:37 +0000 (08:32 +0000)]
Pointer arithmetic should be done with the index the same size as the pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43120
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 18 Oct 2007 08:22:16 +0000 (08:22 +0000)]
Support for ADDC/SUBC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43119
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 18 Oct 2007 07:49:59 +0000 (07:49 +0000)]
Really fix PR1734. Carefully track which register uses are sub-register uses by
traversing inverse register coalescing map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43118
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 18 Oct 2007 07:47:55 +0000 (07:47 +0000)]
Remove unnecessary include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43117
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 18 Oct 2007 06:17:07 +0000 (06:17 +0000)]
legalizing the ret operation on f64 shouldn't introduce a new
i64 bit convert needlessly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43116
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 18 Oct 2007 05:13:52 +0000 (05:13 +0000)]
Move Split<...>() into DomTreeBase. This should make the #include's of DominatorInternals.h
in CodeExtractor and LoopSimplify unnecessary.
Hartmut, could you confirm that this fixes the issues you were seeing?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43115
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 18 Oct 2007 00:48:43 +0000 (00:48 +0000)]
XFAIL for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43111
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Oct 2007 00:30:14 +0000 (00:30 +0000)]
Changed the return type of type-specific Allocate() methods to return
void*. This is hint that we are returning uninitialized memory rather
than a constructed object.
Patched ImutAVLTree to conform to this new interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43106
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 17 Oct 2007 23:51:13 +0000 (23:51 +0000)]
Reverting r43070 for now. It's causing llc test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43103
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 17 Oct 2007 23:14:56 +0000 (23:14 +0000)]
Test to make sure we don't generate unwind info for non-64-bit Objective-C.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43102
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Oct 2007 22:17:01 +0000 (22:17 +0000)]
ImutAVLTree now allocates tree nodes from the BumpPtrAllocator using
the new type-aligned Allocate() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43100
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Oct 2007 22:12:14 +0000 (22:12 +0000)]
Removed inclusion of cassert, which is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43099
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Oct 2007 22:09:45 +0000 (22:09 +0000)]
Minor cosmetic cleanups in the calculation of alignments for
StringMapEntry objects. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43097
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Oct 2007 22:08:55 +0000 (22:08 +0000)]
Added template function alignof() which provides a clean
function-based interface to getting the alignment of a type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43096
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Wed, 17 Oct 2007 21:36:08 +0000 (21:36 +0000)]
Reverting unnecessary commit of generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43095
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Wed, 17 Oct 2007 21:28:48 +0000 (21:28 +0000)]
Switching TargetMachineRegistry to use the new generic Registry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43094
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Oct 2007 21:13:50 +0000 (21:13 +0000)]
Updated StringMap to use llvm::AlignOf to compute the alignment of map
entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43089
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Wed, 17 Oct 2007 21:11:33 +0000 (21:11 +0000)]
Ignoring test/Transforms/LoopIndexSplit/Output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43088
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Oct 2007 21:10:21 +0000 (21:10 +0000)]
Added member template functions to MallocAllocator and
BumpPtrAllocator that implement allocations that return a properly
typed pointer. For BumpPtrAllocator, the allocated memory is
automatically aligned to the minimum alignment of the type (as
calculated by llvm::AlignOf::Alignment).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43087
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Oct 2007 20:56:47 +0000 (20:56 +0000)]
Added llvm::AlignOf, a template class whose purpose is to portably
compute the minimum memory alignment of arbitrary types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43086
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 17 Oct 2007 20:12:58 +0000 (20:12 +0000)]
Do not raise free() call that is called through invoke instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43083
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Wed, 17 Oct 2007 18:37:09 +0000 (18:37 +0000)]
Fixed linker errors (unresolved externals: split<>(...)) when compiling with VC++. Please review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43081
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 17 Oct 2007 18:05:13 +0000 (18:05 +0000)]
Don't mention -enable-unsafe-fp-math in LangRef.html, as that option is
assumed to globally mutate the spec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43078
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 17 Oct 2007 17:51:30 +0000 (17:51 +0000)]
Define a helper function ConstantVector::getSplatValue for testing for
and working with broadcasted constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43076
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Wed, 17 Oct 2007 14:56:40 +0000 (14:56 +0000)]
Updated VC++ build system.
Silenced some VC warnings.
I'm getting linker errors, though: unresolved externals:
llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
and
llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
Where are these defined?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43073
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 17 Oct 2007 14:48:28 +0000 (14:48 +0000)]
Add support for ISD::SELECT in SplitVectorOp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43072
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 17 Oct 2007 13:49:58 +0000 (13:49 +0000)]
Return Expand from getOperationAction for all extended
types. This is needed for SIGN_EXTEND_INREG at least.
It is not clear if this is correct for other operations.
On the other hand, for the various load/store actions
it seems to correct to return the type action, as is
currently done.
Also, it seems that SelectionDAG::getValueType can be
called for extended value types; introduce a map for
holding these, since we don't really want to extend
the vector to be 2^32 pointers long!
Generalize DAGTypeLegalizer::PromoteResult_TRUNCATE
and DAGTypeLegalizer::PromoteResult_INT_EXTEND to handle
the various funky possibilities that apints introduce,
for example that you can promote to a type that needs
to be expanded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43071
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 17 Oct 2007 07:24:40 +0000 (07:24 +0000)]
Apply "Instead of loading small c string constant, use integer constant directly" transformation while processing load instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43070
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 17 Oct 2007 06:53:44 +0000 (06:53 +0000)]
Apply Chris' suggestions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43069
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Oct 2007 06:17:29 +0000 (06:17 +0000)]
Change fp to sint legalization on x86-32 to do 2 x i32
loads instead of 1 x i64 loads. This doesn't change any functionality yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43068
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Oct 2007 06:02:13 +0000 (06:02 +0000)]
fix some funny indentation, add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43066
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 17 Oct 2007 05:29:37 +0000 (05:29 +0000)]
One more extract_subreg coalescing bug fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43065
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 17 Oct 2007 02:16:40 +0000 (02:16 +0000)]
Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43064
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 17 Oct 2007 02:15:06 +0000 (02:15 +0000)]
Yet another test case for extract_subreg coalescing crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43063
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 17 Oct 2007 02:13:29 +0000 (02:13 +0000)]
Fix MergeValueInAsValue(). It allows overlapping live ranges but should replace
their value numbers with the specified value number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43062
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 17 Oct 2007 02:12:22 +0000 (02:12 +0000)]
Clean up code that calculate MBB live-in's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43061
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 17 Oct 2007 02:10:22 +0000 (02:10 +0000)]
Clean up code that calculate MBB live-in's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43060
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 17 Oct 2007 02:03:17 +0000 (02:03 +0000)]
Move splitBlock into DomTreeBase from DomTree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43059
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 16 Oct 2007 23:44:18 +0000 (23:44 +0000)]
Use immediate stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43055
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 16 Oct 2007 23:38:29 +0000 (23:38 +0000)]
Disable attempts to constant fold PPC f128.
Remove the assumption that this will happen from
various places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43053
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Oct 2007 22:59:15 +0000 (22:59 +0000)]
Fix some formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43049
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 16 Oct 2007 21:09:14 +0000 (21:09 +0000)]
Some clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43043
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Oct 2007 19:59:25 +0000 (19:59 +0000)]
Template DominatorTreeBase by node type. This is the next major step towards
having dominator information on MBB's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43036
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 16 Oct 2007 19:29:47 +0000 (19:29 +0000)]
Fix PR1734.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43035
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 16 Oct 2007 18:10:14 +0000 (18:10 +0000)]
New test for svn rev 43033, radar
5538745.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43034
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 16 Oct 2007 18:09:08 +0000 (18:09 +0000)]
Check for invalid cc's in f80 select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43033
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Oct 2007 18:00:18 +0000 (18:00 +0000)]
Fix a bug handling frame references in ppc inline asm when the frame offset
doesn't fit into 16 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43032
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 16 Oct 2007 13:34:11 +0000 (13:34 +0000)]
Document the fact that the verifier currently requires the
top bit of a ValueType to be zero. Enforce this by ensuring
an assertion failure if someone tries to create a ValueType
without this property. I chose this minimal approach rather
than a more official integration of the notion of reserved
bits into ValueType because I'm hoping that the verifier will
be changed to no longer require this :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43031
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 16 Oct 2007 09:56:48 +0000 (09:56 +0000)]
Initial infrastructure for arbitrary precision integer
codegen support. This should have no effect on codegen
for other types. Debatable bits: (1) the use (abuse?)
of a set in SDNode::getValueTypeList; (2) the length of
getTypeToTransformTo, which maybe should be refactored
with a non-inline part for extended value types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43030
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 16 Oct 2007 09:07:20 +0000 (09:07 +0000)]
Fixes due to lack of type-safety for ValueType: (1) ValueType
being passed instead of an opcode; (2) ValueType being passed
for isVolatile (!) in getLoad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43028
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 16 Oct 2007 09:05:00 +0000 (09:05 +0000)]
Correction to tail call optimization code. The new return address
was stored to the acutal stack slot before the parameters were
lowered to their stack slot. This could cause arguments to be
overwritten by the return address if the called function had less
parameters than the caller function. The update should remove the
last failing test case of llc-beta: SPASS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43027
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 16 Oct 2007 08:04:24 +0000 (08:04 +0000)]
Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43026
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Oct 2007 03:00:22 +0000 (03:00 +0000)]
implement promotion of select and select_cc, allowing MallocBench/gs to
work with type promotion on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43025
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Oct 2007 22:07:31 +0000 (22:07 +0000)]
Teach IntrinsicLowering.cpp about the sin, cos, and pow intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43020
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Oct 2007 21:33:22 +0000 (21:33 +0000)]
Make CalcLatency() non-recursive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43017
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Oct 2007 21:10:03 +0000 (21:10 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43016
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Oct 2007 21:07:59 +0000 (21:07 +0000)]
Document the -view-sunit-dags option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43015
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Oct 2007 20:30:11 +0000 (20:30 +0000)]
Document the new llvm.sin, llvm.cos, and llvm.pow intrinsics. Feedback
is welcome!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43007
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 20:14:52 +0000 (20:14 +0000)]
Change LowerFP_TO_SINT to create the specific code it needs instead of
unconditionally creating an i64 bitcast. With the future legalizer
design, operation legalization can't introduce new nodes with illegal
types.
This fixes the rest of olden on ppc32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43005
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Oct 2007 20:11:21 +0000 (20:11 +0000)]
LowerFP_TO_SINT must not create a stack object if it's not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43004
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Oct 2007 19:56:32 +0000 (19:56 +0000)]
Add removeModuleProvider()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43002
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Oct 2007 19:22:17 +0000 (19:22 +0000)]
Reapply the fix in 42908 for this file. This changes the function names
from "test" to "foo" so that they don't match the grep -i ST.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43001
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 15 Oct 2007 19:15:48 +0000 (19:15 +0000)]
Fixed incorrect renaming of method name (forgot two characters).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42999
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 15 Oct 2007 18:52:34 +0000 (18:52 +0000)]
Added more doxygen comments.
Renamed internal method of ImutAVLTree::RemoveMutableFlag to MarkImmutable.
Added enum for bit manipulation (more self-documentating).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42998
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Oct 2007 18:33:50 +0000 (18:33 +0000)]
Fix PR1729: watch out for val# with no def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42996
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 17:48:57 +0000 (17:48 +0000)]
Move CreateStackTemporary out to SelectionDAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42995
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 17:47:20 +0000 (17:47 +0000)]
add a new CreateStackTemporary helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42994
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 17:16:12 +0000 (17:16 +0000)]
implement promotion of BR_CC operands, fixing bisort on ppc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42992
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 16:46:29 +0000 (16:46 +0000)]
updates from duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42991
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Mon, 15 Oct 2007 16:35:13 +0000 (16:35 +0000)]
Fix run line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42990
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Oct 2007 15:41:07 +0000 (15:41 +0000)]
New test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42986
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Oct 2007 15:31:35 +0000 (15:31 +0000)]
Achieve same result but use fewer lines of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42985
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Mon, 15 Oct 2007 15:00:55 +0000 (15:00 +0000)]
Fast-track obviously over-large and over-small exponents during decimal->
integer conversion. In some such cases this makes us one or two orders
of magnitude faster than NetBSD's libc. Glibc seems to have a similar
fast path.
Also, tighten up some upper bounds to save a bit of memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42984
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 15 Oct 2007 13:30:18 +0000 (13:30 +0000)]
Fix some typos. Call getTypeToTransformTo rather than
getTypeToExpandTo. The difference is that
getTypeToExpandTo gives the final result of expansion
(eg: i128 -> i32 on a 32 bit machine) while
getTypeToTransformTo does just one step (i128 -> i64).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42982
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 06:10:22 +0000 (06:10 +0000)]
One mundane change: Change ReplaceAllUsesOfValueWith to *optionally*
take a deleted nodes vector, instead of requiring it.
One more significant change: Implement the start of a legalizer that
just works on types. This legalizer is designed to run before the
operation legalizer and ensure just that the input dag is transformed
into an output dag whose operand and result types are all legal, even
if the operations on those types are not.
This design/impl has the following advantages:
1. When finished, this will *significantly* reduce the amount of code in
LegalizeDAG.cpp. It will remove all the code related to promotion and
expansion as well as splitting and scalarizing vectors.
2. The new code is very simple, idiomatic, and modular: unlike
LegalizeDAG.cpp, it has no 3000 line long functions. :)
3. The implementation is completely iterative instead of recursive, good
for hacking on large dags without blowing out your stack.
4. The implementation updates nodes in place when possible instead of
deallocating and reallocating the entire graph that points to some
mutated node.
5. The code nicely separates out handling of operations with invalid
results from operations with invalid operands, making some cases
simpler and easier to understand.
6. The new -debug-only=legalize-types option is very very handy :),
allowing you to easily understand what legalize types is doing.
This is not yet done. Until the ifdef added to SelectionDAGISel.cpp is
enabled, this does nothing. However, this code is sufficient to legalize
all of the code in 186.crafty, olden and freebench on an x86 machine. The
biggest issues are:
1. Vectors aren't implemented at all yet
2. SoftFP is a mess, I need to talk to Evan about it.
3. No lowering to libcalls is implemented yet.
4. Various operations are missing etc.
5. There are FIXME's for stuff I hax0r'd out, like softfp.
Hey, at least it is a step in the right direction :). If you'd like to help,
just enable the #ifdef in SelectionDAGISel.cpp and compile code with it. If
this explodes it will tell you what needs to be implemented. Help is
certainly appreciated.
Once this goes in, we can do three things:
1. Add a new pass of dag combine between the "type legalizer" and "operation
legalizer" passes. This will let us catch some long-standing isel issues
that we miss because operation legalization often obfuscates the dag with
target-specific nodes.
2. We can rip out all of the type legalization code from LegalizeDAG.cpp,
making it much smaller and simpler. When that happens we can then
reimplement the core functionality left in it in a much more efficient and
non-recursive way.
3. Once the whole legalizer is non-recursive, we can implement whole-function
selectiondags maybe...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42981
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 05:46:06 +0000 (05:46 +0000)]
One xform performed by LegalizeDAG is transformation of "store of fp" to "store of int".
Make two changes:
1) only xform "store of f32" if i32 is a legal type for the target.
2) only xform "store of f64" if either i64 or i32 are legal for the target.
3) if i64 isn't legal, manually lower to 2 stores of i32 instead of letting a
later pass of legalize do it. This is ugly, but helps future changes I'm
about to commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42980
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 05:34:10 +0000 (05:34 +0000)]
avoid an APFloat copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42979
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 05:32:43 +0000 (05:32 +0000)]
Add a (disabled by default) way to view the ID of a node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42978
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 05:30:55 +0000 (05:30 +0000)]
remove dead enum, make setNodeId public.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42977
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Oct 2007 05:30:27 +0000 (05:30 +0000)]
Fix 80 col violation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42976
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 15 Oct 2007 01:05:37 +0000 (01:05 +0000)]
Handle PPC long double in CBackend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Oct 2007 20:35:12 +0000 (20:35 +0000)]
remove misleading comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42970
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Oct 2007 18:35:05 +0000 (18:35 +0000)]
If a target doesn't have HasMULHU or HasUMUL_LOHI, ExpandOp would return
without lo/hi set. Fall through to making a libcall instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42969
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Sun, 14 Oct 2007 10:39:51 +0000 (10:39 +0000)]
Consolidate logic for creating NaNs. Silence compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42966
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Sun, 14 Oct 2007 10:29:28 +0000 (10:29 +0000)]
Whether arithmetic is supported is a property of the semantics. Make it
so, and clean up the checks by putting them in an inline function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42965
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Sun, 14 Oct 2007 10:16:12 +0000 (10:16 +0000)]
Separate out parsing of decimal number. Use this to only allocate
memory for the significand once up-front. Also ignore insignificant
trailing zeroes; this saves unnecessary multiplications later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42964
91177308-0d34-0410-b5e6-
96231b3b80d8