Chris Lattner
ff3e50cc39
Fix some serious bugs in promotion.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19578 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 00:17:42 +00:00
Chris Lattner
950aa3ca2c
Eliminate unneeded extensions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19577 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 00:17:20 +00:00
Chris Lattner
8b6fa22e72
Implement promotion of a whole bunch more operators. I think that this is
...
basically everything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19576 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 22:16:26 +00:00
Chris Lattner
8a389bb376
Print extra type for nodes with extra type info.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19575 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 21:11:37 +00:00
Chris Lattner
45b8caf1c5
Add support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, and
...
ZERO_EXTEND_INREG for targets that don't support them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19573 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 07:15:18 +00:00
Chris Lattner
4ea6924444
Common code factored out.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19572 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 07:14:32 +00:00
Chris Lattner
57bf3287dd
implement these methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19571 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 06:52:40 +00:00
Chris Lattner
0f69b29108
Add support for promoting ADD/MUL.
...
Add support for new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
Realize that if we do any promotions, we need to iterate SelectionDAG
construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19569 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 06:18:18 +00:00
Chris Lattner
859157daee
Add new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19568 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 06:17:04 +00:00
Chris Lattner
45554a61f2
Add a new target-independent code generator flag.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19567 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 06:00:32 +00:00
Chris Lattner
e9ef81dd2f
Add support for truncstore and *extload.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19566 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 05:22:24 +00:00
Chris Lattner
03c8546ec5
Add intitial support for promoting some operators.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19565 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 05:21:40 +00:00
Reid Spencer
e1c6bfa385
We don't distribute the operating system specific directories any more.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19563 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 22:43:01 +00:00
Chris Lattner
69a52155d2
Adjust to CopyFromReg changes, implement deletion of truncating/extending
...
stores/loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19562 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 22:38:01 +00:00
Chris Lattner
7f2afac1dc
Adjust to CopyFromREg changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19561 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 22:37:41 +00:00
Chris Lattner
2ee743ff9b
Start implementing truncating stores and extending loads.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19559 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 22:08:15 +00:00
Chris Lattner
3c70764907
Fix Regression/CodeGen/PowerPC/2005-01-14-UndefLong.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19557 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 20:22:02 +00:00
Chris Lattner
fbd4de1d9b
Fix: Regression/CodeGen/PowerPC/2005-01-14-SetSelectCrash.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19555 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 19:31:00 +00:00
Chris Lattner
906ab50acf
Fix some bugs in an xform added yesterday. This fixes Prolangs-C/allroots.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19553 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 17:35:12 +00:00
Chris Lattner
6f7f02fdec
Fix a compile crash on spiff
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19552 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 17:17:59 +00:00
Chris Lattner
8f1d6402ba
Improve compatibility with acc
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19549 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 15:54:24 +00:00
Chris Lattner
9a791eaf8f
Make this compatible with the HP/intel compiler. Fix by Duraid, thanks!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19548 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 15:53:26 +00:00
Jeff Cohen
3bbbcc113b
Fix and improve win32 path validation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19545 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 04:09:39 +00:00
Reid Spencer
62582720e6
Make asctime_r work for HP/UX.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19544 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 00:50:50 +00:00
Chris Lattner
4401c9cabe
if two gep comparisons only differ by one index, compare that index directly.
...
This allows us to better optimize begin() -> end() comparisons in common cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19542 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 00:20:05 +00:00
Chris Lattner
0b84c80c08
Do not overrun iterators. This fixes a 176.gcc crash
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19541 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 23:26:48 +00:00
Chris Lattner
87875dac89
Turn select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y))). This occurs in
...
the 'sim' program and probably elsewhere. In sim, it comes up for cases
like this:
#define round(x) ((x)>0.0 ? (x)+0.5 : (x)-0.5)
double G;
void T(double X) { G = round(X); }
(it uses the round macro a lot). This changes the LLVM code from:
%tmp.1 = setgt double %X, 0.000000e+00 ; <bool> [#uses=1]
%tmp.4 = add double %X, 5.000000e-01 ; <double> [#uses=1]
%tmp.6 = sub double %X, 5.000000e-01 ; <double> [#uses=1]
%mem_tmp.0 = select bool %tmp.1, double %tmp.4, double %tmp.6
store double %mem_tmp.0, double* %G
to:
%tmp.1 = setgt double %X, 0.000000e+00 ; <bool> [#uses=1]
%mem_tmp.0.p = select bool %tmp.1, double 5.000000e-01, double -5.000000e-01
%mem_tmp.0 = add double %mem_tmp.0.p, %X
store double %mem_tmp.0, double* %G
ret void
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19537 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 22:52:24 +00:00
Chris Lattner
e9d782b7be
Implement an optimization for == and != comparisons like this:
...
_Bool test2(int X, int Y) {
return &arr[X][Y] == arr;
}
instead of generating this:
bool %test2(int %X, int %Y) {
%tmp.3.idx = mul int %X, 160 ; <int> [#uses=1]
%tmp.3.idx1 = shl int %Y, ubyte 2 ; <int> [#uses=1]
%tmp.3.offs2 = sub int 0, %tmp.3.idx ; <int> [#uses=1]
%tmp.7 = seteq int %tmp.3.idx1, %tmp.3.offs2 ; <bool> [#uses=1]
ret bool %tmp.7
}
generate this:
bool %test2(int %X, int %Y) {
seteq int %X, 0 ; <bool>:0 [#uses=1]
seteq int %Y, 0 ; <bool>:1 [#uses=1]
%tmp.7 = and bool %0, %1 ; <bool> [#uses=1]
ret bool %tmp.7
}
This idiom occurs in C++ programs when iterating from begin() to end(),
in a vector or array. For example, we now compile this:
void test(int X, int Y) {
for (int *i = arr; i != arr+100; ++i)
foo(*i);
}
to this:
no_exit: ; preds = %entry, %no_exit
...
%exitcond = seteq uint %indvar.next, 100 ; <bool> [#uses=1]
br bool %exitcond, label %return, label %no_exit
instead of this:
no_exit: ; preds = %entry, %no_exit
...
%inc5 = getelementptr [100 x [40 x int]]* %arr, int 0, int 0, int %inc.rec ; <int*> [#uses=1]
%tmp.8 = seteq int* %inc5, getelementptr ([100 x [40 x int]]* %arr, int 0, int 100, int 0) ; <bool> [#uses=1]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
br bool %tmp.8, label %return, label %no_exit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19536 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 22:25:21 +00:00
Chris Lattner
18c2f13e0f
Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19535 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 20:50:02 +00:00
Chris Lattner
5bdf04cc8e
Fix some bugs in code I didn't mean to check in.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19534 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 20:40:58 +00:00
Chris Lattner
574da9ba0b
Fix a crash compiling 129.compress
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19533 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 20:14:25 +00:00
Chris Lattner
1d50b7fa53
Codegen factor nodes more intelligently according to perceived register pressure.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19532 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 19:56:00 +00:00
Chris Lattner
5a6c6d98d5
Don't forget the existing root.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19531 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 19:53:14 +00:00
Chris Lattner
c35807155c
Initial trivial (but stupid) codegen for this node.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19529 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 18:01:36 +00:00
Chris Lattner
ddb870b065
Codegen independent ops as being independent.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19528 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 17:59:43 +00:00
Chris Lattner
a385e9b20f
Legalize new node, add assertion.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19527 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 17:59:25 +00:00
Chris Lattner
282c5cae89
Print new node.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19526 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 17:59:10 +00:00
Chris Lattner
636e79a20f
Add some really pedantic assertions to the load folding code. Fix a bunch
...
of cases where we accidentally emitted a load folded once and unfolded
elsewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19522 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 05:53:16 +00:00
Chris Lattner
2f0ca79a75
Do not fold (zero_ext (sign_ext V)) -> (sign_ext V), they are not the same.
...
This fixes llvm-test/SingleSource/Regression/C/casts.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19519 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 18:51:15 +00:00
Chris Lattner
a0bb692b27
We can only fold a load into an op if there is exactly one use of the value.
...
Checking to see if the load has two uses is not equivalent, as the chain
value may have zero uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19518 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 18:38:26 +00:00
Chris Lattner
5c88456227
New method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19517 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 18:37:47 +00:00
Chris Lattner
2dad454af6
Fix sign extend to long. When coming from sbyte, we used to generate:
...
movsbl 4(%esp), %eax
movl %eax, %edx
sarl $7, %edx
Now we generate:
movsbl 4(%esp), %eax
movl %eax, %edx
sarl $31, %edx
Which is right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19515 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 18:19:52 +00:00
Chris Lattner
9bbd992eb1
Try both ways to fold an add together. This allows us to generate this code
...
imul %EAX, %EAX, 400
add %ECX, %EAX
add %ESI, DWORD PTR [%ECX + 4*%EDX]
inc %EDX
cmp %EDX, 100
instead of this:
imul %EAX, %EAX, 400
add %ECX, %EAX
mov %EAX, %EDX
shl %EAX, 2
add %ECX, %EAX
add %ESI, DWORD PTR [%ECX]
inc %EDX
cmp %EDX, 100
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19513 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 18:08:53 +00:00
Reid Spencer
3bfbf4ea99
Shut up warnings with GCC 3.4.3 about uninitialized variables.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19512 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 14:53:45 +00:00
Chris Lattner
2b9378646d
Fix a major miscompilation where we were overwriting the scale reg.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19511 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 07:33:20 +00:00
Chris Lattner
48034fd9f1
Do not use the type of the RHS constant to determine the type of the operation.
...
This fails for shifts because the constant is always 8 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19508 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 05:22:07 +00:00
Chris Lattner
a23ccfb124
Do not lose the offset from teh global when peephole optimizing instructions.
...
This fixes FreeBench/pcompress
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19507 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 05:17:28 +00:00
Chris Lattner
507bdf9488
Silence VC++ warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19506 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:51:37 +00:00
Jeff Cohen
603fea9eb6
Fix C++ more compilatiom errors
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19504 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:29:05 +00:00
Chris Lattner
a56cea4495
Fix a compile error with VC++, which things that static const arrays need
...
to be dynamically initialized. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19503 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:23:22 +00:00
Chris Lattner
7dbcb75b15
Fix a bug that caused us to crash on povray. We weren't emitting an FP_REG_KILL into a block that had a successor with a FP PHI node.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19502 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:21:28 +00:00
Chris Lattner
e11a9a93a8
Print a load of a null pointer (in intel mode) like this:
...
mov %AX, WORD PTR [0]
instead of like this:
mov %AX, WORD PTR []
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19501 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:07:11 +00:00
Chris Lattner
9f2cb3da48
Print a load of a null pointer like this:
...
movw 0, %ax
instead of like this:
movw , %ax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19500 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:05:19 +00:00
Chris Lattner
085c9955ca
Fix a crash compiling povray on UINT_TO_FP from i16.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19499 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:00:00 +00:00
Chris Lattner
7944d9d995
Add an option to view the selection dags as they are generated.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19498 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 03:41:21 +00:00
Chris Lattner
4292830fe5
There are no [mem] op= reg instructions for FP, so remove their entries.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19496 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 03:16:09 +00:00
Chris Lattner
db8c368d7b
Fix a bug where we didn't insert FP_REG_KILL instructions into MBB's that
...
contain FP PHI nodes but no other FP defining instructions. This fixes
183.equake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19495 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 02:57:10 +00:00
Chris Lattner
afce4306ec
Fold TRUNCATE (LOAD P) into a smaller load from P.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19494 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 02:19:06 +00:00
Chris Lattner
ef6806c979
Be more careful about order of arg evalution for CopyToReg nodes. This shrinks
...
256.bzip2 from 7142 to 7103 lines of .s file.
Second, add initial support for folding loads into compares, though this code
is dynamically dead for now. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19493 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 02:02:48 +00:00
Chris Lattner
7ea64f5d12
Fold some more [mem] op= val operators. This allows us to things like this
...
several times in 256.bzip2:
mov %EAX, DWORD PTR [%ESP + 204]
- mov %EAX, DWORD PTR [%EAX]
- or %EAX, 2097152
- mov %ECX, DWORD PTR [%ESP + 204]
- mov DWORD PTR [%ECX], %EAX
+ or DWORD PTR [%EAX], 2097152
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19492 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 01:28:00 +00:00
Chris Lattner
dbba22fa2a
Fold loads into sign/zero extends. instead of:
...
mov %AL, BYTE PTR [%EDX + l18_length_code]
movzx %EAX, %AL
Emit:
movzx %EAX, BYTE PTR [%EDX + l18_length_code]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19489 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 23:33:00 +00:00
Chris Lattner
837caa7223
Comment out debug code :)
...
Select [mem] += Val operations. For constants, we used to get:
mov %ECX, -32768
add %ECX, DWORD PTR [l4_match_start]
mov DWORD PTR [l4_match_start], %ECX
Now we get:
add DWORD PTR [l4_match_start], -32768
For other values we used to get:
mov %EBP, %EDI ;; because the add destroys the value
add %EBP, DWORD PTR [l4_input_len]
mov DWORD PTR [l4_input_len], %EBP
now we get:
add DWORD PTR [l4_input_len], %EDI
Both of these use less registers than the alternative, are faster and smaller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19488 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 23:21:30 +00:00
Chris Lattner
5f75d9a88c
Handle the global address case here, not just the offset case.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19487 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 22:58:43 +00:00
Chris Lattner
c4b6a78980
Treat int constants as not requiring a register, since they are almost always
...
folded into an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19486 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 22:29:12 +00:00
Chris Lattner
c871e1d56f
Print the value types in the nodes of the graph
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19485 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 22:21:04 +00:00
Chris Lattner
f1fdacae8c
add an assertion, avoid creating copyfromreg/copytoreg pairs that are the
...
same for PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19484 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 22:03:46 +00:00
Chris Lattner
a5ade060db
* Factor a bunch of binary operator cases into shared code.
...
* Fold loads into Add, sub, and, or, xor and mul when possible.
* Codegen shl X, 1 as add X, X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19483 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 21:19:59 +00:00
Chris Lattner
7abf820182
Clear the whole array, always.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19482 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 20:25:26 +00:00
Chris Lattner
947d544e29
Fold multiplies by 3,5,9 into addressing modes when possible.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 19:37:02 +00:00
Chris Lattner
64da653ba9
Squelch optimized warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19475 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 17:46:49 +00:00
Chris Lattner
51a263434a
Instead of generating stuff like this:
...
mov %ECX, %EAX
add %ECX, 32768
mov %SI, WORD PTR [2*%ECX + l13_prev]
Generate this:
mov %SI, WORD PTR [2*%ECX + l13_prev + 65536]
This occurs when you have a GEP instruction where an index is
"something + imm".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19472 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 06:36:20 +00:00
Chris Lattner
31805bf2b6
Implement MEMCPY natively in terms of rep movs*
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19468 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 06:19:26 +00:00
Chris Lattner
989de030c4
Implement memset -> rep stos*
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19467 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 06:14:36 +00:00
Chris Lattner
795069dd38
Announce that we don't support mem ops yet.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19466 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 05:57:36 +00:00
Chris Lattner
e1bd822ddb
Teach legalize to lower MEMSET/MEMCPY/MEMMOVE operations if the target
...
does not support them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19465 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 05:57:22 +00:00
Chris Lattner
4c633e82f6
Print new operations.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19464 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 05:57:01 +00:00
Chris Lattner
7041ee35ad
Turn memset/memcpy/memmove into the corresponding operations.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19463 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 05:56:49 +00:00
Chris Lattner
a95589be3f
Teach the address selector to make 'reg+reg' addressing modes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19457 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 04:40:19 +00:00
Reid Spencer
99f997d2c1
Add the LOADABLE_MODULE=1 directive to indicate that this shared library is
...
intended to be a dlopenable module and not a "plain" shared library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19456 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 04:33:32 +00:00
Chris Lattner
d4dab929d8
Emit NOT instructions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19455 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 04:31:30 +00:00
Chris Lattner
a8d9cc8705
shift X, 0 -> X
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19453 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 04:25:13 +00:00
Chris Lattner
6c07aee7c9
Fix a bug emitting branches that broke a lot of programs.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19452 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 04:06:27 +00:00
Chris Lattner
ef7ba0756b
Be more careful where we set ContainsFPCode. We were missing a set in the
...
int -> FP casting code. Note that we don't have to set it for FP operations
that take FP values as operands: whatever produces the FP value will set the
flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19451 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 03:50:45 +00:00
Chris Lattner
a3aa2e2882
Fix a major bug in setcc/cmov folding, where we accidentally
...
inverted the sense of the comparison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19450 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 03:37:59 +00:00
Chris Lattner
1133309e57
Take register pressure into account when we have to decide whether to
...
evaluate the LHS or the RHS of an operation first. This causes good things
to happen. For example, instead of compiling a loop to this:
.LBBstrength_result7_1: # loopentry
movl 16(%esp), %edi
movl (%edi), %edi ;;; LOAD
movl (%ecx), %ebx
movl $2, (%eax,%ebx,4)
movl (%edx), %ebx
movl %esi, %ebp
addl $21, %ebp
addl $42, %esi
cmpl $0, %edi ;;; USE
cmovne %esi, %ebp
cmpl %ebp, %ebx
movl %ebp, %esi
jg .LBBstrength_result7_1
We now compile it to this:
.LBBstrength_result7_1: # loopentry
movl %edi, %ebx
addl $42, %ebx
addl $21, %edi
movl (%ecx), %ebp ;; LOAD
cmpl $0, %ebp ;; USE
cmovne %ebx, %edi
movl (%edx), %ebx
movl $2, (%eax,%ebx,4)
movl (%esi), %ebx
cmpl %edi, %ebx
jg .LBBstrength_result7_1
Which reduces register pressure enough (in this case) to avoid spilling in the
loop.
As another example, consider the CodeGen/X86/regpressure.ll testcase. We
used to generate this code for both cases:
regpressure1:
subl $32, %esp
movl %esi, 12(%esp)
movl %edi, 8(%esp)
movl %ebx, 4(%esp)
movl %ebp, (%esp)
movl 36(%esp), %ecx
movl (%ecx), %eax
movl 4(%ecx), %edx
movl %edx, 24(%esp)
movl 8(%ecx), %edx
movl %edx, 16(%esp)
movl 12(%ecx), %edx
movl 16(%ecx), %esi
movl 20(%ecx), %edi
movl 24(%ecx), %ebx
movl %ebx, 28(%esp)
movl 28(%ecx), %ebx
movl 32(%ecx), %ebp
movl %ebp, 20(%esp)
movl 36(%ecx), %ecx
imull 24(%esp), %eax
imull 16(%esp), %eax
imull %edx, %eax
imull %esi, %eax
imull %edi, %eax
imull 28(%esp), %eax
imull %ebx, %eax
imull 20(%esp), %eax
imull %ecx, %eax
movl (%esp), %ebp
movl 4(%esp), %ebx
movl 8(%esp), %edi
movl 12(%esp), %esi
addl $32, %esp
ret
This code is basically trying to do all of the loads first, then execute all
of the multiplies. Because we run out of registers, lots of spill code happens.
We now generate this code for both cases:
regpressure1:
movl 4(%esp), %ecx
movl (%ecx), %eax
movl 4(%ecx), %edx
imull %edx, %eax
movl 8(%ecx), %edx
imull %edx, %eax
movl 12(%ecx), %edx
imull %edx, %eax
movl 16(%ecx), %edx
imull %edx, %eax
movl 20(%ecx), %edx
imull %edx, %eax
movl 24(%ecx), %edx
imull %edx, %eax
movl 28(%ecx), %edx
imull %edx, %eax
movl 32(%ecx), %edx
imull %edx, %eax
movl 36(%ecx), %ecx
imull %ecx, %eax
ret
which is much nicer (when we fold loads into the muls it will be even better).
The old instruction selector used to produce the good code for regpressure1
but not for regpressure2, as it depended on the order of operations in the
LLVM code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19449 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 03:11:44 +00:00
Chris Lattner
e9c44cdf18
Print SelectionDAGs bottom up, include extra info in the node labels
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19447 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 00:34:33 +00:00
Chris Lattner
fc08d9c789
Add a marker for the graph root.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19445 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 23:52:04 +00:00
Chris Lattner
e0646b86e3
Put the operation name in each node, put the function name on the graph.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19444 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 23:26:00 +00:00
Chris Lattner
d75f19fa42
Split out SDNode::getOperationName into its own method.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19443 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 23:25:25 +00:00
Chris Lattner
66328480bb
Implement initial selectiondag printing support. This gets us a nice
...
graph with no labels! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19441 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 23:08:40 +00:00
Chris Lattner
24aad1b0c1
Fold setcc instructions into selects.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19438 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 22:10:13 +00:00
Chris Lattner
57fbfb5879
Add conditional moves for the parity flag.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19437 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 22:09:33 +00:00
Chris Lattner
6b7598b995
Lower to the correct functions. This fixes FreeBench/fourinarow
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19436 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 21:02:37 +00:00
Chris Lattner
a13d3236d1
Implement 8-bit multiply for X86.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19435 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 20:55:48 +00:00
Chris Lattner
281a601198
Rework constant pool handling so that function constant pools are no longer
...
leaked to the system. Now they are destroyed with the JITMemoryManager is
destroyed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19434 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 18:23:22 +00:00
Jeff Cohen
ecc1cef8bf
Apply feedback from Chris.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19432 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 04:23:32 +00:00
Jeff Cohen
6e400f76e6
Apply feed back from Chris:
...
1. Rename createLoaderPass to CreateProfileLoaderPass
2. Opt shouldn't use the pass registered in CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19431 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 03:56:27 +00:00
Chris Lattner
68dc310942
Implement a couple of more simplifications. This lets us codegen:
...
int test2(int * P, int* Q, int A, int B) {
return P+A == P;
}
into:
test2:
movl 4(%esp), %eax
movl 12(%esp), %eax
shll $2, %eax
cmpl $0, %eax
sete %al
movzbl %al, %eax
ret
instead of:
test2:
movl 4(%esp), %eax
movl 12(%esp), %ecx
leal (%eax,%ecx,4), %ecx
cmpl %eax, %ecx
sete %al
movzbl %al, %eax
ret
ICC is producing worse code:
test2:
movl 4(%esp), %eax #8.5
movl 12(%esp), %edx #8.5
lea (%edx,%edx), %ecx #9.9
addl %ecx, %ecx #9.9
addl %eax, %ecx #9.9
cmpl %eax, %ecx #9.16
movl $0, %eax #9.16
sete %al #9.16
ret #9.16
as is GCC (looks like our old code):
test2:
movl 4(%esp), %edx
movl 12(%esp), %eax
leal (%edx,%eax,4), %ecx
cmpl %edx, %ecx
sete %al
movzbl %al, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19430 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 02:03:02 +00:00
Chris Lattner
87ae6ae41c
Fix incorrect constant folds, fixing Stepanov after the SHR patch.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19429 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 01:16:03 +00:00
Chris Lattner
8136d1f8cb
Constant fold shifts, turning this loop:
...
.LBB_Z5test0PdS__3: # no_exit.1
fldl data(,%eax,8)
fldl 24(%esp)
faddp %st(1)
fstl 24(%esp)
incl %eax
movl $16000, %ecx
sarl $3, %ecx
cmpl %eax, %ecx
fstpl 16(%esp)
#FP_REG_KILL
jg .LBB_Z5test0PdS__3 # no_exit.1
into:
.LBB_Z5test0PdS__3: # no_exit.1
fldl data(,%eax,8)
fldl 24(%esp)
faddp %st(1)
fstl 24(%esp)
incl %eax
cmpl $2000, %eax
fstpl 16(%esp)
#FP_REG_KILL
jl .LBB_Z5test0PdS__3 # no_exit.1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 00:07:15 +00:00
Reid Spencer
bccc8abc79
Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the silly
...
gdb debugger doesn't get confused on which file it is reading (the one in
lib/System or the one in lib/System/{Win32,Unix})
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19426 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 23:29:00 +00:00
Chris Lattner
5cdcc58d51
Add some folds for == and != comparisons. This allows us to
...
codegen this loop in stepanov:
no_exit.i: ; preds = %entry, %no_exit.i, %then.i, %_Z5checkd.exit
%i.0.0 = phi int [ 0, %entry ], [ %i.0.0, %no_exit.i ], [ %inc.0, %_Z5checkd.exit ], [ %inc.012, %then.i ] ; <int> [#uses=3]
%indvar = phi uint [ %indvar.next, %no_exit.i ], [ 0, %entry ], [ 0, %then.i ], [ 0, %_Z5checkd.exit ] ; <uint> [#uses=3]
%result_addr.i.0 = phi double [ %tmp.4.i.i, %no_exit.i ], [ 0.000000e+00, %entry ], [ 0.000000e+00, %then.i ], [ 0.000000e+00, %_Z5checkd.exit ] ; <double> [#uses=1]
%first_addr.0.i.2.rec = cast uint %indvar to int ; <int> [#uses=1]
%first_addr.0.i.2 = getelementptr [2000 x double]* %data, int 0, uint %indvar ; <double*> [#uses=1]
%inc.i.rec = add int %first_addr.0.i.2.rec, 1 ; <int> [#uses=1]
%inc.i = getelementptr [2000 x double]* %data, int 0, int %inc.i.rec ; <double*> [#uses=1]
%tmp.3.i.i = load double* %first_addr.0.i.2 ; <double> [#uses=1]
%tmp.4.i.i = add double %result_addr.i.0, %tmp.3.i.i ; <double> [#uses=2]
%tmp.2.i = seteq double* %inc.i, getelementptr ([2000 x double]* %data, int 0, int 2000) ; <bool> [#uses=1]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
br bool %tmp.2.i, label %_Z10accumulateIPddET0_T_S2_S1_.exit, label %no_exit.i
To this:
.LBB_Z4testIPddEvT_S1_T0__1: # no_exit.i
fldl data(,%eax,8)
fldl 16(%esp)
faddp %st(1)
fstpl 16(%esp)
incl %eax
movl %eax, %ecx
shll $3, %ecx
cmpl $16000, %ecx
#FP_REG_KILL
jne .LBB_Z4testIPddEvT_S1_T0__1 # no_exit.i
instead of this:
.LBB_Z4testIPddEvT_S1_T0__1: # no_exit.i
fldl data(,%eax,8)
fldl 16(%esp)
faddp %st(1)
fstpl 16(%esp)
incl %eax
leal data(,%eax,8), %ecx
leal data+16000, %edx
cmpl %edx, %ecx
#FP_REG_KILL
jne .LBB_Z4testIPddEvT_S1_T0__1 # no_exit.i
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19425 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:52:51 +00:00
Jeff Cohen
1d7b5de7ee
Add last four createXxxPass functions
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19424 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:42:52 +00:00
Jeff Cohen
fd161e964a
Fix VC++ compilation error
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19423 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:41:56 +00:00
Chris Lattner
ea946cdb1b
Print the DAG out more like a DAG in nested format.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19422 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:38:33 +00:00
Chris Lattner
49d24716a4
Print out nodes sorted by their address to make it easier to find them in a list.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19421 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:26:36 +00:00
Chris Lattner
bd9f0eefb2
Codegen (Reg|imm)+&GV as an LEA, because we cannot put it into the immediate field
...
of an ADDri (due to current restrictions on MachineOperand :( ). This allows
us to generate:
leal Data+16000, %edx
instead of:
movl $Data, %edx
addl $16000, %edx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19420 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:20:29 +00:00
Chris Lattner
abd2182875
Add a simple transformation. This allows us to compile one of the inner
...
loops in stepanov to this:
.LBB_Z5test0PdS__2: # no_exit.1
fldl data(,%eax,8)
fldl 24(%esp)
faddp %st(1)
fstl 24(%esp)
incl %eax
cmpl $2000, %eax
fstpl 16(%esp)
#FP_REG_KILL
jl .LBB_Z5test0PdS__2
instead of this:
.LBB_Z5test0PdS__2: # no_exit.1
fldl data(,%eax,8)
fldl 24(%esp)
faddp %st(1)
fstl 24(%esp)
incl %eax
movl $data, %ecx
movl %ecx, %edx
addl $16000, %edx
subl %ecx, %edx
movl %edx, %ecx
sarl $2, %ecx
shrl $29, %ecx
addl %ecx, %edx
sarl $3, %edx
cmpl %edx, %eax
fstpl 16(%esp)
#FP_REG_KILL
jl .LBB_Z5test0PdS__2
The old instruction selector produced:
.LBB_Z5test0PdS__2: # no_exit.1
fldl 24(%esp)
faddl data(,%eax,8)
fstl 24(%esp)
movl %eax, %ecx
incl %ecx
incl %eax
leal data+16000, %edx
movl $data, %edi
subl %edi, %edx
movl %edx, %edi
sarl $2, %edi
shrl $29, %edi
addl %edi, %edx
sarl $3, %edx
cmpl %edx, %ecx
fstpl 16(%esp)
#FP_REG_KILL
jl .LBB_Z5test0PdS__2 # no_exit.1
Which is even worse!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19419 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:09:57 +00:00
Chris Lattner
250208587d
Fix copy and pasto's for FP -> Int. This fixes fldry
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19418 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 19:49:59 +00:00
Chris Lattner
38d6be5d49
Fix a bug legalizing call instructions (make sure to remember all result
...
values), and eliminate some switch statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19417 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 19:43:23 +00:00
Chris Lattner
513e52ec4e
Fix a minor bug legalizing dynamic_stackalloc. This allows us to compile
...
std::__pad<wchar_t, std::char_traits<wchar_t> >::_S_pad(std::ios_base&, wchar_t, wchar_t*, wchar_t const*, int, int, bool)
from libstdc++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 19:07:54 +00:00
Chris Lattner
fa404e8a76
Teach legalize to deal with DYNAMIC_STACKALLOC (aka a dynamic llvm alloca)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19415 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 19:03:49 +00:00
Chris Lattner
590d800a12
Initial implementation of FP->INT and INT->FP casts
...
Also, fix zero_extend from bool to i8, which fixes Shootout/objinst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19414 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 18:52:44 +00:00
Jeff Cohen
2611dd4448
Get lib/Analysis/DataStructure to compile with VC++
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19412 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 04:18:28 +00:00
Chris Lattner
6e7c47c12d
Fix a subtle bug involving constant expr casts from int to fp
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19410 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 01:49:29 +00:00
Chris Lattner
ee749d7488
Handle static alloca arguments to PHI nodes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19409 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 01:16:24 +00:00
Chris Lattner
1482458b23
Implement varargs and returnaddress/frameaddress intrinsics. With this
...
patch, all of SingleSource/UnitTests passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 00:01:27 +00:00
Chris Lattner
39ae362279
Use new interfaces to correctly lower varargs and return/frame address intrinsics.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19407 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 00:00:49 +00:00
Chris Lattner
64e14b1679
Add support for llvm.setjmp and longjmp. Only 3 SingleSource/UnitTests fail now.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19404 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 22:48:57 +00:00
Jeff Cohen
534927d82d
Add even more missing createXxxPass functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19402 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 22:01:16 +00:00
Chris Lattner
b0802651bf
Okay 15th time is the charm. Looking at the vector size is useless as it
...
gets clobbered by a previous statement. This fixes all calls finally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19399 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:51:36 +00:00
Chris Lattner
6cc70ef0f9
Okay, my off by one was actually off by two. This fixes Generic/2003-07-07-BadLongConst.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19398 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:39:31 +00:00
Chris Lattner
e3304a3d24
Tighten up assertions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19397 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:35:13 +00:00
Chris Lattner
ce45d65d9a
Fix off by one error
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19396 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:31:34 +00:00
Chris Lattner
7d7a0ed4ec
Allow arrays to have more than 4G elements.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19395 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:19:51 +00:00
Jeff Cohen
e269a1ac1c
Use size_t instead of long to represent memory usage. long is 32 bits
...
on 64-bit Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19393 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:15:57 +00:00
Chris Lattner
9dacd128b4
Silence warnings
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19392 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:13:44 +00:00
Chris Lattner
813c815282
Silence VS warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19391 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:13:19 +00:00
Chris Lattner
a8101c163d
Silence VS warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19390 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:07:03 +00:00
Chris Lattner
d564496b46
Silence VS warnings
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19389 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:05:34 +00:00
Chris Lattner
dea18b6c0d
Silence VS warnings
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19388 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:59:10 +00:00
Chris Lattner
28696bee02
Silence warnings from VS
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19386 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:55:00 +00:00
Chris Lattner
5e5fb942e6
Silence VS warnings
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19385 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:53:50 +00:00
Chris Lattner
f26bc8ef48
Silence VS warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19384 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:52:31 +00:00
Chris Lattner
22bc934720
Fix VS warnings
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19383 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:48:40 +00:00
Chris Lattner
4d0801b243
Fix VS warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19382 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:45:31 +00:00
Chris Lattner
652f3cf76f
Fix uint64_t -> unsigned VS warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19381 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:42:22 +00:00
Chris Lattner
d4bc564531
Silence VS warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19380 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:37:20 +00:00
Chris Lattner
2cc34627bb
Silence warnings
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19379 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:34:41 +00:00
Chris Lattner
25dc891a3d
Do not throw away bits for no reason
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19378 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:32:59 +00:00
Chris Lattner
7cf9ad3698
Silence a VS warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19377 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:31:31 +00:00
Chris Lattner
5188ad735c
Adjust to changes in LowerCallTo interface
...
Minor bugfixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19376 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:28:19 +00:00
Chris Lattner
4e6c746899
Implement handling of most long operators through libcalls.
...
Fix a bug legalizing "ret (Val,Val)"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19375 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:27:05 +00:00
Chris Lattner
cf5734dddd
Adjust to changes in LowerCAllTo interfaces
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19374 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:26:18 +00:00
Jeff Cohen
bf65268def
Add more missing createXxxPass functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19370 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 17:21:40 +00:00
Chris Lattner
ae0aacb833
Add support for FP->INT conversions and back.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19369 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 08:08:56 +00:00
Chris Lattner
8c92628d1c
Wrap long line.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19367 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 06:59:50 +00:00
Chris Lattner
5d2c6c784b
Implement the 'store FPIMM, Ptr' -> 'store INTIMM, Ptr' optimization for
...
all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19366 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 06:25:56 +00:00
Chris Lattner
623f70dd4c
1ULL << 64 is undefined, don't do it.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19365 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 06:24:30 +00:00
Chris Lattner
7ab65934a0
The X86 instruction selector already handles codegen of:
...
store float 123.45, float* %P
as an integer store. This adds handling of float immediate stores as integers
for arguments passed function calls.
This is now tested by CodeGen/X86/store-fp-constant.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19364 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 05:45:24 +00:00