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
Evan Cheng [Sun, 14 Oct 2007 10:15:03 +0000 (10:15 +0000)]
New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42963
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 14 Oct 2007 10:09:39 +0000 (10:09 +0000)]
Unbreak x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42962
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 14 Oct 2007 10:08:34 +0000 (10:08 +0000)]
When coalescing an EXTRACT_SUBREG and the dst register is a physical register,
the source register will be coalesced to the super register of the LHS. Properly
merge in the live ranges of the resulting coalesced interval that were part of
the original source interval to the live interval of the super-register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42961
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 14 Oct 2007 05:57:21 +0000 (05:57 +0000)]
Revert 42908 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42960
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sun, 14 Oct 2007 01:58:32 +0000 (01:58 +0000)]
Fix type mismatch error in PPC Altivec (only causes
a problem when asserts are on). From vecLib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42959
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sun, 14 Oct 2007 01:56:47 +0000 (01:56 +0000)]
Disable some compile-time optimizations on PPC
long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42958
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Sun, 14 Oct 2007 00:34:53 +0000 (00:34 +0000)]
Fixing a typo. Found by Kevin André!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42956
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 13 Oct 2007 07:38:37 +0000 (07:38 +0000)]
Clarify that fastcc has a problem with nested function
trampolines, rather than with nested functions themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42955
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 13 Oct 2007 06:58:48 +0000 (06:58 +0000)]
Enhance the truncstore optimization code to handle shifted
values and propagate demanded bits through them in simple cases.
This allows this code:
void foo(char *P) {
strcpy(P, "abc");
}
to compile to:
_foo:
ldrb r3, [r1]
ldrb r2, [r1, #+1]
ldrb r12, [r1, #+2]!
ldrb r1, [r1, #+1]
strb r1, [r0, #+3]
strb r2, [r0, #+1]
strb r12, [r0, #+2]
strb r3, [r0]
bx lr
instead of:
_foo:
ldrb r3, [r1, #+3]
ldrb r2, [r1, #+2]
orr r3, r2, r3, lsl #8
ldrb r2, [r1, #+1]
ldrb r1, [r1]
orr r2, r1, r2, lsl #8
orr r3, r2, r3, lsl #16
strb r3, [r0]
mov r2, r3, lsr #24
strb r2, [r0, #+3]
mov r2, r3, lsr #16
strb r2, [r0, #+2]
mov r3, r3, lsr #8
strb r3, [r0, #+1]
bx lr
testcase here: test/CodeGen/ARM/truncstore-dag-combine.ll
This also helps occasionally for X86 and other cases not involving
unaligned load/stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42954
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 13 Oct 2007 06:56:18 +0000 (06:56 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42953
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 13 Oct 2007 06:35:54 +0000 (06:35 +0000)]
Add a simple optimization to simplify the input to
truncate and truncstore instructions, based on the
knowledge that they don't demand the top bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42952
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Sat, 13 Oct 2007 03:34:08 +0000 (03:34 +0000)]
If the power of 5 is exact, and the reciprocal exact, the error is zero not one half-ulps. This prevents an infinite loop in rare cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42950
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 13 Oct 2007 03:14:06 +0000 (03:14 +0000)]
Fix test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42949
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 13 Oct 2007 03:10:54 +0000 (03:10 +0000)]
New tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42948
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 13 Oct 2007 02:50:24 +0000 (02:50 +0000)]
Local spiller optimization:
Turn this:
movswl %ax, %eax
movl %eax, -36(%ebp)
xorl %edi, -36(%ebp)
into
movswl %ax, %eax
xorl %edi, %eax
movl %eax, -36(%ebp)
by unfolding the load / store xorl into an xorl and a store when we know the
value in the spill slot is available in a register. This doesn't change the
number of instructions but reduce the number of times memory is accessed.
Also unfold some load folding instructions and reuse the value when similar
situation presents itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42947
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 13 Oct 2007 02:35:06 +0000 (02:35 +0000)]
Change unfoldMemoryOperand(). User is now responsible for passing in the
register used by the unfolded instructions. User can also specify whether to
unfold the load, the store, or both.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42946
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 13 Oct 2007 02:23:01 +0000 (02:23 +0000)]
Optionally create a MachineInstr without default implicit operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42945
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 12 Oct 2007 21:53:12 +0000 (21:53 +0000)]
Correcting the corrections. Bad bad baaad emacs!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42935
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 12 Oct 2007 21:30:57 +0000 (21:30 +0000)]
Corrected many typing errors. And removed 'nest' parameter handling
for fastcc from X86CallingConv.td. This means that nested functions
are not supported for calling convention 'fastcc'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42934
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 12 Oct 2007 20:42:14 +0000 (20:42 +0000)]
Fix this test to not depend on the assembly output containing something
that includes the string "st". This probably fixes the regression on
Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42932
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 12 Oct 2007 20:10:21 +0000 (20:10 +0000)]
Dest type is always i8 *. This allows some simplification.
Do not filter memmove.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42930
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 12 Oct 2007 20:04:24 +0000 (20:04 +0000)]
t
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42929
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Fri, 12 Oct 2007 19:48:13 +0000 (19:48 +0000)]
Fix ocaml bindings for picky linkers. :)
Thanks to Török Edvin for helping to track this down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42927
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 12 Oct 2007 19:37:31 +0000 (19:37 +0000)]
Due to the new tail call optimization, trampolines can no
longer be created for fastcc functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42925
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 12 Oct 2007 19:02:17 +0000 (19:02 +0000)]
ppc long double. Implement fabs and fneg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42924
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 18:22:55 +0000 (18:22 +0000)]
Update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42922
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Oct 2007 18:16:23 +0000 (18:16 +0000)]
don't use intptr_t without including it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42921
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Oct 2007 18:05:47 +0000 (18:05 +0000)]
Fix a bug in my patch last night that broke InstCombine/2007-10-12-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42920
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 12 Oct 2007 17:52:03 +0000 (17:52 +0000)]
Implement i64->ppcf128 conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42919
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Oct 2007 17:49:52 +0000 (17:49 +0000)]
Make this compute the correct offset, handling alignment of the element
pointer correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42918
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 17:16:50 +0000 (17:16 +0000)]
Did mean to leave this in. INSERT_SUBREG isn't being coalesced yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42916
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Fri, 12 Oct 2007 16:05:57 +0000 (16:05 +0000)]
Remove duplicate comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42913
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Fri, 12 Oct 2007 16:02:31 +0000 (16:02 +0000)]
Implement correctly-rounded decimal->binary conversion, i.e. conversion
from user input strings.
Such conversions are more intricate and subtle than they may appear;
it is unlikely I have got it completely right first time. I would
appreciate being informed of any bugs and incorrect roundings you
might discover.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42912
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Fri, 12 Oct 2007 15:35:10 +0000 (15:35 +0000)]
Remove a field that was never used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42911
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Fri, 12 Oct 2007 15:33:27 +0000 (15:33 +0000)]
If we're trying to be arbitrary precision, unsigned char clearly won't cut it. Needed for dec->bin conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42910
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Booth [Fri, 12 Oct 2007 15:31:31 +0000 (15:31 +0000)]
Don't attempt to mask no bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42909
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 12 Oct 2007 14:53:36 +0000 (14:53 +0000)]
Change the names used for internal labels to use the current
function symbol name instead of a codegen-assigned function
number.
Thanks Evan! :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42908
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 12 Oct 2007 14:33:11 +0000 (14:33 +0000)]
Fix some corner cases with vectors in copyToRegs and copyFromRegs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42907
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 12 Oct 2007 14:13:46 +0000 (14:13 +0000)]
Add support to SplitVectorOp for powi, where the second operand
is a scalar integer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42906
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 12 Oct 2007 14:09:42 +0000 (14:09 +0000)]
Mark vector ctpop, cttz, and ctlz as Expand on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42905
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 12 Oct 2007 14:08:57 +0000 (14:08 +0000)]
Mark vector pow, ctpop, cttz, and ctlz as Expand on PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42904
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 09:15:53 +0000 (09:15 +0000)]
Restrict EXTRACT_SUBREG coalescing to avoid negative performance impact.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42903
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 09:10:27 +0000 (09:10 +0000)]
Doh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42901
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 09:03:31 +0000 (09:03 +0000)]
EXTRACT_SUBREG test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42900
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 08:50:34 +0000 (08:50 +0000)]
EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like
(almost) a register copy. However, it always coalesced to the register of the
RHS (the super-register). All uses of the result of a EXTRACT_SUBREG are sub-
register uses which adds subtle complications to load folding, spiller rewrite,
etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42899
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 08:45:27 +0000 (08:45 +0000)]
Some clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42898
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 08:40:44 +0000 (08:40 +0000)]
Cosmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42897
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 08:39:02 +0000 (08:39 +0000)]
Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42896
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 08:38:01 +0000 (08:38 +0000)]
Fold load / store into MOV32to32_ and MOV16to16_.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42895
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 12 Oct 2007 07:55:53 +0000 (07:55 +0000)]
Flag MOV32to32_ with EXTRACT_SUBREG. They should not be scheduled apart.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42894
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 12 Oct 2007 07:49:48 +0000 (07:49 +0000)]
Added missing -march=x86 flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42893
91177308-0d34-0410-b5e6-
96231b3b80d8