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
|
1cff05c7c2
|
Start adding some new operators, give IMPLICIT_DEF a chain operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19558 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-14 22:07:46 +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
|
2349ba939d
|
New testcase, problem found by Rob.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19556 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-14 20:21:51 +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
|
557671951f
|
Testcase that crashes the PPC backend. Thanks to Rob for finding this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19554 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-14 19:30:42 +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 |
|
Reid Spencer
|
3ca6d8bf85
|
Allow the Echo and EchoCmd variables to be overridden.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19551 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-14 16:33:36 +00:00 |
|
Reid Spencer
|
bd02b0a915
|
Fix the path from ../lib/Debug to ../Debug/lib per changes to Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19550 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-14 16:32:39 +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 |
|
Alkis Evlogimenos
|
ae192d3558
|
Correctly update configure to configure the llvm-java project
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19546 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-14 07:52:28 +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
|
68f6b8cba8
|
More testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19543 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-14 00:26:25 +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
|
79bda7fbe2
|
Add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19540 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-13 23:26:28 +00:00 |
|
Chris Lattner
|
195e9176af
|
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19539 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-13 23:26:14 +00:00 |
|
Chris Lattner
|
a44f4aeca7
|
Add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19538 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-13 22:58:50 +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 |
|
Reid Spencer
|
39ce11b97b
|
Update the documentation about -enable-llcbeta vs. -enable-linscan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19530 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-13 18:02:40 +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
|
8a496fcffd
|
Add a new node type, add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19525 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-13 17:58:35 +00:00 |
|
Reid Spencer
|
41c56c03f7
|
Turn on LOADABLE_MODULE so that profile.so can be loaded dynamically by
the JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19524 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-13 16:53:05 +00:00 |
|
Reid Spencer
|
1492709177
|
Re-enable libprofile now that llvm-ar is working better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19523 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-13 16:51:19 +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
|
b18a2f816c
|
New method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19516 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-12 18:37:33 +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
|
9ffdfb6bae
|
Update comments to indicate CopyFrom/ToReg take physregs as well as vregs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19514 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-12 18:11:36 +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
|
bf7c1521f5
|
Add new file to Visual Studio CodeGen project
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19505 91177308-0d34-0410-b5e6-96231b3b80d8
|
2005-01-12 04:32:42 +00:00 |
|