Chris Lattner
f8f79c4192
Fix a crash compiling povray on UINT_TO_FP from i16.
...
llvm-svn: 19499
2005-01-12 04:00:00 +00:00
Chris Lattner
3278ce8871
There are no [mem] op= reg instructions for FP, so remove their entries.
...
llvm-svn: 19496
2005-01-12 03:16:09 +00:00
Chris Lattner
e49a335797
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
llvm-svn: 19495
2005-01-12 02:57:10 +00:00
Chris Lattner
b7fe57a0f1
Fold TRUNCATE (LOAD P) into a smaller load from P.
...
llvm-svn: 19494
2005-01-12 02:19:06 +00:00
Chris Lattner
2cfce6853b
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. :(
llvm-svn: 19493
2005-01-12 02:02:48 +00:00
Chris Lattner
021cfd2a80
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
llvm-svn: 19492
2005-01-12 01:28:00 +00:00
Chris Lattner
b0eef82b82
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]
llvm-svn: 19489
2005-01-11 23:33:00 +00:00
Chris Lattner
75bac9f786
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.
llvm-svn: 19488
2005-01-11 23:21:30 +00:00
Chris Lattner
d28ae12168
Handle the global address case here, not just the offset case.
...
llvm-svn: 19487
2005-01-11 22:58:43 +00:00
Chris Lattner
8aa10fcd1b
Treat int constants as not requiring a register, since they are almost always
...
folded into an instruction.
llvm-svn: 19486
2005-01-11 22:29:12 +00:00
Chris Lattner
62b22420be
* 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
llvm-svn: 19483
2005-01-11 21:19:59 +00:00
Chris Lattner
4cbf1f0038
Clear the whole array, always.
...
llvm-svn: 19482
2005-01-11 20:25:26 +00:00
Chris Lattner
8cf9cdae3d
Fold multiplies by 3,5,9 into addressing modes when possible.
...
llvm-svn: 19480
2005-01-11 19:37:02 +00:00
Chris Lattner
b74ec4cd24
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".
llvm-svn: 19472
2005-01-11 06:36:20 +00:00
Chris Lattner
c07164e909
Implement MEMCPY natively in terms of rep movs*
...
llvm-svn: 19468
2005-01-11 06:19:26 +00:00
Chris Lattner
36f7848b26
Implement memset -> rep stos*
...
llvm-svn: 19467
2005-01-11 06:14:36 +00:00
Chris Lattner
a19f84240f
Announce that we don't support mem ops yet.
...
llvm-svn: 19466
2005-01-11 05:57:36 +00:00
Chris Lattner
378262d33b
Teach the address selector to make 'reg+reg' addressing modes.
...
llvm-svn: 19457
2005-01-11 04:40:19 +00:00
Chris Lattner
9d7cf998ca
Emit NOT instructions.
...
llvm-svn: 19455
2005-01-11 04:31:30 +00:00
Chris Lattner
37ed28558f
Fix a bug emitting branches that broke a lot of programs.
...
llvm-svn: 19452
2005-01-11 04:06:27 +00:00
Chris Lattner
e44e6d16fb
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.
llvm-svn: 19451
2005-01-11 03:50:45 +00:00
Chris Lattner
8fea42bd6d
Fix a major bug in setcc/cmov folding, where we accidentally
...
inverted the sense of the comparison.
llvm-svn: 19450
2005-01-11 03:37:59 +00:00
Chris Lattner
0d1f82ac2f
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.
llvm-svn: 19449
2005-01-11 03:11:44 +00:00
Chris Lattner
1d13a92af4
Fold setcc instructions into selects.
...
llvm-svn: 19438
2005-01-10 22:10:13 +00:00
Chris Lattner
5b589ec0c4
Add conditional moves for the parity flag.
...
llvm-svn: 19437
2005-01-10 22:09:33 +00:00
Chris Lattner
750d38b5b7
Implement 8-bit multiply for X86.
...
llvm-svn: 19435
2005-01-10 20:55:48 +00:00
Chris Lattner
cf8fd0c0db
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
llvm-svn: 19420
2005-01-09 20:20:29 +00:00
Chris Lattner
66d3430236
Fix copy and pasto's for FP -> Int. This fixes fldry
...
llvm-svn: 19418
2005-01-09 19:49:59 +00:00
Chris Lattner
282781c797
Initial implementation of FP->INT and INT->FP casts
...
Also, fix zero_extend from bool to i8, which fixes Shootout/objinst.
llvm-svn: 19414
2005-01-09 18:52:44 +00:00
Chris Lattner
fb217c6b94
Fix a subtle bug involving constant expr casts from int to fp
...
llvm-svn: 19410
2005-01-09 01:49:29 +00:00
Chris Lattner
9f59d28d67
Implement varargs and returnaddress/frameaddress intrinsics. With this
...
patch, all of SingleSource/UnitTests passes.
llvm-svn: 19408
2005-01-09 00:01:27 +00:00
Chris Lattner
313ddb59c9
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.
llvm-svn: 19399
2005-01-08 20:51:36 +00:00
Chris Lattner
f5bbe85879
Okay, my off by one was actually off by two. This fixes Generic/2003-07-07-BadLongConst.ll
...
llvm-svn: 19398
2005-01-08 20:39:31 +00:00
Chris Lattner
a183eb75eb
Fix off by one error
...
llvm-svn: 19396
2005-01-08 20:31:34 +00:00
Chris Lattner
b52e041c80
Adjust to changes in LowerCallTo interface
...
Minor bugfixes
llvm-svn: 19376
2005-01-08 19:28:19 +00:00
Chris Lattner
8da67af979
Wrap long line.
...
llvm-svn: 19367
2005-01-08 06:59:50 +00:00
Chris Lattner
b923438fe6
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
llvm-svn: 19364
2005-01-08 05:45:24 +00:00
Chris Lattner
ca4ca5520b
Allow the selection-dag based selector to be diabled with -disable-pattern-isel.
...
For now, this is the default, as the current selector is missing some big pieces.
To enable the new selector, pass -disable-pattern-isel=false to llc or lli.
llvm-svn: 19335
2005-01-07 07:50:50 +00:00
Chris Lattner
88c8a23891
Reimplementation of the X86 pattern isel. This is still missing many large
...
pieces, but can already do amazing things in some cases.
llvm-svn: 19334
2005-01-07 07:49:41 +00:00
Chris Lattner
ce413c8c9f
This file is now dead.
...
llvm-svn: 19333
2005-01-07 07:49:05 +00:00
Chris Lattner
ff9e21c8d3
Add a new prototype
...
llvm-svn: 19332
2005-01-07 07:48:33 +00:00
Chris Lattner
3a4d1b2721
First draft of new Target interface
...
llvm-svn: 19324
2005-01-07 07:44:53 +00:00
Chris Lattner
ae15482076
Codegen -1 and -0.0 more efficiently. This implements CodeGen/X86/negatize_zero.ll
...
llvm-svn: 19313
2005-01-06 21:19:16 +00:00
Jeff Cohen
b56965be08
Fix CBE code so that it compiles with VC++.
...
llvm-svn: 19303
2005-01-06 04:21:49 +00:00
Chris Lattner
1ee6dfa501
1. If a double FP constant must be put into a constant pool, but it can be
...
precisely represented as a float, put it into the constant pool as a
float.
2. Use the cbw/cwd/cdq instructions instead of an explicit SAR for signed
division.
llvm-svn: 19291
2005-01-05 16:30:14 +00:00
Chris Lattner
0f7e786a6b
Minor optimization to allocate R8 registers in a better order.
...
llvm-svn: 19289
2005-01-05 16:09:16 +00:00
Jeff Cohen
68f28730b7
Revert elimination of global variable hack... still needed.
...
llvm-svn: 19273
2005-01-03 16:34:19 +00:00
Chris Lattner
d4bb2bbce1
ADC and IMUL are also commutable.
...
llvm-svn: 19264
2005-01-03 01:27:59 +00:00
Chris Lattner
82787e90f3
This hunk:
...
- unsigned TrueValue = getReg(TrueVal, BB, BB->begin());
+ unsigned TrueValue = getReg(TrueVal);
Fixes the PPC regressions from last night.
The other hunk is just a clarity improvement.
llvm-svn: 19263
2005-01-02 23:07:31 +00:00
Jeff Cohen
2cf40e142c
Eliminate the use of the global variable hack in the X86 target that was used
...
to get Visual Studio to link in X86.lib to the executables that need it. There
is another way of doing it.
llvm-svn: 19252
2005-01-02 04:23:12 +00:00
Chris Lattner
733aac1270
Disable 2->3 address promotion of add and inc instructions to LEA's. In
...
addition to being three address, LEA's don't set the flags.
This fixes 186.crafty.
llvm-svn: 19251
2005-01-02 04:18:17 +00:00
Chris Lattner
e7228736e0
Add a new method.
...
llvm-svn: 19249
2005-01-02 02:38:18 +00:00
Chris Lattner
b62b45b3fc
Add support for SETNPr to lower to memory form.
...
llvm-svn: 19248
2005-01-02 02:37:46 +00:00
Chris Lattner
b7782d77c1
Implement the convertToThreeAddress method, add support for inverting JP/JNP
...
branches.
llvm-svn: 19247
2005-01-02 02:37:07 +00:00
Chris Lattner
295e45e60e
Two changes here:
...
1. Add new instructions for checking parity flags: JP, JNP, SETP, SETNP.
2. Set the isCommutable and isPromotableTo3Address bits on several
instructions.
llvm-svn: 19246
2005-01-02 02:35:46 +00:00
Chris Lattner
182db0cac0
Add some bits that can be set for instructions.
...
llvm-svn: 19241
2005-01-02 02:27:48 +00:00
Chris Lattner
83df5d25b7
Fix a FIXME: Select instructions on longs were miscompiled.
...
While we're at it, improve codegen of select instructions. For this
testcase:
int %test(bool %C, int %A, int %B) {
%D = select bool %C, int %A, int %B
ret int %D
}
We used to generate this code:
_test:
cmpwi cr0, r3, 0
bne .LBB_test_2 ;
.LBB_test_1: ;
b .LBB_test_3 ;
.LBB_test_2: ;
or r5, r4, r4
.LBB_test_3: ;
or r3, r5, r5
blr
Now we emit:
_test:
cmpwi cr0, r3, 0
bne .LBB_test_2 ;
.LBB_test_1: ;
or r4, r5, r5
.LBB_test_2: ;
or r3, r4, r4
blr
-Chris
llvm-svn: 19214
2005-01-01 16:10:12 +00:00
Chris Lattner
78394258ae
Substantially improve the code generated by non-folded setcc instructions.
...
In particular, instead of compiling this:
bool %test(int %A, int %B) {
%C = setlt int %A, %B
ret bool %C
}
to this:
test:
save %sp, -96, %sp
subcc %i0, %i1, %g0
bl .LBBtest_1 !
nop
ba .LBBtest_2 !
nop
.LBBtest_1: !
or %g0, 1, %i0
ba .LBBtest_3 !
nop
.LBBtest_2: !
or %g0, 0, %i0
ba .LBBtest_3 !
nop
.LBBtest_3: !
restore %g0, %g0, %g0
retl
nop
We now compile it to this:
test:
save %sp, -96, %sp
subcc %i0, %i1, %g0
or %g0, 1, %i0
bl .LBBtest_2 !
nop
.LBBtest_1: !
or %g0, %g0, %i0
.LBBtest_2: !
restore %g0, %g0, %g0
retl
nop
llvm-svn: 19213
2005-01-01 16:06:57 +00:00
Chris Lattner
93feeb18f1
Fix PR490
...
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll
llvm-svn: 19176
2004-12-29 04:00:09 +00:00
Chris Lattner
45382d34cc
Remove unused enum value
...
llvm-svn: 19024
2004-12-17 22:41:46 +00:00
Chris Lattner
227010bb31
Remove unused #include
...
llvm-svn: 19021
2004-12-17 19:07:04 +00:00
Chris Lattner
db0bf10e4a
Change the sentinal
...
llvm-svn: 19007
2004-12-17 00:46:51 +00:00
Chris Lattner
979b903916
Create a stack slot for the return address lazily instead of eagerly. This
...
save small amounts of time for functions that don't call llvm.returnaddress
or llvm.frameaddress (which is almost all functions).
llvm-svn: 19006
2004-12-17 00:07:46 +00:00
Tanya Lattner
991b5e9457
Chris is a pain ;) Removing reassociate.
...
llvm-svn: 19005
2004-12-16 23:16:16 +00:00
Tanya Lattner
a5528e89fd
Removing commented out lines.
...
llvm-svn: 19004
2004-12-16 23:13:16 +00:00
Tanya Lattner
08e19bb412
Removed LICM and GCSE.
...
llvm-svn: 19003
2004-12-16 23:07:36 +00:00
Chris Lattner
5a4c66cfe9
Remove dead #include
...
llvm-svn: 18994
2004-12-16 19:32:38 +00:00
Chris Lattner
20d74fd986
Adjust to changes in asmwriter filenames
...
llvm-svn: 18987
2004-12-16 17:33:24 +00:00
Chris Lattner
a38954dd64
Specify all of the targets built.
...
llvm-svn: 18985
2004-12-16 17:26:44 +00:00
Chris Lattner
03227509c0
Use the rules in Makefile.rules to build SparcV9GenCodeEmitter.inc instead
...
of custom rules.
llvm-svn: 18984
2004-12-16 16:47:56 +00:00
Chris Lattner
0bc3333ff4
Fix header
...
llvm-svn: 18983
2004-12-16 16:47:03 +00:00
Chris Lattner
0782e27d85
Factor out common .td file chunks.
...
llvm-svn: 18982
2004-12-16 16:31:57 +00:00
Chris Lattner
298a7f8d8b
Fix PR485, instead of emitting zero sized arrays, emit arrays of size 1.
...
llvm-svn: 18974
2004-12-15 23:13:15 +00:00
Brian Gaeke
4bc39bef79
The mystery of Olden/tsp solved, and more opportunities for speedup.
...
llvm-svn: 18932
2004-12-14 09:10:10 +00:00
Brian Gaeke
36c14da84f
Get rid of shifts by zero in most cases.
...
llvm-svn: 18931
2004-12-14 08:21:02 +00:00
Chris Lattner
b3b1c279a2
When generating code for X86 targets, make sure the fp control word is set
...
to 64-bit precision, not 80 bits.
llvm-svn: 18915
2004-12-13 21:52:52 +00:00
Chris Lattner
951e94e867
Add some notes
...
llvm-svn: 18911
2004-12-13 20:13:10 +00:00
Chris Lattner
c97cac3d32
Set the rounding mode for the X86 FPU to 64-bits instead of 80-bits. We
...
don't support long double anyway, and this gives us FP results closer to
other targets.
This also speeds up 179.art from 41.4s to 18.32s, by eliminating a problem
with extra precision that causes an FP == comparison to fail (leading to
extra loop iterations).
llvm-svn: 18895
2004-12-13 17:23:11 +00:00
Brian Gaeke
cf2c1866cb
Add V8 SPEC status.
...
llvm-svn: 18844
2004-12-13 00:27:35 +00:00
Chris Lattner
cbd47631ea
Fix Regression/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll, and all programs
...
when compiled with debug information.
llvm-svn: 18835
2004-12-12 20:36:19 +00:00
Chris Lattner
10b637eade
CSE calls to getTypeSize.
...
llvm-svn: 18833
2004-12-12 20:31:00 +00:00
Chris Lattner
17550c456c
Use the target triple to pick this target.
...
llvm-svn: 18830
2004-12-12 17:40:28 +00:00
Brian Gaeke
23b2bc54b0
Complete the list of MultiSource failures.
...
llvm-svn: 18826
2004-12-12 08:22:11 +00:00
Brian Gaeke
ed9346820d
hbd should be working now.
...
llvm-svn: 18824
2004-12-12 07:42:59 +00:00
Brian Gaeke
27358a44d1
Finally enable the setcc-branch folding code.
...
Also, fix a bug where ubyte 255 would sometimes be output as -1. This
was afflicting hbd.
llvm-svn: 18823
2004-12-12 07:42:58 +00:00
Brian Gaeke
e5351ad5f0
Add (currently disabled) code for canFoldSetCC
...
llvm-svn: 18820
2004-12-12 06:22:30 +00:00
Brian Gaeke
aa40b7d080
Add stubs for setcc-branch folding support.
...
llvm-svn: 18818
2004-12-12 06:01:26 +00:00
Brian Gaeke
25ac83565e
Print llvm code one function at a time.
...
llvm-svn: 18805
2004-12-11 22:17:07 +00:00
Brian Gaeke
72daaa46eb
JIT should print LLVM each function before selecting instructions for it.
...
llvm-svn: 18803
2004-12-11 18:41:09 +00:00
Brian Gaeke
b3095dd88f
Bools are *also* not ints. Sigh. Furthermore, most of the TargetMachine
...
ctor parameters can be defaulted.
Print the transformed llvm code input to the instruction selector
when -print-machineinstrs is on, just like V9.
llvm-svn: 18794
2004-12-11 05:19:04 +00:00
Brian Gaeke
ba5e9f107c
Look for many more moves to fold (previously, we only
...
*or g0, x add g0, x recognized * as a move)
or x, g0 add x, g0
or 0, x add 0, x
or x, 0 add x, 0
llvm-svn: 18793
2004-12-11 05:19:03 +00:00
Brian Gaeke
52a9ed63b5
Make GEPs not suck so much:
...
* Don't emit the Index * ElementSize multiply if Index is a constant.
* Use a shift, not a multiply, if ElementSize is 1/2/4/8.
* If ElementSize fits in the immediate field of SMUL, then put it there.
Fix a bug where struct offsets might be truncated (ConstantSInt::get is
now used instead of ConstantInt::get).
llvm-svn: 18792
2004-12-11 05:19:02 +00:00
Brian Gaeke
cba3135ba8
Update lists of failing benchmarks, including info on which
...
ones are failing in cbe.
llvm-svn: 18791
2004-12-11 05:19:01 +00:00
Brian Gaeke
2e2f3e26ba
Move -lowerselect later in the chain; some select instructions were
...
slipping through into the instruction selector, which can't deal with
them yet.
llvm-svn: 18758
2004-12-10 08:39:30 +00:00
Brian Gaeke
2ccff7c256
Add the rest of the multiply instructions.
...
llvm-svn: 18757
2004-12-10 08:39:29 +00:00
Brian Gaeke
4bfd3f7c98
Support binary operations with immediates for <= cInt.
...
llvm-svn: 18756
2004-12-10 08:39:28 +00:00
Brian Gaeke
428037be05
Update lists of failing benchmarks (except C++...something is the
...
matter with my sparcv8 libstdc++.a) and to-do list.
llvm-svn: 18755
2004-12-10 08:39:27 +00:00
Brian Gaeke
81c7fd2fce
Emit correct prototype for __builtin_alloca on V8.
...
llvm-svn: 18745
2004-12-10 05:44:45 +00:00
Brian Gaeke
836727ea84
Add SparcV8 target back into the build
...
llvm-svn: 18738
2004-12-10 04:54:21 +00:00
Brian Gaeke
1d0fe16906
Adjust paths: Sparc/V8 --> SparcV8
...
llvm-svn: 18737
2004-12-10 04:48:57 +00:00
Brian Gaeke
a14476c9bf
Make this file self-contained.
...
llvm-svn: 18736
2004-12-10 04:46:30 +00:00
Brian Gaeke
cb3b98586d
Update list of failing MultiSource benchmarks. It works out to +5 -5, but I
...
think some of these might be the CFE's fault; a rebuild should come soon.
llvm-svn: 18735
2004-12-10 04:42:46 +00:00
Brian Gaeke
5183f22a64
When FpMOVDs appeared in pairs, we were mistakenly skipping over the latter of
...
each pair. I think this fixes that.
One of these days, I swear I'm going to get the hang of C++ iterators.
Really.
llvm-svn: 18734
2004-12-10 04:42:45 +00:00
Brian Gaeke
34f7c3d37a
We're continuing to make progress on MultiSource.
...
llvm-svn: 18714
2004-12-09 18:54:31 +00:00
Brian Gaeke
847c05deef
Bytes and shorts are aligned differently from words.
...
llvm-svn: 18713
2004-12-09 18:51:02 +00:00
Brian Gaeke
bac69b7df9
Fix asm-printing directives (how did we not see this before...apparently,
...
everything was an int!)
llvm-svn: 18712
2004-12-09 18:51:01 +00:00
Chris Lattner
f878f75d46
Move lower intrinsics before FP constant emission, in case
...
intrinsic lowering ever introduces constants.
Rename local symbols before printing function bodies, fixing 255.vortex
with the CBE!!!
llvm-svn: 18534
2004-12-05 06:49:44 +00:00
Chris Lattner
26d9c22832
Fix test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll and
...
PR472
llvm-svn: 18459
2004-12-03 17:19:10 +00:00
Brian Gaeke
608a6dae43
This code rotted - change it to call abort() until someone wants
...
to rewrite this to use relocations.
llvm-svn: 18453
2004-12-03 06:57:14 +00:00
Tanya Lattner
c0d9dcdfac
When writing kernel, save the branches til the end. They are still put in the "right place" in the schedule, but sometimes when folding to make a kernel instructions are added between branches. This is wrong. To avoid this, we handle branches special.
...
llvm-svn: 18450
2004-12-03 05:25:22 +00:00
Chris Lattner
9d76c236f7
Fix a regression caused by the previous patch
...
llvm-svn: 18449
2004-12-03 05:13:15 +00:00
Chris Lattner
7651614c4d
The stripping pass as we know it is about to disappear
...
llvm-svn: 18436
2004-12-02 21:05:01 +00:00
John Criswell
335c342440
Reverting revision 1.209.
...
Including alloca.h on Solaris brings in the prototype of strftime(), which
breaks compilation of CBE generated code.
llvm-svn: 18435
2004-12-02 19:02:49 +00:00
Chris Lattner
33660426a5
Spill/restore X86 floating point stack registers with 64-bits of precision
...
instead of 80-bits of precision. This fixes PR467.
This change speeds up fldry on X86 with LLC from 7.32s on apoc to 4.68s.
llvm-svn: 18433
2004-12-02 18:17:31 +00:00
Chris Lattner
96b14e18bb
Consider 64-bit registers to be FP as well.
...
llvm-svn: 18432
2004-12-02 17:57:21 +00:00
Tanya Lattner
201e972dc4
Reworked branch adding in prologue. Added check for infinite loops which are not modulo scheduled.
...
llvm-svn: 18419
2004-12-02 07:22:15 +00:00
Tanya Lattner
e94b466a8e
Reverting this patch:
...
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041122/021428.html
It broke Mutlisource/Applications/obsequi
llvm-svn: 18407
2004-12-01 18:27:03 +00:00
Chris Lattner
e58bf09138
Initial support for packed types, contributed by Morten Ofstad
...
llvm-svn: 18406
2004-12-01 17:14:28 +00:00
Chris Lattner
798e0349c0
Do not let GCC emit a warning for INT64_MIN
...
llvm-svn: 18398
2004-11-30 21:33:58 +00:00
Brian Gaeke
86deaf2211
Sparcs behave better if we use <alloca.h> and avoid messing with __builtin_alloca.
...
llvm-svn: 18397
2004-11-30 21:27:01 +00:00
Brian Gaeke
5c9fa5bcee
Update list of failing benchmarks.
...
llvm-svn: 18384
2004-11-30 08:15:44 +00:00
Brian Gaeke
1d6b926ab6
If we're about to emit something like:
...
%f0 = fmovs %f0
%f1 = fmovs %f1
then just delete the FpMOVD pseudo-instruction instead. Also, add
statistics and debug printouts.
llvm-svn: 18383
2004-11-30 08:15:15 +00:00
Chris Lattner
bd11625469
Fix several bugs in 'op x, imm' handling. Foremost is that we now emit
...
addi r3, r3, -1
instead of
addi r3, r3, 1
for 'sub int X, 1'.
Secondarily, this fixes several cases where we could crash given an unsigned
constant. And fixes a couple of minor missed optimization cases, such as
xor X, ~0U -> not X
llvm-svn: 18379
2004-11-30 07:30:20 +00:00
Chris Lattner
7562a05735
Fix CodeGen/PowerPC/2004-11-30-shr-var-crash.ll
...
llvm-svn: 18376
2004-11-30 06:40:04 +00:00
Chris Lattner
ce350cbd3a
Fix test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.ll
...
llvm-svn: 18374
2004-11-30 06:36:11 +00:00
Chris Lattner
9eeb2033ff
Fix test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.ll
...
llvm-svn: 18371
2004-11-30 06:29:10 +00:00
Chris Lattner
e0c207d2d3
Remove extraneous namespacification. In particular, don't define llvm::llvm::createInternalGlobalMapperPass
...
llvm-svn: 18365
2004-11-30 00:22:59 +00:00
Chris Lattner
f9c5dc9fb4
Revamp long/ulong comparisons to use a much more efficient sequence (thanks
...
to Brian and the Sun compiler for pointing out that the obvious works :)
This also enables folding all long comparisons into setcc and branch
instructions: before we could only do == and !=
For example, for:
void test(unsigned long long A, unsigned long long B) {
if (A < B) foo();
}
We now generate:
test:
subl $4, %esp
movl %esi, (%esp)
movl 8(%esp), %eax
movl 12(%esp), %ecx
movl 16(%esp), %edx
movl 20(%esp), %esi
subl %edx, %eax
sbbl %esi, %ecx
jae .LBBtest_2 # UnifiedReturnBlock
.LBBtest_1: # then
call foo
movl (%esp), %esi
addl $4, %esp
ret
.LBBtest_2: # UnifiedReturnBlock
movl (%esp), %esi
addl $4, %esp
ret
Instead of:
test:
subl $12, %esp
movl %esi, 8(%esp)
movl %ebx, 4(%esp)
movl 16(%esp), %eax
movl 20(%esp), %ecx
movl 24(%esp), %edx
movl 28(%esp), %esi
cmpl %edx, %eax
setb %al
cmpl %esi, %ecx
setb %bl
cmove %ax, %bx
testb %bl, %bl
je .LBBtest_2 # UnifiedReturnBlock
.LBBtest_1: # then
call foo
movl 4(%esp), %ebx
movl 8(%esp), %esi
addl $12, %esp
ret
.LBBtest_2: # UnifiedReturnBlock
movl 4(%esp), %ebx
movl 8(%esp), %esi
addl $12, %esp
ret
llvm-svn: 18330
2004-11-29 05:55:24 +00:00
Tanya Lattner
d8cc4facd0
Reworked branching so we don't handle BAs specially. It just updates the branchTO regardless of what type of branch it is.
...
llvm-svn: 18322
2004-11-29 04:39:47 +00:00
Tanya Lattner
341828ee64
Fixed bug where instructions in the kernel were not ordered right to preserve dependencies in a cycle.
...
llvm-svn: 18314
2004-11-28 23:36:15 +00:00
Chris Lattner
c0f8a1c721
The LLVM bool type shall have 1 byte alignment on PPC.
...
llvm-svn: 18311
2004-11-28 21:16:45 +00:00
Nate Begeman
43123c9f7a
Remove the ISel->AsmPrinter link via the TargetMachine that was put in
...
place to help bring up the PowerPC back end on Darwin. This code is no
longer serves any purpose now that the AsmPrinter does the right thing
all the time printing GlobalValues. --Cruft.
llvm-svn: 18267
2004-11-27 04:45:11 +00:00
Chris Lattner
b50fd9262d
There is no reason to store <x,x>, just store <x>.
...
llvm-svn: 18263
2004-11-26 20:25:17 +00:00
Nate Begeman
3f76eb69f6
Enable optimization suggested by Chris Lattner to not emit reloc stubs for
...
static global variables whose addresses are taken. This allows us to
convert the following code for taking the address of a static function foo
addis r2, r30, ha16(Ll1__2E_foo_2$non_lazy_ptr-"L00001$pb")
lwz r3, lo16(Ll1__2E_foo_2$non_lazy_ptr-"L00001$pb")(r2)
which also includes linker stub code emitted at the end of the .s file not
shown here, and replace it with this:
addis r2, r30, ha16(l1__2E_foo_2-"L00001$pb")
la r3, lo16(l1__2E_foo_2-"L00001$pb")(r2)
which in addition to not needing linker help, also has no load instruction.
For those not up on PowerPC mnemonics, la is shorthand for add immediate.
llvm-svn: 18239
2004-11-25 07:09:01 +00:00
Chris Lattner
8cbad8efcf
Fix the build on non ppc machines
...
llvm-svn: 18235
2004-11-25 06:14:45 +00:00
Chris Lattner
497a622376
The JIT works enough
...
llvm-svn: 18228
2004-11-25 04:14:54 +00:00
Chris Lattner
da76c16ba4
Fix encoding of fsel, fixing olden/power, McCat/bisort and several others.
...
All of Olden passes now! :)
llvm-svn: 18227
2004-11-25 04:11:07 +00:00
Chris Lattner
305f78f646
Fix encoding of fneg instruction
...
llvm-svn: 18226
2004-11-25 03:53:44 +00:00
Chris Lattner
191e525bae
Fix encoding of swari, fixing several programs, including Olden/mst
...
llvm-svn: 18225
2004-11-25 03:40:20 +00:00
Chris Lattner
5d8ae54267
There is not a 1-1 mappign between llvm blocks and PPC blocks, do not use
...
LLVM blocks as the keys for the branch rewriter. This fixes treeadd and
many other programs with the JIT.
llvm-svn: 18223
2004-11-25 00:33:57 +00:00
Chris Lattner
dd516799d7
* Rename existing relocations to be more specific
...
* Add relocations for refernces to non-lazy darwin stubs and implement
them correctly.
With this change, we can correctly references external globals, and now
all but two UnitTests and all but 1 Regression/C tests pass.
More importantly, bugpoint-jit will start giving us useful testcases,
instead of always telling us that references to external globals don't
work :)
llvm-svn: 18222
2004-11-24 22:30:08 +00:00
Nate Begeman
e49936af54
Add the same optimization that we do loading from fixed alloca slots to
...
storing to fixed alloca slots.
llvm-svn: 18221
2004-11-24 21:53:14 +00:00
Chris Lattner
078b6f2b62
Write CompilationCallback as an explicit assembly stub to avoid getting GCC's
...
prolog.
llvm-svn: 18220
2004-11-24 21:01:46 +00:00
Chris Lattner
659d72e319
When rewriting the original call instruction, make sure to rewrite it to
...
call the right address.
llvm-svn: 18213
2004-11-24 18:00:02 +00:00
Chris Lattner
cb9af557e7
Force the intregs ptr into R2 and the FPregs ptr into R3. This fixes a really
...
obscure problem where we were doing:
lmw r3,0(r9)
which is undefined on PPC. Now we do:
lmw r3,0(r2)
by force, not relying on the GCC register allocator for luck :)
llvm-svn: 18212
2004-11-24 17:42:55 +00:00
Brian Gaeke
7217642438
Update list of failing benchmarks.
...
llvm-svn: 18202
2004-11-24 04:07:42 +00:00
Brian Gaeke
1139802b98
Fix bug in emitGEPOperation with large struct-member offsets.
...
llvm-svn: 18201
2004-11-24 04:07:33 +00:00
Chris Lattner
130888ad37
Fix a few more tests by encoding the extsb and other XForm11 instructions
...
correctly.
llvm-svn: 18200
2004-11-24 03:52:02 +00:00
Chris Lattner
022e271db5
Fix the encoding of ORi and other DForm4 instructions. This brings us to
...
36/42 SingleSource/UnitTests passing!
llvm-svn: 18199
2004-11-24 02:15:41 +00:00
Chris Lattner
57542fcfc2
Loads are relocatable too
...
llvm-svn: 18198
2004-11-24 02:03:44 +00:00
Chris Lattner
7b1cf0d6c6
Calls do not need a MovPCtoLR instruction
...
llvm-svn: 18197
2004-11-24 02:00:06 +00:00
Chris Lattner
6a7ebe034e
Get constant pools working. This fixes even more programs, allowing us to
...
pass 24/42 in UnitTests (up from 20).
llvm-svn: 18196
2004-11-24 01:56:12 +00:00
Tanya Lattner
13c71ca7b6
Forced branches to be first to be scheduled.
...
llvm-svn: 18195
2004-11-24 01:49:10 +00:00
Chris Lattner
193b6f3281
Rewrite branches more closely to correct. This makes more stuff pass, and
...
stops the infinite loops!
llvm-svn: 18194
2004-11-24 01:35:12 +00:00
Chris Lattner
b55f748b1a
Branch instructions explicitly represent CRx in them. bEcause of this, encode
...
them explicitly as well.
llvm-svn: 18193
2004-11-24 01:15:19 +00:00
Nate Begeman
674fe0bb60
Fix encoding of bctrl, and remove some unused instructions
...
llvm-svn: 18192
2004-11-24 00:16:37 +00:00
Chris Lattner
c7eeae4661
Fix encoding of blr and bctr
...
llvm-svn: 18178
2004-11-23 22:06:24 +00:00
Nate Begeman
c5fc6f5717
Use the correct register class as a constaint to gcc's inline assembly, so
...
that we don't end up trying to use r0 as a base register.
llvm-svn: 18176
2004-11-23 21:37:22 +00:00
Nate Begeman
617760687a
Save/Restore arg regs and nonvolatile regs the compiler might use during
...
CompilationCallback
llvm-svn: 18175
2004-11-23 21:34:18 +00:00
Chris Lattner
578dfd5e42
Fix the encoding of OR, AND and many other instructions
...
llvm-svn: 18174
2004-11-23 21:17:35 +00:00
Brian Gaeke
94c58dc877
Support shr long/ulong.
...
llvm-svn: 18173
2004-11-23 21:10:50 +00:00
Brian Gaeke
8d4a5ad55c
Support printing ConstantAggregateZeros.
...
llvm-svn: 18172
2004-11-23 21:10:49 +00:00
Brian Gaeke
2e7f71863f
Update failing SingleSource test-case list.
...
llvm-svn: 18171
2004-11-23 21:10:48 +00:00
Chris Lattner
a630adebc7
Remove argtype and argcount magic, which was used by the old asmprinter.
...
llvm-svn: 18170
2004-11-23 20:41:34 +00:00
Chris Lattner
be39b8f541
Get rid of flags that are dead
...
llvm-svn: 18169
2004-11-23 20:37:41 +00:00
Chris Lattner
5f4b0e1bf7
Fix encoding of rlwinm?
...
llvm-svn: 18165
2004-11-23 19:23:32 +00:00
Chris Lattner
1238cca6df
Fix encodings
...
llvm-svn: 18164
2004-11-23 19:23:18 +00:00
Chris Lattner
431e0132ef
Enumerate CR registers
...
llvm-svn: 18162
2004-11-23 18:59:59 +00:00
Chris Lattner
a8936af13e
Initial implementation of exiting CompilationCallback
...
This should save all argument registers on entry and restore on exit, despite
that, simple things seem to work!!!
llvm-svn: 18161
2004-11-23 18:49:46 +00:00
Chris Lattner
febc3eb8fa
This method is dead
...
llvm-svn: 18160
2004-11-23 18:47:55 +00:00
Chris Lattner
24ad93f55c
Remove this method.
...
llvm-svn: 18159
2004-11-23 18:47:42 +00:00
Chris Lattner
cccd49f1b7
Squelch a bogus warning
...
llvm-svn: 18157
2004-11-23 15:57:01 +00:00
Chris Lattner
b1fd07a862
Squelch a bogus warning.
...
llvm-svn: 18156
2004-11-23 15:56:38 +00:00
Nate Begeman
7e7a08dba5
Don't return value from void function. This is only temporary anyway while
...
the JIT is made to work!
llvm-svn: 18155
2004-11-23 10:04:49 +00:00
Brian Gaeke
bde370eb58
pseudocode for 64-bit lshr.
...
llvm-svn: 18154
2004-11-23 08:14:09 +00:00
Chris Lattner
40ff89c212
Fix a minor bug
...
llvm-svn: 18153
2004-11-23 06:56:31 +00:00
Chris Lattner
5369ab3e24
Be really paranoid about not breaking stuff yet
...
llvm-svn: 18152
2004-11-23 06:56:18 +00:00
Chris Lattner
4ff117585d
Implement the first hunk of CompilationCallback. The pieces missing are the
...
ones noted, which require funny PPC specific inline assembly.
If some angel felt the desire to help me, I think this is that last bit missing
for JIT support (however, generic code emitter might night work right with
the constant pool yet).
llvm-svn: 18151
2004-11-23 06:55:05 +00:00
Brian Gaeke
d3311665cc
Add more known-failing tests.
...
llvm-svn: 18149
2004-11-23 06:39:50 +00:00
Brian Gaeke
2491727b5d
Add the rest of the logical instructions.
...
llvm-svn: 18148
2004-11-23 06:39:37 +00:00
Chris Lattner
7445c5eadc
Implement the stub needed to get into compilation callback.
...
llvm-svn: 18147
2004-11-23 06:27:02 +00:00
Chris Lattner
e1187d46a1
Simplify code a bit
...
llvm-svn: 18146
2004-11-23 06:05:44 +00:00
Chris Lattner
8296c4c323
Initial implementation of the JIT interfaces. Relocation is done and stubs
...
for external functions work. CompilationCallback has not been written, and
stubs for internal functions are not generated yet. This means you can call
printf and exit, and use global variables, but cannot call functions local to
a module yet.
llvm-svn: 18145
2004-11-23 06:02:06 +00:00
Chris Lattner
743a43424f
Emit relocations for the global variable using instructions. This gets us
...
LA, LOADHiAddr, CALLpcrel, and MovePCtoLR working, though the constant pool
probably is not right.
llvm-svn: 18144
2004-11-23 05:59:53 +00:00
Chris Lattner
1c95751676
Implement all of the methods
...
llvm-svn: 18142
2004-11-23 05:57:57 +00:00
Chris Lattner
0b4eb3f806
Initial checkin of the 32-bit PPC relocation types
...
llvm-svn: 18141
2004-11-23 05:57:38 +00:00
Chris Lattner
f5363dc789
Move JITInfo from PPCTM to PPC32TM
...
llvm-svn: 18140
2004-11-23 05:56:40 +00:00
Chris Lattner
ae670d5895
Do not provide the non-specialized PowerPCJITInfo object, it is pretty useless.
...
Instead, let derived classes provide specialized ones.
llvm-svn: 18139
2004-11-23 05:55:38 +00:00
Chris Lattner
6500c6d332
LA is really addi. Be consistent with operand ordering to avoid confusing the code emitter
...
llvm-svn: 18138
2004-11-23 05:54:25 +00:00
Tanya Lattner
c3a7394291
Changed the CreateCodeToLoadConst function to preserve SSA form. This basically means adding extra tmp instructions for intermediate values.
...
llvm-svn: 18137
2004-11-23 04:22:29 +00:00
Chris Lattner
69e4cc55ef
Remove some dead code
...
llvm-svn: 18136
2004-11-22 23:07:22 +00:00
Chris Lattner
40565d72d4
Comment out a couple of unused instructions.
...
llvm-svn: 18135
2004-11-22 23:07:01 +00:00
Chris Lattner
a76f09d0d3
Do not push two return addresses on the stack when we call external functions who have their addresses taken. This fixes test-call.ll
...
llvm-svn: 18134
2004-11-22 22:25:30 +00:00
Chris Lattner
0e7faedde7
Disable this.
...
llvm-svn: 18130
2004-11-22 21:51:40 +00:00
Chris Lattner
8e9ed2747c
This chunk of code needs to be rewritten
...
llvm-svn: 18127
2004-11-22 21:45:54 +00:00
Chris Lattner
54e1b22ea3
Remove some dead vars and some useless namespacification
...
llvm-svn: 18126
2004-11-22 21:42:40 +00:00
Chris Lattner
80ad8871e7
Implement a disgusting hack to work around broken machine code emission of
...
the RDCCR instruction. This fixes a bunch of programs with the JIT.
llvm-svn: 18124
2004-11-22 21:25:10 +00:00
Tanya Lattner
ab9cf27cd0
Fixed a bug where I was trying to ModuloSchedule a loop with no instructions but a terminator.
...
Fixed a bug in the schedule generation that was always using the start cycle.
llvm-svn: 18123
2004-11-22 20:41:24 +00:00
Chris Lattner
c15c120342
Remove JIT-specific code from the code emitter.
...
llvm-svn: 18122
2004-11-22 20:25:10 +00:00
Chris Lattner
8edcdaa6eb
New methods implemented
...
llvm-svn: 18121
2004-11-22 20:24:42 +00:00
Chris Lattner
b098ce7c8e
Implement the Sparc JIT interfaces, including relocation support.
...
llvm-svn: 18120
2004-11-22 20:24:27 +00:00
Brian Gaeke
dd10ba214e
Add stub method for long shift codegen.
...
llvm-svn: 18100
2004-11-22 08:02:06 +00:00
Brian Gaeke
d1502c5c5d
Update to-do list.
...
llvm-svn: 18099
2004-11-22 08:02:05 +00:00
Chris Lattner
96304f816f
Initial checkin of the V9 relocation types
...
llvm-svn: 18095
2004-11-22 00:40:51 +00:00
Brian Gaeke
29a4b354a3
Implement setcc on longs.
...
llvm-svn: 18088
2004-11-21 08:11:28 +00:00
Brian Gaeke
8ab27507fd
Add all the rest of the ADD and SUB variants, some of which are important for
...
64-bit support.
llvm-svn: 18087
2004-11-21 07:13:17 +00:00
Brian Gaeke
46cdc9e043
Support add, sub, mul, div, rem on longs/ulongs (latter 3 by emitting libcalls).
...
Add a big comment containing my notes on how to do setcc for longs/ulongs.
llvm-svn: 18086
2004-11-21 07:13:16 +00:00
Brian Gaeke
07ef7e0ae1
Update to-do list.
...
llvm-svn: 18085
2004-11-21 07:13:15 +00:00
Nate Begeman
6c9375b20c
Fix Shootout-C++/wc, which was broken by my recent changes to emit fewer
...
reg-reg copies. The necessary conditions for this bug are a GEP that is
used outside the basic block in which it is defined, whose components
other than the pointer are all constant zero, and where the use is
selected before the definition (backwards branch to successsor block).
llvm-svn: 18084
2004-11-21 05:14:06 +00:00
Chris Lattner
d68ebaacc0
There is no reason to emit function stubs for direct calls.
...
llvm-svn: 18082
2004-11-21 03:46:06 +00:00
Brian Gaeke
016bd3ba11
Fix extraStack calculation -- I think in fact it might be getting a bit *too*
...
much stack, but that's better than not enough, which leads to miscompilations.
Fix FP vaarg.
llvm-svn: 18079
2004-11-21 03:35:22 +00:00
Brian Gaeke
83189cdff3
Update list of failing benchmarks & to-do list.
...
llvm-svn: 18078
2004-11-21 03:35:21 +00:00
Chris Lattner
894bf8eed0
ignore generated files
...
llvm-svn: 18073
2004-11-21 00:01:54 +00:00
Chris Lattner
aee9a76f52
ignore generated files.
...
llvm-svn: 18072
2004-11-21 00:00:54 +00:00
Chris Lattner
d02c9eb697
Remove all JIT specific code and switch the code generator over to emitting
...
relocations for global references.
llvm-svn: 18068
2004-11-20 23:55:15 +00:00
Chris Lattner
b7e72cba22
Implement the X86 JIT interfaces
...
llvm-svn: 18067
2004-11-20 23:54:33 +00:00
Chris Lattner
8f2ed923ea
Describe the X86 target-specific relocations.
...
llvm-svn: 18066
2004-11-20 23:54:19 +00:00
Chris Lattner
8c645ec0d3
We implement these interfaces
...
llvm-svn: 18065
2004-11-20 23:53:56 +00:00
Chris Lattner
5f3d274f5f
Adjust to changed interfaces
...
llvm-svn: 18064
2004-11-20 23:53:26 +00:00
Brian Gaeke
a8ea7d9cdb
Support most cases of vaarg (except double).
...
llvm-svn: 18055
2004-11-20 22:50:42 +00:00
Brian Gaeke
a45e7c40d4
Update failing test cases & to-do list.
...
llvm-svn: 18054
2004-11-20 22:50:41 +00:00
Chris Lattner
233e9bb546
This method was never implemented
...
llvm-svn: 18039
2004-11-20 04:19:47 +00:00
Chris Lattner
6f01b4cf1f
Remove this method, it's not clear how it could be implemented indep of 32 or 64-bit mode
...
llvm-svn: 18038
2004-11-20 04:17:17 +00:00
Chris Lattner
ae5ac03c1d
getJITStubForFunction is optional and unimplemented, just remove it for now.
...
llvm-svn: 18037
2004-11-20 04:15:38 +00:00
Chris Lattner
f0c6aff268
getJITStubForFunction is optional and unimplemented, just remove it.
...
llvm-svn: 18036
2004-11-20 04:14:44 +00:00
Brian Gaeke
774e978e0d
Implement vacopy and vanext.
...
llvm-svn: 18031
2004-11-20 03:32:12 +00:00
Misha Brukman
4bf11e1618
Revert the patch that adds Function* for each 64-bit libc div/mul/rem that we
...
want to do; instead, we can use MachineInstr::addExternalSymbol(char*, bool) and
thus we don't have to modify the Module as we are code generating for it
llvm-svn: 18025
2004-11-20 00:10:20 +00:00
Tanya Lattner
2e4f222045
Made modsched hidden and changed so it matches the style of other options.
...
llvm-svn: 18024
2004-11-19 23:34:33 +00:00
Misha Brukman
f1ccebba3d
Fix grammar
...
llvm-svn: 18023
2004-11-19 23:09:40 +00:00
Misha Brukman
ce75b2c2cf
Add protoypes for 64-bit long/ulong div, mul, and rem functions
...
llvm-svn: 18019
2004-11-19 22:14:35 +00:00
Misha Brukman
dbe04afcb9
Fix file comment header
...
llvm-svn: 18018
2004-11-19 22:09:21 +00:00
Misha Brukman
cb178bd478
Handle GhostLinkage case for completeness (should not be seen by the asm writer)
...
llvm-svn: 18015
2004-11-19 21:49:19 +00:00
Brian Gaeke
1db83f7b73
Add VANext and VAArg stubs.
...
llvm-svn: 18012
2004-11-19 21:08:18 +00:00
Brian Gaeke
1c014df436
Implement va_start.
...
llvm-svn: 18011
2004-11-19 20:57:24 +00:00
Chris Lattner
4cd9def8b7
Dont' forget to switch back to decimal output
...
llvm-svn: 18010
2004-11-19 20:57:07 +00:00
Brian Gaeke
3db46bd0e1
First part of varargs support: getting all varargs which could possibly
...
be in registers into memory.
llvm-svn: 18006
2004-11-19 20:31:08 +00:00
Brian Gaeke
8bb29bf3f6
va_end can safely be codegen'd to nothing on v8.
...
llvm-svn: 18004
2004-11-19 19:21:34 +00:00
Brian Gaeke
201535d102
A very sorry stub implementation of varargs intrinsics...
...
llvm-svn: 18003
2004-11-19 18:53:59 +00:00
Brian Gaeke
1810073046
Update list of expected test failures.
...
llvm-svn: 18002
2004-11-19 18:48:29 +00:00
Brian Gaeke
3effd0d769
Fix bug in casting to long/ulong.
...
llvm-svn: 18001
2004-11-19 18:48:10 +00:00
Nate Begeman
488f4a4352
Eliminate another 6k register copies that the register allocator would just
...
coalesce out of hbd. Speeds up compilation by 2% (0.6s)
llvm-svn: 17987
2004-11-19 08:01:16 +00:00
Nate Begeman
f4fd759f9e
Generate fewer reg-reg copies for the register allocator to deal with.
...
This eliminates over 2000 in hbd alone.
llvm-svn: 17973
2004-11-19 02:06:40 +00:00
Tanya Lattner
cb0da4f1b7
Fixed to fit in 80 columns.
...
llvm-svn: 17961
2004-11-18 18:47:29 +00:00
Tanya Lattner
21590db8fd
Adding option to llc for ModuloScheduling. By default it is turned off.
...
llvm-svn: 17959
2004-11-18 18:38:01 +00:00
Brian Gaeke
de6e536849
Rewrite LoadArgumentsToVirtualRegs, making it match almost exactly how
...
visitCallInst works. Support cast of byte/short/int to long.
llvm-svn: 17949
2004-11-18 07:43:33 +00:00
Brian Gaeke
2c6b9c914b
Update current expected failures list - expand it to include all of
...
SingleSource. Update to-do list (open-coding refers to binary operations on
longs, not to passing them into functions, which we already support.)
llvm-svn: 17948
2004-11-18 07:43:32 +00:00
Nate Begeman
2b575bec80
Eliminate another common source of moves that the register allocator
...
shouldn't be forced to coalesce for us: folded GEP operations. This too
fires thousands of times across the testsuite.
llvm-svn: 17947
2004-11-18 07:22:46 +00:00
Nate Begeman
5d9c292e7f
When accessing the base register for global variables, use the register
...
directly rather than making a copy for the register allocator to coalesce.
This kills thousands of live intervals across the testsuite.
llvm-svn: 17946
2004-11-18 06:51:29 +00:00
Nate Begeman
51f6635e42
Clean up and fix cast codegen by removing cases that are handled elsewhere,
...
and properly emitting signed short to unsigned int. This fixes the last
regression vs. the CBE, MultiSource/Applications/hbd.
llvm-svn: 17942
2004-11-18 04:56:53 +00:00
Brian Gaeke
1553b58f39
Allocate fewer registers and tighten up alignment restrictions.
...
llvm-svn: 17929
2004-11-18 00:25:20 +00:00