Chris Lattner
5b359c6c4f
fix some bugs in the implementation of SHL_PARTS and friends.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21004 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 04:00:59 +00:00
Chris Lattner
4759982a2d
Turn expanded shift operations into (e.g.) SHL_PARTS if the target supports it.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21002 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 03:38:53 +00:00
Chris Lattner
41be951a47
Print some new nodes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21001 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 03:30:42 +00:00
Chris Lattner
f4b457987f
Fix a bug when inserting a libcall into a function with no other calls.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20999 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 03:22:40 +00:00
Nate Begeman
ea19cd51aa
Fix a warning about an unhandled switch case
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20994 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 00:41:14 +00:00
Nate Begeman
fc1b1dad88
Add ISD::UNDEF node
...
Teach the SelectionDAG code how to expand and promote it
Have PPC32 LowerCallTo generate ISD::UNDEF for int arg regs used up by fp
arguments, but not shadowing their value. This allows us to do the right
thing with both fixed and vararg floating point arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20988 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 22:34:39 +00:00
Chris Lattner
380ae49599
print the machine CFG in the -print-machineinstrs dump
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20976 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-01 06:48:38 +00:00
Andrew Lenharth
95762124a1
PCMarker support for DAG and Alpha
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20965 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-31 21:24:06 +00:00
Chris Lattner
a33ef4816d
Instead of setting up the CFG edges at selectiondag construction time, set
...
them up after the code has been emitted. This allows targets to select one
mbb as multiple mbb's as needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20937 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-30 01:10:47 +00:00
Chris Lattner
f51d3bd676
Fix a bug that andrew noticed where we do not correctly sign/zero extend
...
returned integer values all of the way to 64-bits (we only did it to 32-bits
leaving the top bits undefined). This causes problems for targets like alpha
whose ABI's define the top bits too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20926 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 19:09:56 +00:00
Chris Lattner
d4e50bb2e2
implement legalization of build_pair for nate
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20901 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-28 22:03:13 +00:00
Andrew Lenharth
7f4ec3b2e3
First step in adding pcmarker intrinsic. Second step (soon) is adding backend support.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20900 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-28 20:05:49 +00:00
Nate Begeman
8e21e71b24
Change interface to LowerCallTo to take a boolean isVarArg argument.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20842 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-26 01:29:23 +00:00
Chris Lattner
5b3a4553c1
Fix the missing symbols problem Bill was hitting. Patch contributed by
...
Bill Wendling!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20649 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 15:38:16 +00:00
Chris Lattner
e4d5c441e0
This mega patch converts us from using Function::a{iterator|begin|end} to
...
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:54:21 +00:00
Chris Lattner
e97568c3c4
I didn't mean to check this in. :(
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20555 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 20:59:51 +00:00
Chris Lattner
ee639f1760
Fix a bug where we would incorrectly do a sign ext instead of a zero ext
...
because we were checking the wrong thing. Thanks to andrew for pointing
this out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20554 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 20:55:51 +00:00
Chris Lattner
f768bba43f
Allow the live interval analysis pass to be a bit more aggressive about
...
numbering values in live ranges for physical registers.
The alpha backend currently generates code that looks like this:
vreg = preg
...
preg = vreg
use preg
...
preg = vreg
use preg
etc. Because vreg contains the value of preg coming in, each of the
copies back into preg contain that initial value as well.
In the case of the Alpha, this allows this testcase:
void "foo"(int %blah) {
store int 5, int *%MyVar
store int 12, int* %MyVar2
ret void
}
to compile to:
foo:
ldgp $29, 0($27)
ldiq $0,5
stl $0,MyVar
ldiq $0,12
stl $0,MyVar2
ret $31,($26),1
instead of:
foo:
ldgp $29, 0($27)
bis $29,$29,$0
ldiq $1,5
bis $0,$0,$29
stl $1,MyVar
ldiq $1,12
bis $0,$0,$29
stl $1,MyVar2
ret $31,($26),1
This does not seem to have any noticable effect on X86 code.
This fixes PR535.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20536 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 23:05:19 +00:00
Chris Lattner
14723c264d
constant fold FP_ROUND_INREG, ZERO_EXTEND_INREG, and SIGN_EXTEND_INREG
...
This allows the alpha backend to compile:
bool %test(uint %P) {
%c = seteq uint %P, 0
ret bool %c
}
into:
test:
ldgp $29, 0($27)
ZAP $16,240,$0
CMPEQ $0,0,$0
AND $0,1,$0
ret $31,($26),1
instead of:
test:
ldgp $29, 0($27)
ZAP $16,240,$0
ldiq $1,0
ZAP $1,240,$1
CMPEQ $0,$1,$0
AND $0,1,$0
ret $31,($26),1
... and fixes PR534.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20534 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 18:37:12 +00:00
Alkis Evlogimenos
d0656fc94d
Lower llvm.isunordered(a, b) into a != a | b != b.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20382 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-01 02:07:58 +00:00
Chris Lattner
0942b7caf1
Lower prefetch to a noop, patch contributed by Justin Wick!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20375 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 19:27:23 +00:00
Chris Lattner
84734ce8ef
Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code.
...
Changing 'op' here caused us to not enter the store into a map, causing
reemission of the code!! In practice, a simple loop like this:
no_exit: ; preds = %no_exit, %entry
%indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3]
%tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0 ; <double*> [#uses=1]
store double 0.000000e+00, double* %tmp.4
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=2]
%exitcond = seteq uint %indvar.next, %N ; <bool> [#uses=1]
br bool %exitcond, label %return, label %no_exit
was being code gen'd to:
.LBBtest_1: # no_exit
movl %edx, %esi
shll $4, %esi
movl $0, 4(%eax,%esi)
movl $0, (%eax,%esi)
incl %edx
movl $0, (%eax,%esi)
movl $0, 4(%eax,%esi)
cmpl %ecx, %edx
jne .LBBtest_1 # no_exit
Note that we are doing 4 32-bit stores instead of 2. Now we generate:
.LBBtest_1: # no_exit
movl %edx, %esi
incl %esi
shll $4, %edx
movl $0, (%eax,%edx)
movl $0, 4(%eax,%edx)
cmpl %ecx, %esi
movl %esi, %edx
jne .LBBtest_1 # no_exit
This is much happier, though it would be even better if the increment of ESI
was scheduled after the compare :-/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20265 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 07:23:39 +00:00
Misha Brukman
d3f03e4b50
Fix compilation errors with VS 2005, patch by Aaron Gray.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20231 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 21:39:27 +00:00
Chris Lattner
d8658616cf
Don't rely on doubles comparing identical to each other, which doesn't work
...
for 0.0 and -0.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20230 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 20:17:32 +00:00
Chris Lattner
aa781b3404
Don't sink argument loads into loops or other bad places. This disables folding of argument loads with instructions that are not in the entry block.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20228 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 19:40:32 +00:00
Chris Lattner
27e192196f
Print GEP offsets as signed values instead of unsigned values. On X86, this
...
prints:
getelementptr (int* %A, int -1)
as: "(A) - 4" instead of "(A) + 18446744073709551612", which makes the
assembler much happier.
This fixes test/Regression/CodeGen/X86/2005-02-14-IllegalAssembler.ll,
and Benchmarks/Prolangs-C/cdecl with LLC on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20183 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 21:40:26 +00:00
Chris Lattner
595dc5408a
Fix a case where were incorrectly compiled cast from short to int on 64-bit
...
targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20030 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-04 18:39:19 +00:00
Andrew Lenharth
571c9c314f
fix constant pointer outputing on 64 bit machines
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20026 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-04 13:47:16 +00:00
Chris Lattner
272455b404
Fix yet another memset issue.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19986 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-02 03:44:41 +00:00
Chris Lattner
deb692e756
Fix some bugs andrew noticed legalizing memset for alpha
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19969 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 18:38:28 +00:00
Chris Lattner
bca81448ac
Improve conformance with the Misha spelling benchmark suite
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19930 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-30 00:09:23 +00:00
Chris Lattner
9d5d7598db
adjust to ilist changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19924 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 18:41:25 +00:00
Chris Lattner
99939d39c9
Alpha doesn't have a native f32 extload instruction.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19880 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 22:58:25 +00:00
Chris Lattner
e76ad6de40
implement legalization of truncates whose results and sources need to be
...
truncated, e.g. (truncate:i8 something:i16) on a 32 or 64-bit RISC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19879 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 22:52:50 +00:00
Chris Lattner
e560521f1a
Get alpha working with memset/memcpy/memmove
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19878 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 22:29:18 +00:00
Chris Lattner
13c184de29
CopyFromReg produces two values. Make sure that we remember that both are
...
legalized, and actually return the correct result when we legalize the chain first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19866 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 06:27:38 +00:00
Chris Lattner
fed5577066
Silence optimized warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19797 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 23:19:44 +00:00
Chris Lattner
3563015b0d
Simplify/speedup the PEI by not having to scan for uses of the callee saved
...
registers. This information is computed directly by the register allocator
now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19795 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 23:13:12 +00:00
Chris Lattner
786116337e
Update physregsused info.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19793 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 22:55:45 +00:00
Chris Lattner
0648b16c48
Update this pass to set PhysRegsUsed info in MachineFunction.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19792 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 22:51:56 +00:00
Chris Lattner
b0f31bf19b
Update these register allocators to set the PhysRegUsed info in MachineFunction.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19791 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 22:45:13 +00:00
Chris Lattner
ce9c41e77a
Add support for the PhysRegsUsed array.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19789 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 22:13:58 +00:00
Chris Lattner
92b9fcea7b
Speed this up a bit by making ModifiedRegs a vector<char> not vector<bool>
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19787 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 21:45:01 +00:00
Chris Lattner
9c32d3b798
Adjust to changes in SelectionDAG interfaces
...
The first half of correct chain insertion for libcalls. This is not enough
to fix Fhourstones yet though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19781 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 04:42:50 +00:00
Chris Lattner
b48da39536
Remove the 3 HACK HACK HACKs I put in before, fixing them properly with
...
the new TLI that is available.
Implement support for handling out of range shifts. This allows us to
compile this code (a 64-bit rotate):
unsigned long long f3(unsigned long long x) {
return (x << 32) | (x >> (64-32));
}
into this:
f3:
mov %EDX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%ESP + 8]
ret
GCC produces this:
$ gcc t.c -masm=intel -O3 -S -o - -fomit-frame-pointer
..
f3:
push %ebx
mov %ebx, DWORD PTR [%esp+12]
mov %ecx, DWORD PTR [%esp+8]
mov %eax, %ebx
mov %edx, %ecx
pop %ebx
ret
The Simple ISEL produces (eww gross):
f3:
sub %ESP, 4
mov DWORD PTR [%ESP], %ESI
mov %EDX, DWORD PTR [%ESP + 8]
mov %ECX, DWORD PTR [%ESP + 12]
mov %EAX, 0
mov %ESI, 0
or %EAX, %ECX
or %EDX, %ESI
mov %ESI, DWORD PTR [%ESP]
add %ESP, 4
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19780 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 04:39:44 +00:00
Chris Lattner
ac9dc08c7f
Adjust to changes in SelectionDAG interface.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19779 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 04:36:26 +00:00
Chris Lattner
68cd65ea68
Get this to work for 64-bit systems.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19763 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 23:04:37 +00:00
Chris Lattner
5037a15910
Implicitly defined registers can clobber callee saved registers too!
...
This fixes the return-address-not-being-saved problem in the Alpha backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19741 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 00:49:16 +00:00
Chris Lattner
7cd50cf286
More bugfixes for IA64 shifts.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19739 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 00:33:03 +00:00
Chris Lattner
27ff112948
Fix problems with non-x86 targets.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19738 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 00:31:52 +00:00
Chris Lattner
a7306db5f7
Add a nasty hack to fix Alpha/IA64 multiplies by a power of two.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19737 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 00:20:42 +00:00
Chris Lattner
9bb86f46e1
Remove unneeded line.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19736 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 23:43:12 +00:00
Chris Lattner
1e7ceaf0a0
test commit
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19735 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 23:38:56 +00:00
Chris Lattner
a93ec3ebfb
Unary token factor nodes are unneeded.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19727 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 18:01:22 +00:00
Chris Lattner
77e77a6aa0
Refactor libcall code a bit. Initial implementation of expanding int -> FP
...
operations for 64-bit integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19724 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 06:05:23 +00:00
Chris Lattner
e5544f851a
Simplify the shift-expansion code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19721 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 20:29:23 +00:00
Chris Lattner
84f6788044
Expand add/sub into ADD_PARTS/SUB_PARTS instead of a non-existant libcall.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19715 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 18:52:28 +00:00
Chris Lattner
17eee18f40
implement add_parts/sub_parts.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19714 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 18:50:55 +00:00
Chris Lattner
2c49f27955
Support targets that do not use i8 shift amounts.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19707 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 22:31:21 +00:00
Chris Lattner
3ca6a2c72c
Add an assertion that would have made more sense to duraid
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19704 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 21:32:07 +00:00
Chris Lattner
3d9dffc586
Add support for targets that pass args in registers to calls.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19703 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 20:24:35 +00:00
Chris Lattner
1e81b9e511
Fold single use token factor nodes into other token factor nodes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19701 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 19:10:54 +00:00
Chris Lattner
ec39a45bdb
Realize the individual pieces of an expanded copytoreg/store/load are
...
independent of each other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19700 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 18:02:17 +00:00
Chris Lattner
39908e0ce0
Know some identities about tokenfactor nodes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19699 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 18:01:40 +00:00
Chris Lattner
88218ef706
Know some simple identities. This improves codegen for (1LL << N).
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19698 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 17:29:49 +00:00
Chris Lattner
2a6e163edc
Just in case, handle something that is both a use and a def.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19696 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 17:11:51 +00:00
Chris Lattner
d45be36965
When an instruction moves, make sure to update the VarInfo::Kills list as
...
well as all of teh other stuff in livevar. This fixes the compiler crash
on fourinarow last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19695 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 17:09:15 +00:00
Chris Lattner
c71d6949b9
Use the TargetInstrInfo::commuteInstruction method to commute instructions
...
instead of doing it manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19685 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 07:08:42 +00:00
Chris Lattner
e34b396ab7
Implement a way of expanding shifts. This applies to targets that offer
...
select operations or to shifts that are by a constant. This automatically
implements (with no special code) all of the special cases for shift by 32,
shift by < 32 and shift by > 32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19679 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 04:19:40 +00:00
Chris Lattner
d6e496732b
Add a hook to find out how the target handles shift amounts that are out of
...
range. Either they are undefined (the default), they mask the shift amount
to the size of the register (X86, Alpha, etc), or they extend the shift (PPC).
This defaults to undefined, which is conservatively correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19677 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 03:36:14 +00:00
Chris Lattner
d5d5682512
Zero is cheaper than sign extend.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19675 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-18 21:57:59 +00:00
Chris Lattner
47e9223e06
Fix some fixmes (promoting bools for select and brcond), fix promotion
...
of zero and sign extends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19671 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-18 19:27:06 +00:00
Chris Lattner
4a9b4f1943
Keep track of the retval type as well.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19670 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-18 19:26:36 +00:00
Chris Lattner
ef5cd1d3cf
Teach legalize to promote copy(from|to)reg, instead of making the isel pass
...
do it. This results in better code on X86 for floats (because if strict
precision is not required, we can elide some more expensive double -> float
conversions like the old isel did), and allows other targets to emit
CopyFromRegs that are not legal for arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19668 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-18 17:54:55 +00:00
Chris Lattner
82fbfb6984
Teach legalize to promote SetCC results.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19657 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-18 02:59:52 +00:00
Chris Lattner
f30b73b1c6
Allow setcc operations to have nonbool types.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19656 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-18 02:52:03 +00:00
Chris Lattner
6e4e7652d8
Fix the completely broken FP constant folds for setcc's.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19651 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-18 02:11:55 +00:00
Chris Lattner
d3948116b8
Non-volatile loads can be freely reordered against each other. This fixes
...
X86/reg-pressure.ll again, and allows us to do nice things in other cases.
For example, we now codegen this sort of thing:
int %loadload(int *%X, int* %Y) {
%Z = load int* %Y
%Y = load int* %X ;; load between %Z and store
%Q = add int %Z, 1
store int %Q, int* %Y
ret int %Y
}
Into this:
loadload:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%EAX]
mov %ECX, DWORD PTR [%ESP + 8]
inc DWORD PTR [%ECX]
ret
where we weren't able to form the 'inc [mem]' before. This also lets the
instruction selector emit loads in any order it wants to, which can be good
for register pressure as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19644 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-17 22:19:26 +00:00
Chris Lattner
a651cf67b7
Don't call SelectionDAG.getRoot() directly, go through a forwarding method.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19642 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-17 19:43:36 +00:00
Chris Lattner
0afa8e348e
Implement a target independent optimization to codegen arguments only into
...
the basic block that uses them if possible. This is a big win on X86, as it
lets us fold the argument loads into instructions and reduce register pressure
(by not loading all of the arguments in the entry block).
For this (contrived to show the optimization) testcase:
int %argtest(int %A, int %B) {
%X = sub int 12345, %A
br label %L
L:
%Y = add int %X, %B
ret int %Y
}
we used to produce:
argtest:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EAX, 12345
sub %EAX, %ECX
mov %EDX, DWORD PTR [%ESP + 8]
.LBBargtest_1: # L
add %EAX, %EDX
ret
now we produce:
argtest:
mov %EAX, 12345
sub %EAX, DWORD PTR [%ESP + 4]
.LBBargtest_1: # L
add %EAX, DWORD PTR [%ESP + 8]
ret
This also fixes the FIXME in the code.
BTW, this occurs in real code. 164.gzip shrinks from 8623 to 8608 lines of
.s file. The stack frame in huft_build shrinks from 1644->1628 bytes,
inflate_codes shrinks from 116->108 bytes, and inflate_block from 2620->2612,
due to fewer spills.
Take that alkis. :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19639 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-17 17:55:19 +00:00
Chris Lattner
068a81e9fc
Refactor code into a new method.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19635 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-17 17:15:02 +00:00
Chris Lattner
714b69d047
Shift and setcc types default to the pointer type.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19619 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 23:59:48 +00:00
Chris Lattner
8ac532c55e
Implement legalize of call nodes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19617 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 19:46:48 +00:00
Chris Lattner
55ba8fba75
Revamp supported ops. Instead of just being supported or not, we now keep
...
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.
Implement custom lowering for a couple of ops, implement promotion for select
operations (which x86 needs).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19613 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 07:29:19 +00:00
Chris Lattner
171453a284
add method stub
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19612 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 07:28:41 +00:00
Chris Lattner
4b7899343e
Don't mash stuff together.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19611 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 07:28:31 +00:00
Chris Lattner
cba82f9339
Use enums, move virtual dtor out of line.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19610 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 07:28:11 +00:00
Chris Lattner
f8161d83f0
Implement some more missing promotions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19606 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 05:06:12 +00:00
Chris Lattner
9467497ae2
Clarify assertion.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 02:23:34 +00:00
Chris Lattner
7636512f59
Add assertions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19596 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 02:23:22 +00:00
Chris Lattner
c8ea3c4710
Add support for promoted registers being live across blocks.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19595 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 02:23:07 +00:00
Chris Lattner
cfdfe4ce4a
Set up identity transforms.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19584 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 01:20:18 +00:00
Chris Lattner
71c42a0190
Move some information into the TargetLowering object.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19583 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 01:11:45 +00:00
Chris Lattner
98e5c0e5e4
Use the new TLI method to get this.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19582 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 01:11:19 +00:00
Chris Lattner
bb97d81cc8
Move some information out of LegalizeDAG into the generic Target interface.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19581 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 01:10:58 +00:00
Chris Lattner
1713e73b8a
legalize a bunch of operations that I missed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19580 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 00:38:00 +00:00
Chris Lattner
fb849800ea
Add support for targets that require promotions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19579 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 00:37:38 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
7c68ec6b70
Fix a pointer invalidation problem. This fixes Generic/badarg6.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19361 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 23:32:00 +00:00
Chris Lattner
5351e9b172
Fold conditional branches on constants away.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19360 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:49:57 +00:00
Chris Lattner
4287d5e355
Fix a thinko in the reassociation code, fixing Generic/badlive.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19359 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:44:09 +00:00
Chris Lattner
b00a6425de
Add support for truncating integer casts from long.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19358 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:37:48 +00:00
Chris Lattner
8afc48e44a
Fix a bug in load expansion legalization and ret legalization. This fixes
...
CodeGen/Generic/select.ll:castconst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19357 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:28:47 +00:00
Chris Lattner
c7af17923e
Legalize unconditional branches too
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19356 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:12:08 +00:00
Chris Lattner
7cc4777a26
Implement support for long GEP indices on 32-bit archs and support for
...
int GEP indices on 64-bit archs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19354 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:56:57 +00:00
Chris Lattner
fd8c39b773
Simplify: truncate ({zero|sign}_extend (X))
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19353 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:56:24 +00:00
Chris Lattner
03c0cf822e
implement legalization of a bunch more operators.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19352 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:45:56 +00:00
Chris Lattner
fad71ebe1e
Fix another bug legalizing calls!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19350 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:35:32 +00:00
Chris Lattner
f44fd88e9c
Fix handling of dead PHI nodes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19349 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:34:19 +00:00
Chris Lattner
ebda942efc
Fix a bug legalizing calls
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19348 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:34:13 +00:00
Chris Lattner
62fd269c14
After legalizing a DAG, delete dead nodes to save space.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19346 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:09:37 +00:00
Chris Lattner
0e12e6e041
Implement RemoveDeadNodes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19345 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:09:16 +00:00
Chris Lattner
c18ae4cb6a
Teach legalize how to handle condbranches
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19339 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 08:19:42 +00:00
Chris Lattner
1c08c714bb
Initial implementation of the SelectionDAGISel class. This contains most
...
of the code for lowering from LLVM code to a SelectionDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19331 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:47:53 +00:00
Chris Lattner
b75c12de67
This file is obsolete
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19330 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:47:23 +00:00
Chris Lattner
3e928bbd61
Initial implementation of the DAG legalization. This still has a long way
...
to go, but it does work for some non-trivial cases now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19329 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:47:09 +00:00
Chris Lattner
c3aae25116
Complete rewrite of the SelectionDAG class.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19327 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:46:32 +00:00
Chris Lattner
310968cbbb
First draft of new Target interface
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19324 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:44:53 +00:00
Chris Lattner
cfa0f2edd3
Make the 2-address instruction lowering pass smarter in two ways:
...
1. If we are two-addressing a commutable instruction and the LHS is not the
last use of the variable, see if the instruction is the last use of the
RHS. If so, commute the instruction, allowing us to avoid a
register-register copy in many cases for common instructions like ADD, OR,
AND, etc on X86.
2. If #1 doesn't hold, and if this is an instruction that also existing in
3-address form, promote the instruction to a 3-address instruction to
avoid the register-register copy. We can do this for several common
instructions in X86, including ADDrr, INC, DEC, etc.
This patch implements test/Regression/CodeGen/X86/commute-two-addr.ll,
overlap-add.ll, and overlap-shift.ll when I check in the X86 support for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19245 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:34:12 +00:00
Chris Lattner
5b2103405b
Move virtual method call out of loop
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18955 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:04:32 +00:00
Nate Begeman
80ad87d227
Move virtual function call out of loop to speed up getFreePhysReg by about
...
20%, shaving 0.1s off hbd compile time on my g5. Yay.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18592 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 05:25:53 +00:00
Reid Spencer
ce9653ce44
For PR387:\
...
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 04:03:45 +00:00
Chris Lattner
ead1b3f0bb
Prevent accessing past the end of the intervals vector, this fixes
...
Prolang-C/bison in the JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18477 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-04 01:22:09 +00:00
Chris Lattner
63eb93025d
Fix SingleSource/UnitTests/2004-11-28-GlobalBoolLayout.c, and hopefully
...
PR449
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18306 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-28 17:56:47 +00:00
Chris Lattner
cf88d324a8
Fix the FIXME, nuke the JIT specific forceCompilationOf method.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18131 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-22 21:54:35 +00:00
Chris Lattner
6f71720be3
These methods are obsolete
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18129 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-22 21:48:33 +00:00
Chris Lattner
3bf285a676
Adjust to changed interfaces
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18064 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 23:53:26 +00:00
Chris Lattner
47012c0c71
Add getCurrentPCOffset() and addRelocation() methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18034 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 03:44:39 +00:00
Chris Lattner
45730d71b6
Match change in MachineCodeEmitter prototype.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18009 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-19 20:56:46 +00:00
Chris Lattner
c8b9f33ac0
* There is no reason for SpillWeights to be an instance var
...
* Do not put fixed registers into the unhandled set. This means they will
never find their way into the inactive, active, or handled sets, so we
can simplify a bunch of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17945 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 06:01:45 +00:00
Chris Lattner
9fddc12c9b
There is no need to check to see if j overflowed in this loop as we're only
...
incrementing i.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17944 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 05:28:21 +00:00
Chris Lattner
1e409bfd2a
Moderate head scratching reveals that this conditional is not needed. If
...
i->start == j->start, then certainly i->end > j->start.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17943 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 05:19:02 +00:00
Chris Lattner
f348e3abfc
Fix a couple of bugs where we considered physregs past their range as possibly
...
intersecting an interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17939 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 04:33:31 +00:00
Chris Lattner
1a3a487763
Fix typeo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17938 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 04:31:10 +00:00
Chris Lattner
365b95fbbc
Start using the iterators in the fixed_ intervals to avoid having to binary
...
search physreg intervals every time we access it. This takes another
half second off of linscan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17937 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 04:13:02 +00:00
Chris Lattner
8c68b6a226
Take another .7 seconds off of linear scan time.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17936 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 04:02:11 +00:00
Chris Lattner
19828d46f6
Add a counter for the number of times linscan has to backtrack. Start using
...
the iterator hints we have to speed up overlaps(). This speeds linscan up
by about .2s (out of 8.7) on 175.vpr for PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17935 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 03:49:30 +00:00
Chris Lattner
bae74d9192
Add ability to give hints to the overlaps routines.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17934 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 03:47:34 +00:00
Chris Lattner
cbb5625cec
* Improve comments/documentation substantially
...
* Eliminate the releaseMemory method, this is not an analysis
* Change the fixed, active, and inactive lists of intervals to maintain an
iterator for the current position in the interval. This allows us to do
constant time increments of the iterator instead of having to do a binary
search to find our liverange in our liveinterval all of the time, which
substantially speeds up cases where LiveIntervals have many LiveRanges
- which is very common for physical registers. On targets with many
physregs, this can make a noticable difference.
With a release build of LLC for PPC, this halves the time in
processInactiveIntervals and processActiveIntervals, from 1.5s to .75s.
This also lays the ground for more to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17933 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 02:42:27 +00:00
Chris Lattner
743ef6d70e
Add new advanceTo method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17932 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 02:37:31 +00:00
Chris Lattner
8d8d513d4d
Fix a minor bug in expiredAt. endNumber() is the first number that is not valid.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 01:34:44 +00:00
Chris Lattner
23b71c1e1e
Rename some methods, use 'begin' instead of 'start', add new LiveInterval
...
iterator/begin/end members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17930 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 01:29:39 +00:00
Brian Gaeke
8311befb69
Give a better message for a common assertion failure.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17887 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:52:35 +00:00
Chris Lattner
41ffe4b531
Do not make i have bigger scope that we need
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17483 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-05 04:47:37 +00:00
Reid Spencer
6cb21d443e
Change Library Names Not To Conflict With Others When Installed
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 23:18:45 +00:00
Chris Lattner
52c09d7656
Move method bodies that depend on <algorithm> from MBB.h to MBB.cpp
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17253 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 15:43:42 +00:00
Chris Lattner
27f291600b
Clean up the MachineBasicBlock.h file, percolating #includes into this file.
...
Patch contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17251 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 15:35:58 +00:00
Chris Lattner
ad3c74fc9b
Reduce usage of MRegisterInfo::getRegClass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17238 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 05:29:18 +00:00
Chris Lattner
6fcd8d848d
Do not use variable sized arrays in C++, they are non-portable. Patch
...
contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17217 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-25 18:44:14 +00:00
Chris Lattner
7a36ae8b01
Patch to support MSVC better, contributed by Morten Ofstad
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17215 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-25 18:40:47 +00:00
Reid Spencer
cac731ecbe
We won't use automake
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 03:35:04 +00:00
Reid Spencer
86d341b204
Initial automake generated Makefile template
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 23:55:41 +00:00
Chris Lattner
bd1d382cc4
Add support for undef
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17055 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:19:26 +00:00
Chris Lattner
ca4f6ebefc
Allow machine operands to represent global variables with offsets. This is
...
useful when you have a reference like:
int A[100];
void foo() { A[10] = 1; }
In this case, &A[10] is a single constant and should be treated as such.
Only MO_GlobalAddress and MO_ExternalSymbol are allowed to use this field, no
other operand type is.
This is another fine patch contributed by Jeff Cohen!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17007 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-15 04:38:41 +00:00
Chris Lattner
47eb6567e2
This patch fixes the nasty bug that caused 175.vpr to fail for X86 last night.
...
The problem occurred when trying to reload this instruction:
MOV32mr %reg2326, 8, %reg2297, 4, %reg2295
The value of reg2326 was available in EBX, so it was reused from there, instead
of reloading it into EDX.
The value of reg2297 was available in EDX, so it was reused from there, instead
of reloading it into EDI.
The value of reg2295 was not available, so we tried reloading it into EBX, its
assigned register. However, we checked and saw that we already reloaded
something into EBX, so we chose what reg2326 was assigned to (EDX) and reloaded
into that register instead.
Unfortunately EDX had already been used by reg2297, so reloading into EDX
clobbered the value used by the reg2326 operand, breaking the program.
The fix for this is to check that the newly picked register is ok. In this
case we now find that EDX is already used and try using EDI, which succeeds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17006 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-15 03:19:31 +00:00
Chris Lattner
8df6a594d2
This patch adds and improves debugging output. No functionality changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17005 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-15 03:16:29 +00:00
Reid Spencer
d96cb6eaa0
Update to reflect changes in Makefile rules.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:46:52 +00:00
Misha Brukman
de2a9432f9
ModuloScheduling has moved to lib/Target/SparcV9
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16906 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 23:37:40 +00:00
Misha Brukman
f60a149df6
ModuloScheduling moved to lib/Target/SparcV9 as it is SparcV9-specific
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16902 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 23:33:20 +00:00
Tanya Lattner
420025b04f
Added debug information. Fixed several bugs in the reconstruct loop function.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16895 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 22:44:35 +00:00
Reid Spencer
01930c4891
Remove the InstrSched directory (moved to SparcV9)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16887 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 21:19:41 +00:00
Reid Spencer
d9a9925f87
Directory no long exists (moved to Targets/SparcV9).
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16886 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 21:18:31 +00:00
Reid Spencer
9f41a5fe85
Initial version of automake Makefile.am file.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 20:43:57 +00:00
Misha Brukman
6a134dedf6
Hyphenate target-(in)dependent for more tasty grammar goodness (tm)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16854 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-08 19:43:31 +00:00
Misha Brukman
6b68973617
InstrSched has been moved to lib/Target/SparcV9
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16850 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-08 18:12:53 +00:00
Misha Brukman
c8e049124e
InstrSched is SparcV9-specific and so has been moved to lib/Target/SparcV9/
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16849 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-08 18:12:14 +00:00
Misha Brukman
1481a5c4c7
Single-space instead of double-spacing in the Makefile
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16845 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-08 18:05:25 +00:00
Chris Lattner
7cf3490892
Do not repeat the map lookup
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16633 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-01 23:16:43 +00:00
Chris Lattner
bec6a9ea12
When a virtual register is folded into an instruction, keep track of whether
...
it was a use, def, or both. This allows us to be less pessimistic in our
analysis of them. In practice, this doesn't make a big difference, but it
doesn't hurt either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16632 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-01 23:15:36 +00:00
Chris Lattner
52b25db3ef
Add a simple little improvement to the local spiller to keep track of stores
...
and delete them if they turn out to be dead. This is a useful little hack
that even speeds up some programs. For example, it speeds up Ptrdist/ks
from 17.53s to 15.59s, and 188.ammp from 149s to 146s.
This also speeds up llc :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16630 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-01 19:47:12 +00:00
Chris Lattner
7fb64347d7
Substantially revamp the local spiller, causing it to actually improve the
...
generated code over the simple spiller. The new local spiller generates
substantially better code than the simple one in some cases, by reusing
values that are loaded out of stack slots and kept available in registers.
This primarily helps programs that are spilling a lot, and there is still
stuff that can be done to improve it. This patch makes the local spiller
the default, as it's only a tiny bit slower than the simple spiller (it
increases the runtime of llc by < 1%).
Here are some numbers with speedups.
Program #reuse old(s) new(s) Speedup
Povray: 3452, 16.87 -> 15.93 (5.5%)
177.mesa: 2176, 2.77 -> 2.76 (0%)
179.art: 35, 28.43 -> 28.01 (1.5%)
183.equake: 55, 61.44 -> 61.41 (0%)
188.ammp: 869, 174 -> 149 (15%)
164.gzip: 43, 40.73 -> 40.71 (0%)
175.vpr: 351, 18.54 -> 17.34 (6.5%)
176.gcc: 2471, 5.01 -> 4.92 (1.8%)
181.mcf 42, 79.30 -> 75.20 (5.2%)
186.crafty: 484, 29.73 -> 30.04 (-1%)
197.parser: 251, 10.47 -> 10.67 (-1%)
252.eon: 1501, 1.98 -> 1.75 (12%)
253.perlbm: 1183, 14.83 -> 14.42 (2.8%)
254.gap: 825, 7.46 -> 7.29 (2.3%)
255.vortex: 285, 10.51 -> 10.27 (2.3%)
256.bzip2: 63, 55.70 -> 55.20 (0.9%)
300.twolf: 830, 21.63 -> 22.00 (-1%)
PtrDist/ks 14, 32.75 -> 17.53 (46.5%)
Olden/tsp 46, 8.71 -> 8.24 (5.4%)
Free/distray 70, 1.09 -> 0.99 (9.2%)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16629 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-01 19:04:51 +00:00
Chris Lattner
ef0543689f
Pretty print a bit nicer :)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16628 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-01 19:01:39 +00:00
Alkis Evlogimenos
c736b3a37a
Document this class a bit :-)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16626 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-01 00:35:07 +00:00
Chris Lattner
dbea9731b1
Use more efficient map operations. Fix a bug that would affect hypothetical
...
targets that supported multiple memory operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16614 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 16:35:08 +00:00
Chris Lattner
477e4555de
There is no need to call MachineInstr::print directly, just send the MI& to an ostream.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16613 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 16:10:45 +00:00
Chris Lattner
70ca358b7d
* Wrap some comments to 80 cols
...
* Add const_iterator stuff
* Add a print method, which means that I can now call dump() from the
debugger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16612 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 15:59:17 +00:00
Chris Lattner
0fc27ccdd3
Simplify the logic in the simple spiller and capitalize some variables
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16609 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 02:59:33 +00:00
Chris Lattner
5f7d2d45fd
Switch from defaulting to the 'local' spiller to the 'simple' spiller. The
...
two spillers produce perfectly identical code (at least on povray and eon),
but the simple spiller is substantially faster than the local spiller. Once
the local spiller is improved, we can switch back.
Switching cuts 5.2% off of the llc time for povray (about 1.3s).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16608 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 02:40:06 +00:00
Chris Lattner
4ea1b828eb
Don't use a densemap for keeping track of which vregs are already loaded, just
...
use a simple vector. This speeds up -spiller=simple from taking 22s to taking
.1s on povray (debug build). This change does not modify the generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16607 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 02:33:48 +00:00
Chris Lattner
7f690e6258
Use longer and more explicit names for instance vars (particularly important
...
data structures). Fix the print method to send to the right ostream, not
always cerr. Delete typedefs that are only used once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16606 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 02:15:18 +00:00
Chris Lattner
510a3ea646
Free the VirtRegMap at the end of MachineFunction processing instead of at
...
the beginning of processing the next one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16605 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 02:02:33 +00:00
Chris Lattner
8c4d88d369
Reindent code, improve comments, move huge nested methods out of classes,
...
prune #includes, add print/dump methods, etc. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16604 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 01:54:45 +00:00
Alkis Evlogimenos
c72c617a4e
Add includes and use std:: for standard library calls to make code
...
compile on windows. This patch was contributed by Paolo Invernizzi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16539 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-28 14:42:44 +00:00
Alkis Evlogimenos
c4d3b91816
Fix includes. Patch contributed by Paolo Invernizzi!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16533 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-28 02:38:58 +00:00
Alkis Evlogimenos
2c4f7b5faa
Grow the map on entry so that we don't crash if joinIntervals never
...
runs (if coalescing is disabled for example).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16259 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-09 19:24:38 +00:00
Alkis Evlogimenos
5d0d1e350a
Use a DenseMap for mapping reg->reg. This improves the LiveInterval
...
analysis running time from 2.7869secs to 2.5226secs on 176.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16244 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-08 03:01:50 +00:00
Alkis Evlogimenos
76d9dacceb
Indent to 2 spaces and cleanup excess whitespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16188 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-05 18:41:35 +00:00
Alkis Evlogimenos
a63828619f
Indent to 2 spaces.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16187 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-05 18:39:20 +00:00
Misha Brukman
08a6c7614b
Order #includes alphabetically, local .h files first.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16153 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 18:25:53 +00:00
Alkis Evlogimenos
20aa474f8f
Fixes to make LLVM compile with vc7.1.
...
Patch contributed by Paolo Invernizzi!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 18:19:51 +00:00
Alkis Evlogimenos
70619fae28
Change the way we choose a free register: instead of picking the first
...
free allocatable register, we prefer the a free one with the most uses
of inactive intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16148 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-02 21:24:33 +00:00
Alkis Evlogimenos
84f5bcb013
Change the way we choose a free register: instead of picking the first
...
free allocatable register, we prefer the a free one with the most uses
of inactive intervals. This causes less spills and performes a bit
better compared to gcc:
Program | GCC/LLC (Before)| GCC/LLC (After)
164.gzip/164.gzip | 0.59 | 0.60
175.vpr/175.vpr | 0.57 | 0.58
176.gcc/176.gcc | 0.59 | 0.61
181.mcf/181.mcf | 0.94 | 0.95
186.crafty/186.crafty | 0.62 | 0.62
197.parser/197.parser | 0.89 | 0.88
252.eon/252.eon | 0.61 | 0.66
253.perlbmk/253.perlbmk | 0.79 | 0.84
254.gap/254.gap | 0.81 | 0.81
255.vortex/255.vortex | 0.92 | 0.93
256.bzip2/256.bzip2 | 0.69 | 0.69
300.twolf/300.twolf | 0.91 | 0.90
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16147 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-02 21:23:32 +00:00
Alkis Evlogimenos
82b4955f96
We don't need to sort the added vector as unhandled intervals are
...
stored in a binary heap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16143 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-02 18:00:38 +00:00
Reid Spencer
551ccae044
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Alkis Evlogimenos
ed543731fb
Be a bit more efficient when processing the active and inactive
...
lists. Instead of scanning the vector backwards, scan it forward and
swap each element we want to erase. Then at the end erase all removed
intervals at once. This doesn't save much: 0.08s out of 4s when
compiling 176.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:52:29 +00:00
Alkis Evlogimenos
2e58a41089
Give a better assertion if we see a use before a def.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16135 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:34:52 +00:00
Alkis Evlogimenos
d19e2901c1
Minor code clarity changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16123 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-31 17:39:15 +00:00
Nate Begeman
81ab877a0c
Put this change back in after testing from Reid proved its innocence. getSpillSize now returns value in bits
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16102 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 22:00:24 +00:00
Alkis Evlogimenos
81bc6e377e
Remove dead code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16077 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-28 22:43:31 +00:00
Alkis Evlogimenos
ca5d1c378c
Now that LiveIntervals::addIntervalsForSpills is fixed, do not require
...
LiveVariables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16076 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 19:00:29 +00:00
Alkis Evlogimenos
d8d26b3268
Only update LiveVariables if it is available. addIntervalsForSpills
...
runs after the initial run of the live interval analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16075 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 18:59:22 +00:00
Alkis Evlogimenos
ccdf21af1f
Back out this change as it broke the build last night. This should be
...
investicated further as the linearscan variants don't really need
LiveVariables...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16074 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 18:01:21 +00:00
Nate Begeman
bd2efb9600
Back out change to divide getSpillSize by 8 until I figure out why it breaks x86, which has register sizes in bits.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16073 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 16:48:24 +00:00
Alkis Evlogimenos
3f06e68783
The linear scan variants do not require the LiveVariables analysis.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16071 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 04:51:13 +00:00
Nate Begeman
5709998993
Register sizes are in bits, not bytes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16070 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 04:28:10 +00:00
Alkis Evlogimenos
22a2f6d5b0
Use newly added API in MRegisterInfo and don't expose the allocatable
...
register set anymore. Its users now use the MRegisterInfo API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16061 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-26 22:23:32 +00:00
Alkis Evlogimenos
5327801fb8
Use newly added API in MRegisterInfo.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16060 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-26 22:22:38 +00:00
Chris Lattner
d0d0a1a08f
Fix a bug in a previous checkin of mine, correcting
...
Regression.CodeGen.Generic.2004-04-09-SameValueCoalescing.llx and the
code size problem.
This bug prevented us from doing most register coallesces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16031 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 17:48:29 +00:00
Chris Lattner
7af2865fc6
Do not use .xword and friends to emit zeros on V9. Apparently there are issues
...
with emitting .xwords when not on an 8-byte boundary (.xword 0 is not the
same as 8 .byte 0's). Because we do not know when or when we are not aligned,
just emit bytes like the old V9 asmprinter did.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16006 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 00:26:11 +00:00
Chris Lattner
7008034c9f
Register info alignment is in bits, frame object alignment is (currently) in
...
bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15970 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 20:04:59 +00:00
Chris Lattner
fa1face30a
Now that we have per-register spill size/alignment info, remove more uses
...
of getRegClass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15967 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 19:45:10 +00:00
Brian Gaeke
418379e229
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15906 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-18 20:04:24 +00:00
Brian Gaeke
e058b27faf
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
...
Also, squash a use of TargetInstrInfo::isNop().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15905 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-18 20:04:21 +00:00
Chris Lattner
f746a7d09b
Rename var
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15897 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-18 02:22:55 +00:00
Chris Lattner
7d057a3fd5
Add support for targets without a .zero directive
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 21:38:40 +00:00
Chris Lattner
bfddc2030a
Add support for alignment
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15888 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 19:14:29 +00:00
Chris Lattner
0554fb6b9c
Use a designated comment character when printing comments.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15880 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 16:27:05 +00:00
Chris Lattner
e85a5a9f40
Add support for targets that have .quad, drop extra tab inserted
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15870 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:48:16 +00:00
Chris Lattner
1b7e2356ac
Implement emitGlobalConstant
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15868 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:36:49 +00:00
Chris Lattner
af2bf0ab30
We now allow targets to use any prefix they want for global symbols. Lets
...
hear it for ".".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15863 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:06:19 +00:00
Chris Lattner
ed1ff01639
Some asmwriters want an _ prefix
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15845 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 02:28:26 +00:00
Chris Lattner
a80ba71efe
Initial implementation of the asmprinter base class
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15838 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 23:15:22 +00:00
Chris Lattner
ad8281607f
Move this code to lib/Target/SparcV9/MachineFunctionInfo.cpp
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15834 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 22:36:34 +00:00
Chris Lattner
e7f372703a
This file is moving to lib/Target/SparcV9
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15833 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 22:36:10 +00:00
Chris Lattner
85015a0891
Move MachineCodeForInstruction.h and MachineFunctionInfo.h into lib/Target/SparcV9
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15830 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 21:55:02 +00:00
Chris Lattner
753c16c9cb
Nuke this file
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15829 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 21:36:40 +00:00
Chris Lattner
e97db86e17
Fold MachineInstrAnnot.cpp into this file
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15828 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 21:36:31 +00:00
Brian Gaeke
e6c3dc88ca
Add a note that people shouldn't use MachineFunctionInfo.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15823 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 18:27:24 +00:00
Chris Lattner
3bba026994
Reduce usage of MRegisterInfo::getRegClass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15784 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:23:09 +00:00
Chris Lattner
078fee3f2e
The insertion method returns void now
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15779 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:14:31 +00:00
Chris Lattner
3cc03be51a
Nuke ifdef'd out code
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15777 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:03:57 +00:00
Chris Lattner
26eb14ba51
Stop using CreateStackObject(RegClass*)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15775 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:02:22 +00:00
Chris Lattner
57f1b67c34
These methods no longer take a TargetRegisterClass* operand.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15774 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 21:56:44 +00:00
Alkis Evlogimenos
8c9b4de574
Make this compile on gc 3.4.1 (static_cast to non-const type was not
...
allowed).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15766 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 09:18:55 +00:00
Nate Begeman
5de0f7aa14
Elminiate MachineFunction& argument from eliminateFrameIndex
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15736 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-14 22:00:10 +00:00
Chris Lattner
c330b68fb7
Split saveCallerSavedRegisters into two methods for clarity, and add comments.
...
Add support for targets that must spill certain physregs at certain locations.
Patch contributed by Nate Begeman, slightly hacked by me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15701 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-12 19:01:14 +00:00
Chris Lattner
4f65fb38c6
Forward substitute some constants into their users
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15693 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-12 18:10:18 +00:00
Chris Lattner
3927af8d70
The only target that uses this code (v9) always has argsOnStackHaveFixedSize
...
set to true (obviously)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15692 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-12 18:06:35 +00:00
Reid Spencer
b814e2d1c0
Get rid of a warning when compiling optimized. Uninitialized variable has
...
been initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15565 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-07 15:19:31 +00:00
Chris Lattner
ecf8afdc20
Ok get rid of the REST of the tabs
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15564 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-07 07:18:41 +00:00
Chris Lattner
d555da52f4
Death to tabs
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15563 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-07 07:07:57 +00:00
Alkis Evlogimenos
706515727c
Clean up whitespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15490 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 09:46:56 +00:00
Alkis Evlogimenos
1a8ea01f01
Convert indentation to 2 spaces.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15489 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 09:46:26 +00:00
Brian Gaeke
57195d1321
Include SparcV9TmpInstr.h to pick up the def. of TmpInstruction,
...
instead of InstrSelection.h, which is dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15476 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 07:34:57 +00:00
Brian Gaeke
f7d4efb3ed
Tighten up some whitespace. Include SparcV9TmpInstr.h to pick up
...
the def. of TmpInstruction, instead of InstrSelection.h, which is
dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15475 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 07:34:44 +00:00
Chris Lattner
46c2b3a5ec
Squelch warnings in release mode
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15460 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 03:51:55 +00:00
Misha Brukman
6a90f8202b
Add #include <cstdlib> and abort() to silence a warning
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15413 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-02 14:02:21 +00:00
Misha Brukman
82fd8d8cdd
* ceil() requires #include <cmath> for compilation
...
* Alphabetize #includes
* Fix some lines to fit within 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15412 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-02 13:59:10 +00:00
Tanya Lattner
e0b531cc40
Adding ModuloScheduling so that it compiles for everyone.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15408 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-01 19:00:17 +00:00
Chris Lattner
4ae131e5da
Dereferencing end() is bad.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15402 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-01 09:51:42 +00:00
Alkis Evlogimenos
f978a1db51
Make OptimizeBlock take a MachineFunction::iterator instead of a
...
MachineBasicBlock* as a parameter so that nxext() and prior() helper
functions can work naturally on it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15376 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 19:24:41 +00:00
Chris Lattner
7f74340733
Next on a pointer increments the pointer, not an iterator
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15375 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 18:40:36 +00:00
Alkis Evlogimenos
9fd332392c
Use next() helper to make code more readable. Use
...
MachineFunction::iterator instead of MachineBasicBlock* to avoid
dereferencing end iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15373 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 15:14:29 +00:00
Alkis Evlogimenos
dd04583781
Use MachineFunction::iterator instead of a MachineBasicBlock* because
...
FallThrough maybe == to MF.end().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15372 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 15:03:52 +00:00
Chris Lattner
21ab22e475
Implement a simple target-independent CFG cleanup pass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15368 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 10:01:27 +00:00
Tanya Lattner
0a88d2d8b9
Updated ModuloScheduling. It makes it all the wya through register allocation on the new code!!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15351 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-30 23:36:10 +00:00
Brian Gaeke
365f54c7bc
Convert a few assertions with side-effects into regular old runtime checks.
...
These side-effects seem to make a difference when using llc -march=sparcv9
in Release mode (i.e., with -DNDEBUG); when they are left out, lots of
instructions just get dropped on the floor, because they never end up
in the schedule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15339 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 21:31:20 +00:00
Misha Brukman
47b14a4a6a
Fix #includes of i*.h => Instructions.h as per PR403.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15334 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 17:30:56 +00:00
Chris Lattner
879313ae3a
Fix #includes of i*.h => Instructions.h as per PR403:
...
http://llvm.cs.uiuc.edu/PR403 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15333 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 17:23:00 +00:00
Chris Lattner
9670eecf33
Fix #includes of i*.h => Instructions.h as per PR403:
...
http://llvm.cs.uiuc.edu/PR403 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15331 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 17:11:37 +00:00
Brian Gaeke
b2f30a3792
TargetInstrInfo::hasOperandInterlock() is always true, because it is
...
never overridden by any target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15308 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-28 19:24:48 +00:00
Alkis Evlogimenos
5a0a1c2cba
Add some comments to the backtracking code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15200 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 08:10:33 +00:00
Chris Lattner
c25b55a5b2
Fix the sense of joinable
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15196 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 07:47:25 +00:00
Chris Lattner
f542649f1b
This patch makes use of the infrastructure implemented before to safely and
...
aggressively coallesce live ranges even if they overlap. Consider this LLVM
code for example:
int %test(int %X) {
%Y = mul int %X, 1 ;; Codegens to Y = X
%Z = add int %X, %Y
ret int %Z
}
The mul is just there to get a copy into the code stream. This produces
this machine code:
(0x869e5a8, LLVM BB @0x869b9a0):
%reg1024 = mov <fi#-2>, 1, %NOREG, 0 ;; "X"
%reg1025 = mov %reg1024 ;; "Y" (subsumed by X)
%reg1026 = add %reg1024, %reg1025
%EAX = mov %reg1026
ret
Note that the life times of reg1024 and reg1025 overlap, even though they
contain the same value. This results in this machine code:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
add %EAX, %ECX
ret
Another, worse case involves loops and PHI nodes. Consider this trivial loop:
testcase:
int %test2(int %X) {
entry:
br label %Loop
Loop:
%Y = phi int [%X, %entry], [%Z, %Loop]
%Z = add int %Y, 1
%cond = seteq int %Z, 100
br bool %cond, label %Out, label %Loop
Out:
ret int %Z
}
Because of interactions between the PHI elimination pass and the register
allocator, this got compiled to this code:
test2:
mov %ECX, DWORD PTR [%ESP + 4]
.LBBtest2_1:
*** mov %EAX, %ECX
inc %EAX
cmp %EAX, 100
*** mov %ECX, %EAX
jne .LBBtest2_1
ret
Or on powerpc, this code:
_test2:
mflr r0
stw r0, 8(r1)
stwu r1, -60(r1)
.LBB_test2_1:
addi r2, r3, 1
cmpwi cr0, r2, 100
*** or r3, r2, r2
bne cr0, .LBB_test2_1
*** or r3, r2, r2
lwz r0, 68(r1)
mtlr r0
addi r1, r1, 60
blr 0
With this improvement in place, we now generate this code for these two
testcases, which is what we want:
test:
mov %EAX, DWORD PTR [%ESP + 4]
add %EAX, %EAX
ret
test2:
mov %EAX, DWORD PTR [%ESP + 4]
.LBBtest2_1:
inc %EAX
cmp %EAX, 100
jne .LBBtest2_1 # Loop
ret
Or on PPC:
_test2:
mflr r0
stw r0, 8(r1)
stwu r1, -60(r1)
.LBB_test2_1:
addi r3, r3, 1
cmpwi cr0, r3, 100
bne cr0, .LBB_test2_1
lwz r0, 68(r1)
mtlr r0
addi r1, r1, 60
blr 0
Static numbers for spill code loads/stores/reg-reg copies (smaller is better):
em3d: before: 47/25/26 after: 44/22/24
164.gzip: before: 433/245/310 after: 403/231/278
175.vpr: before: 3721/2189/1581 after: 4144/2081/1423
176.gcc: before: 26195/8866/9235 after: 25942/8082/8275
186.crafty: before: 4295/2587/3079 after: 4119/2519/2916
252.eon: before: 12754/7585/5803 after: 12508/7425/5643
256.bzip2: before: 463/226/315 after: 482:241/309
Runtime perf number samples on X86:
gzip: before: 41.09 after: 39.86
bzip2: runtime: before: 56.71s after: 57.07s
gcc: before: 6.16 after: 6.12
eon: before: 2.03s after: 2.00s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15194 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 07:11:19 +00:00
Chris Lattner
d3a205eab5
Make a method const, no functionality changes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15193 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 06:23:01 +00:00
Chris Lattner
62d4e16a05
Fix a bug where we incorrectly value numbered the first PHI definition the
...
same as the PHI use. This is not correct as the PHI use value is different
depending on which branch is taken. This fixes espresso with aggressive
coallescing, and perhaps others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15189 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 05:45:18 +00:00
Chris Lattner
6925a9f9cc
Fix a bug in the range remover
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15188 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 05:43:53 +00:00
Chris Lattner
c83e40d1b6
Add debugging output for joining assignments
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15187 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 03:24:11 +00:00
Alkis Evlogimenos
3f86193cd2
Remove implementation of operator= and make it private so that it is
...
not used accidentally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15172 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 18:55:15 +00:00
Alkis Evlogimenos
a1613db62f
Change std::map<unsigned, LiveInterval*> into a std::map<unsigned,
...
LiveInterval>. This saves some space and removes the pointer
indirection caused by following the pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15167 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 11:44:15 +00:00
Chris Lattner
060913cce4
whoops, didn't mean to remove this
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15157 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 04:32:22 +00:00
Chris Lattner
deb9971061
In the joiner, merge the small interval into the large interval. This restores
...
us back to taking about 10.5s on gcc, instead of taking 15.6s! The net result
is that my big patches have hand no significant effect on compile time or code
quality. heh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15156 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 03:41:50 +00:00
Chris Lattner
4df98e546d
Completely eliminate the intervals_ list. instead, the r2iMap_ maintains
...
ownership of the intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 03:32:06 +00:00
Chris Lattner
7ac2d3146a
Big change to compute logical value numbers for each LiveRange added to an
...
Interval. This generalizes the isDefinedOnce mechanism that we used before
to help us coallesce ranges that overlap. As part of this, every logical
range with a different value is assigned a different number in the interval.
For example, for code that looks like this:
0 X = ...
4 X += ...
...
N = X
We now generate a live interval that contains two ranges: [2,6:0),[6,?:1)
reflecting the fact that there are two different values in the range at
different positions in the code.
Currently we are not using this information at all, so this just slows down
liveintervals. In the future, this will change.
Note that this change also substantially refactors the joinIntervalsInMachineBB
method to merge the cases for virt-virt and phys-virt joining into a single
case, adds comments, and makes the code a bit easier to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15154 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 02:59:07 +00:00
Chris Lattner
0f4c076140
Add a new differingRegisterClasses method
...
make overlapsAliases take pointers instead of references
fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15153 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 02:53:43 +00:00
Chris Lattner
abf295fc6c
Little stuff:
...
* Fix comment typeo
* add dump() methods
* add a few new methods like getLiveRangeContaining, removeRange & joinable
(which is currently the same as overlaps)
* Remove the unused operator==
Bigger change:
* In LiveInterval, instead of using a boolean isDefinedOnce to keep track of
if there are > 1 definitions in a particular interval, keep a counter,
NumValues to keep track of exactly how many there are.
* In LiveRange, add a new ValId element to indicate which of the numbered
values each LiveRange belongs to. We now no longer merge LiveRanges if
they are of differing value ID's even if they are neighbors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 02:52:23 +00:00
Chris Lattner
f35fef7060
More minor changes:
...
* Inline some functions
* Eliminate some comparisons from the release build
This is good for another .3 on gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15144 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 21:24:19 +00:00
Chris Lattner
b26c215c05
Change addRange and join to be a little bit smarter. In particular, we don't
...
want to insert a new range into the middle of the vector, then delete ranges
one at a time next to the inserted one as they are merged.
Instead, if the inserted interval overlaps, just start merging. The only time
we insert into the middle of the vector is when we don't overlap at all. Also
delete blocks of live ranges if we overlap with many of them.
This patch speeds up joining by .7 seconds on a large testcase, but more
importantly gets all of the range adding code into addRangeFrom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15141 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 19:38:44 +00:00
Chris Lattner
aa14147cd6
Search by the start point, not by the whole interval. This saves some
...
comparisons, reducing linscan by another .1 seconds :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15139 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 18:40:00 +00:00
Chris Lattner
e6ad392802
New helper method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15138 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 18:39:12 +00:00
Chris Lattner
4dc54ae0d9
Speedup debug builds a bit
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 18:38:52 +00:00
Chris Lattner
ebd7e6c54d
Instead of searching for a live interval pair, search for a location. This gives
...
a very modest speedup of .3 seconds compiling 176.gcc (out of 20s).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 18:13:24 +00:00
Chris Lattner
a3b8b5c0e0
Rename LiveIntervals.(cpp|h) -> LiveIntervalAnalysis.(cpp|h)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15135 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 17:56:30 +00:00
Chris Lattner
fb449b9ea5
Pull the LiveRange and LiveInterval classes out of LiveIntervals.h (which
...
will soon be renamed) into their own file. The new file should not emit
DEBUG output or have other side effects. The LiveInterval class also now
doesn't know whether its working on registers or some other thing.
In the future we will want to use the LiveInterval class and friends to do
stack packing. In addition to a code simplification, this will allow us to
do it more easily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15134 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 17:49:16 +00:00
Chris Lattner
ec2bc64505
Improve comments a bit
...
Use an explicit LiveRange class to represent ranges instead of an std::pair.
This is a minor cleanup, but is really intended to make a future patch simpler
and less invasive.
Alkis, could you please take a look at LiveInterval::liveAt? I suspect that
you can add an operator<(unsigned) to LiveRange, allowing us to speed up the
upper_bound call by quite a bit (this would also apply to other callers of
upper/lower_bound). I would do it myself, but I still don't understand that
crazy liveAt function, despite the comment. :)
Basically I would like to see this:
LiveRange dummy(index, index+1);
Ranges::const_iterator r = std::upper_bound(ranges.begin(),
ranges.end(),
dummy);
Turn into:
Ranges::const_iterator r = std::upper_bound(ranges.begin(),
ranges.end(),
index);
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15130 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 08:24:23 +00:00
Chris Lattner
94881e8c45
Update live intervals more accurately for PHI elim. This slightly reduces
...
the live intervals for some registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15125 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 05:27:43 +00:00
Chris Lattner
fe1630b43e
Force coallescing of live ranges that have a single definition, even if they
...
interfere. Because these intervals have a single definition, and one of them
is a copy instruction, they are always safe to merge even if their lifetimes
interfere. This slightly reduces the amount of spill code, for example on
252.eon, from:
12837 spiller - Number of loads added
7604 spiller - Number of stores added
5842 spiller - Number of register spills
18155 liveintervals - Number of identity moves eliminated after coalescing
to:
12754 spiller - Number of loads added
7585 spiller - Number of stores added
5803 spiller - Number of register spills
18262 liveintervals - Number of identity moves eliminated after coalescing
The much much bigger win would be to merge intervals with multiple definitions
(aka phi nodes) but this is not that day.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15124 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 05:26:05 +00:00
Chris Lattner
a7bfbba856
costmetic changes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15118 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 23:05:12 +00:00
Chris Lattner
e8850f476e
Fix broken -debug printing
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15115 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 21:54:22 +00:00
Chris Lattner
4951d48a16
The default has not been 'simple' for AGES!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15114 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 21:46:02 +00:00
Chris Lattner
0bafa9818b
Make linear scan the default
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15111 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 18:42:00 +00:00
Alkis Evlogimenos
77c4c4da24
Put variable name to a separate line.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15108 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 15:30:33 +00:00
Misha Brukman
75fa4e4f99
Fix indentation and wrap code at 80 cols
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15107 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 15:26:23 +00:00
Alkis Evlogimenos
d3014edc51
Sorting is now handled by both linearscan and iterative scan so live
...
intervals need not be sorted anymore. Removing this redundant step
improves LiveIntervals running time by 5% on 176.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15106 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 15:18:10 +00:00
Alkis Evlogimenos
82c24fba8a
Fit to 80 columns.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15105 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 14:29:31 +00:00
Alkis Evlogimenos
53eb37340c
Some compile time improvements resulting in a 1sec speedup in the 5sec
...
compilation of gcc:
* Use vectors instead of lists for the intervals sets
* Use a heap for the unhandled set to keep intervals always sorted and
makes insertions back to the heap very fast (compared to scanning a
list)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15103 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 08:14:44 +00:00
Chris Lattner
199edde707
Remove extraneous punctuation
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15098 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 05:51:56 +00:00
Alkis Evlogimenos
10e169b038
Use reverse iterators when updating the vector, since scanning from
...
the end will reduce erase() runtimes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15093 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 02:16:53 +00:00
Chris Lattner
6beef3e1a0
That funny 2-address lowering pass can also cause multiple definitions,
...
fortunately, they are easy to handle if we know about them. This patch fixes
some serious pessimization of code produced by the linscan register allocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15092 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 00:04:14 +00:00
Chris Lattner
1e31363a9e
Minor cleanups
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15091 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 23:17:57 +00:00
Brian Gaeke
7848e68c16
These files don't need to include <iostream> since they include "Support/Debug.h".
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15089 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 20:50:33 +00:00
Alkis Evlogimenos
d03451ef47
Fix analysis name.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15078 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 17:23:44 +00:00
Alkis Evlogimenos
fc29e63afe
Clear spilled list at once. Remove unused vector.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15073 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 12:00:10 +00:00
Alkis Evlogimenos
2d54705c4b
Change std::list into a std::vector for IntervalSets. This reduces
...
compile time for 176.gcc from 5.6 secs to 4.7 secs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15072 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 09:46:55 +00:00
Alkis Evlogimenos
3b1af0b3fc
Improve file comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15069 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 08:28:39 +00:00
Alkis Evlogimenos
910d0d6066
Add Iterative scan register allocator.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15068 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 08:24:35 +00:00
Alkis Evlogimenos
c8dec2c23e
Linearscan is no longer experimental.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15067 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 08:18:50 +00:00
Alkis Evlogimenos
a39fc0efcf
Add function to clear all virtual->physical mappings but not assigned
...
stack slots. This is in preparation for the iterative linear scan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15032 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-20 13:28:17 +00:00
Alkis Evlogimenos
6bd23c0832
Remove unneeded functor. LiveInterval has a < operator.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15031 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-20 10:20:03 +00:00
Alkis Evlogimenos
da77c44c2c
Remove dead code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15011 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 23:35:55 +00:00
Chris Lattner
8640f4e666
Fix a bug that occurs when the last instruction in a range is dead
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15005 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 15:16:53 +00:00
Chris Lattner
cc0d156f7b
When joining intervals, join intervals in deeply nested loops first. This
...
is a simple change, but seems to improve code a little. For example, on
256.bzip2, we went from 75.0s -> 73.33s (2% speedup).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15004 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 14:40:29 +00:00
Chris Lattner
1c5c0444f1
Split joinIntervals into two methods
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15003 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 14:08:10 +00:00
Chris Lattner
74de8b1b26
There is no need to store the MBB along with the MI any more, we can now
...
ask instructions for their parent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14998 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 07:04:55 +00:00
Chris Lattner
472405e0dc
Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14997 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 06:55:21 +00:00
Chris Lattner
73d4adfb1e
Remove the DefBlock element of VarInfo. DefBlock is always DefInst->getParent()
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14996 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 06:26:50 +00:00
Chris Lattner
8ea13c6233
Two changes, both very significant:
...
* vreg <-> vreg joining now works, enable it unconditionally when joining
is enabled (which is the default).
* Fix a serious pessimization of spill code where we were saying that a
spilled DEF operand was live into the subsequent instruction. This allows
for substantially better code when spilling starts to happen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14993 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 05:55:50 +00:00
Chris Lattner
57eb15e316
See comments. The live intervals were not coming out of the spiller in sorted
...
order, causing the inactive list in the linearscan list to get unsorted, which
basically fuxored everything up severely.
These seems to fix the joiner, so with more testing I will enable it by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14992 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 05:15:10 +00:00
Chris Lattner
331cb7dde1
Fix assertion to not dereference end!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14991 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 05:02:09 +00:00
Chris Lattner
59073e02cc
Add some asserts that the list of intervals returned by addIntervalsForSpills
...
is sorted. This is not the case currently, which is causing no end of
problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14990 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 04:47:36 +00:00
Chris Lattner
6097d13b2a
remove the mbbi2mbbMap_, which was just keeping track of mbb order anyway.
...
Heavily refactor handleVirtualRegisterDef, adding comments and making it more
efficient. It is also much easier to follow and convince ones self that it is
correct :)
Add -debug output to the joine, showing the result of joining the intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14989 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 02:15:56 +00:00
Chris Lattner
6b92906010
fill comment to 80 cols
...
remove map that is not needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14988 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 02:13:59 +00:00
Chris Lattner
e1b9536d54
It looks like physref->virtreg joining is working fine. Enable it by default
...
but make virtreg->virtreg joining stay off by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14916 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 21:51:25 +00:00
Chris Lattner
b8edf61fa9
Fix IA64 compatibility
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14866 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 00:06:01 +00:00
Chris Lattner
23f9ef062a
Use new macro
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14865 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 00:04:54 +00:00
Chris Lattner
f51c7f56ca
Fix for PR341
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14845 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:40:04 +00:00
Chris Lattner
9fb6cf1d82
Add checks to ensure that there are no unreachable blocks in the function
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14725 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 16:44:37 +00:00
Misha Brukman
ce22e76996
* Doxygenify comments
...
* Fix spacing, grammar in comment
* Make code layout consistent
* Wrap code at 80 cols
* Delete spurious blank lines
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14721 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 14:45:17 +00:00
Alkis Evlogimenos
80b27ced2d
Fix typo.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14720 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 11:25:27 +00:00
Alkis Evlogimenos
607baea7d2
Improve code comments.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14719 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 11:10:00 +00:00
Alkis Evlogimenos
71bf404e9b
Add viewCFG() and viewCFGOnly() APIs.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14679 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 00:47:58 +00:00
Alkis Evlogimenos
3877652e68
Disable coalescing.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14655 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 02:03:12 +00:00
Alkis Evlogimenos
5de868b0b2
Do not crash when joining two intervals of registers of different
...
classes: just ignore that move. Thanks to Vladimir Prus who found the
bug!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14644 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-06 16:03:21 +00:00
Chris Lattner
7f0566c123
Fix a bug in the unreachable block elim pass. Dropping all references on a
...
basic block clear()'s all of the operands lists, including phis. This
caused removePredecessor to get confused later. Because of this, we just
nuke (without prejudice) PHI nodes in unreachable blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14635 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-06 06:36:11 +00:00
Alkis Evlogimenos
c156095b17
Correctly compute the ration of iterations/#intervals.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14626 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 17:23:35 +00:00
Reid Spencer
954da37bb4
Add #include <iostream> since Value.h does not #include it any more.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14622 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 12:19:56 +00:00
Alkis Evlogimenos
d55b2b1067
Add efficiency statistic.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14590 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 07:59:06 +00:00
Chris Lattner
230b4fb8a0
Revert patches 1.79 and 1.80 which had to do with dead MBB's. Now that they
...
don't exist, we don't have to pretend to handle them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14567 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:52:23 +00:00
Chris Lattner
fc3c82a804
Add a trivially simple pass to delete unreachable blocks from the CFG. This
...
pass is required to paper over problems in the code generator (primarily
live variables and its clients) which doesn't really have any well defined
semantics for unreachable code.
The proper solution to this problem is to have instruction selectors not
select blocks that are unreachable. Until we have a instruction selection
framework available for use, however, we can't expect all instruction
selector writers to do this. Until then, this pass should be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14563 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:46:10 +00:00
Chris Lattner
4b9a400674
Make sure that we destroy the MBB's, with all of their instructions, before
...
any other data structures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14524 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 06:29:07 +00:00
Chris Lattner
8490f9c92e
Now that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'s
...
use them instead of a local LiveVariables numbering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14523 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 06:15:32 +00:00
Chris Lattner
ca48eb9f51
Change MBB autonumber a bit to get the reverse mapping as well as a forward
...
mapping
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14521 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 06:02:27 +00:00
Chris Lattner
51289aa520
Instance var no longer exists
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14520 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 06:02:07 +00:00
Chris Lattner
8ba9771549
Start using MBB numbers directly instead of going through the live variables
...
map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14518 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 04:29:47 +00:00
Chris Lattner
a5287a6376
Instead of building a private numbering of MBB's use brg's nifty auto-numbering.
...
Also convert df_iterator -> df_ext_iterator for subsequent stuff I'm doing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14517 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 04:24:29 +00:00
Chris Lattner
91a350ddd1
In line with the previous patch, do not assert out if analyzing a dead basic block.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14475 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 07:16:23 +00:00
Chris Lattner
59850a8f8f
Do not dereference end iterators. It hurts when you do that.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14474 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 06:56:51 +00:00
Chris Lattner
4e7244e68e
Do not find these ugly sparc-specific objects by using the annotation API on
...
instructions. Instead, keep a map of instructions -> MCFI objects in the
already sparc-specific class MachineFunctionInfo. This will slow down the
sparc backend a bit, but it does not penalize the rest of LLVM!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14438 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:52:17 +00:00
Tanya Lattner
b140762a45
Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14389 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 00:13:11 +00:00
Misha Brukman
09ba906cf5
Convert tabs to spaces.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14373 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 21:31:16 +00:00
Misha Brukman
cc6543cb51
Making an archive version of the CodeGen library is unnecessary if we just
...
move InstructionLowering itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14324 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-22 17:52:30 +00:00
Misha Brukman
68fd0cae52
Provide archive version of CodeGen library (for those tools that only need
...
IntrinsicLowering, for instance).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14323 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-22 17:28:43 +00:00
Chris Lattner
418da55c89
Rename Interval class to LiveInterval to avoid conflicting with the already
...
existing llvm::Interval class.
Patch contributed by Vladimir Prus!
http://mail.cs.uiuc.edu/pipermail/llvmbugs/2004-June/000710.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-21 13:10:56 +00:00
Chris Lattner
3048373748
Move the IntrinsicLowering header into the CodeGen directory, as per PR346
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14266 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-20 07:49:54 +00:00
Brian Gaeke
988b7ba5ba
Make debugging dumps w/ multiple MachineBBs for a given LLVM BB readable.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14205 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 22:26:53 +00:00
Chris Lattner
f70c22b019
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 18:19:28 +00:00
Chris Lattner
aebcce8404
Fix a recent regression in Applications/sgefa that Alkis pointed out to me.
...
The vector may actually be empty if the register that we are marking as
recently used is not actually allocatable. This happens for physical registers
that are not allocatable, like the ST(x) registers on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14195 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-16 06:57:29 +00:00
Chris Lattner
be78ac4422
Remove isnan support, correct isunordered support
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14187 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:42:23 +00:00
Alkis Evlogimenos
9685372062
Add the isunordered intrinsic.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-12 19:19:14 +00:00
Chris Lattner
7f7bbc2fdb
Fix fallout from getOffsetOfLocalArea() being negated. Debugging dumps were being
...
printed incorrectly, and we were reserving 8 extra bytes of stack space for functions
on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 06:37:11 +00:00
Chris Lattner
02348caffc
Fix lowering to work correctly
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14134 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 02:54:02 +00:00
Chris Lattner
137cc4fc8c
I misled Alkis: LLVM should have isnan, not isunordered.
...
isunordered(X, Y) === isnan(X) | isnan(Y)
Remove isunordered, add isnan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14132 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 02:29:43 +00:00
Alkis Evlogimenos
f616f22e81
Add the isunordered intrinsic.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14127 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 01:08:18 +00:00
Chris Lattner
577aec1428
Fix the prolog epilog code inserter to match the documentation and support
...
targets whose stack grows up.
Patch contributed by Vladimir Prus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14111 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-10 06:23:35 +00:00
Chris Lattner
f0a3e6c21c
Remove an unused variable.
...
Work around for bogus errors: no those static functions don't need to
be executed to be initialized!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14040 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 01:05:19 +00:00
Chris Lattner
6bc24419b6
Oops, this was not to go in
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13958 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 06:06:45 +00:00
Chris Lattner
98107ffd1e
Adjust to the new TargetMachine interface
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13957 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 06:06:20 +00:00
Chris Lattner
9bcdcd17c7
Adjust to new TargetMachine interface
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13956 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 05:57:12 +00:00
Chris Lattner
62d6ad2cee
Inline findOptimalStorageSize into it's caller, both of which are sparc specific
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13955 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 05:56:52 +00:00
Chris Lattner
e25738cab6
Finegrainify namespacification
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13948 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 04:28:06 +00:00
Chris Lattner
fd0f7b1131
Fix a trivial but blatant bug
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13947 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 03:57:43 +00:00
Alkis Evlogimenos
6924063bf2
Pull Interval class out of LiveIntervals.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13910 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-30 07:46:27 +00:00
Alkis Evlogimenos
26f5a69e52
When spilling an register, introduce a new temporary for each of its
...
spills. This allows for more flexibility when allocating registers for
spill code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13907 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-30 07:24:39 +00:00
Brian Gaeke
cdd69e6719
Fix typo in head-of-file comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13903 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-30 03:33:48 +00:00
Alkis Evlogimenos
38af59a43c
Add method to assign stack slot to virtual register without creating a
...
new one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13895 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-29 20:38:05 +00:00
Alkis Evlogimenos
f174cc303b
Add grow() member that grows the maps when the number of virtual
...
registers in the function has changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13893 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-29 19:03:29 +00:00
Alkis Evlogimenos
f717a05698
Remove defs vector from live intervals.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-29 16:18:57 +00:00
Tanya Lattner
20890832ea
updates to ModuloSched
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13881 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 20:14:12 +00:00
Tanya Lattner
ebac64534c
Adding scheduling class.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13783 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 06:27:36 +00:00
Tanya Lattner
4cffb588f5
Updating my cvs versions. THis is still in progress and much will be changed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 06:27:18 +00:00
Tanya Lattner
17fb34bf8c
Moved MachineBasicBlock deconstructor to cpp file and removed it from LeakDetector to fix memory leak bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13718 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 07:14:35 +00:00
Tanya Lattner
792699c46e
Added MachineFunction parent* to MachineBasicBlock. Customized ilist template
...
to set the parent when a MachineBasicBlock is added to a MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13716 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 06:11:51 +00:00
Chris Lattner
5bf3ce2b7c
Eliminate an explicit use of the LLVM basic block, using getParent instead,
...
which simplifies the code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13707 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 03:44:52 +00:00
Tanya Lattner
0c63e03e04
Changed clone to be const.
...
Changed copy constructor to set parent, prev, and next pointers to null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13706 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 03:14:18 +00:00
Tanya Lattner
b5159ed0cb
Fixed up my changes to add support for cloning Machine Instructions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13665 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 20:58:02 +00:00
Tanya Lattner
466b534a57
Adding support to clone MachineInstr
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13661 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 19:35:12 +00:00
Chris Lattner
bee887211b
Fix a really nasty bug from my changes on Monday to PHIElim. These changes
...
broke obsequi and a lot of other things. It all boiled down to MBB being
overloaded in an inner scope and me confusing it with the one in the outer
scope. Ugh!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13517 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:47:57 +00:00
Brian Gaeke
d657c42dce
Start NextMBBNumber out at zero.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13515 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:35:23 +00:00
Brian Gaeke
0bcb1ad7be
Add non-const MachineBasicBlock::getParent() accessor method.
...
MBBs start out as #-1. When a MBB is added to a MachineFunction, it
gets the next available unique MBB number. If it is removed from a
MachineFunction, it goes back to being #-1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13514 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:35:22 +00:00
Chris Lattner
8abf69374e
Switch this from using an std::map to using a DenseMap. This speeds up
...
phi-elimination from 0.6 to 0.54s on kc++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13454 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 19:17:36 +00:00
Chris Lattner
80e20eb487
Use a new VRegPHIUseCount to compute uses of PHI values by other phi values
...
in the basic block being processed. This fixes PhiElimination on kimwitu++
from taking 105s to taking a much more reasonable 0.6s (in a debug build).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13453 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 19:06:37 +00:00
Chris Lattner
791f896d9f
Now that we use an ilist of machine instructions, iterators are more robust
...
than before. Because this is the case, we can compute the first non-phi
instruction once when de-phi'ing a block. This shaves ~4s off of
phielimination of _Z7yyparsev in kimwitu++ from 109s -> 105s. There are
still much more important gains to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13452 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 18:47:18 +00:00
Chris Lattner
6d3848df7e
Patch to fix PR337. Make sure to mark all aliased physical registers as used
...
when we see a read of a register. This is important in cases like:
AL = ...
AH = ...
= AX
The read of AX must make both the AL and AH defs live until the use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13444 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 05:12:43 +00:00
Chris Lattner
0979ca7e3e
Implement the AddPrototypes method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 04:29:57 +00:00
Tanya Lattner
73e3e2e10f
Updating my versions of ModuloScheduling in cvs. Still not complete.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13424 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 16:12:10 +00:00
Alkis Evlogimenos
880e8e4b4c
Add required header
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13417 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 03:50:03 +00:00
Alkis Evlogimenos
feab248c93
Remove unneeded header
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13416 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 03:49:35 +00:00
Chris Lattner
a19eedeb7a
numeric_limits::infinity() apparently does not work on all systems. As a
...
workaround, use the C HUGE_VAL macro instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13377 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 16:25:59 +00:00
Chris Lattner
015959ee38
Operate on the Machine CFG instead of on the LLVM CFG
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13302 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:24:39 +00:00
Chris Lattner
f25fb4bc64
Stop LiveVariables from using BasicBlocks as part of the mapping, instead
...
use MachineBasicBlocks. To do this, we traverse the Machine CFG instead of
the LLVM CFG, which is also *MUCH* more efficient by having fewer levels of
indirections and mappings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13301 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:24:24 +00:00
Brian Gaeke
35450d2aaa
Include SparcV9RegInfo.h instead of TargetRegInfo.h. This serves as a bit of
...
documentation that this module needs to be made independent of the
register file description of the current target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13125 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-23 18:15:46 +00:00
Brian Gaeke
da8246bb71
Implement emitWordAt() for the debug emitter and the file printer emitter. (I
...
am not so sure about the file printer emitter, but the debug emitter change
should be harmless.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13117 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-23 17:11:13 +00:00
Alkis Evlogimenos
6e4d0d6546
Fix bug introduced in previous commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12872 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 20:26:39 +00:00
Alkis Evlogimenos
43b61f724e
Correctly compute spill weights
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12869 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 17:39:20 +00:00
Alkis Evlogimenos
e633352fd5
Print def lists a bit more compactly
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12866 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 15:57:58 +00:00
Alkis Evlogimenos
9a8b490735
Add definition list to each live interval.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12791 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-09 18:07:57 +00:00
Chris Lattner
b4186e0ccd
MBB::remove should not modify the iterator passed in
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12572 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 21:59:59 +00:00
Chris Lattner
4f6410f5cb
MachineBasicBlock::remove should not modify the iterator passed in
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12571 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 21:59:29 +00:00
Alkis Evlogimenos
a8db01ac83
Correctly update LiveVariables when an instruction changes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12561 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-30 22:44:39 +00:00
Brian Gaeke
47b716483e
Change how the beginnings and ends of MachineFunctions are printed. Get
...
rid of the funny cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12537 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-29 21:58:31 +00:00
Alkis Evlogimenos
eee91172fb
Make the set of fixed (preallocated) intervals be a fixed superset of
...
unhandled + handled. So unhandled is now including all fixed intervals
and fixed intervals never changes when processing a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12462 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 00:48:59 +00:00
Chris Lattner
6ae9eb1566
Fix PR294
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12425 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 01:45:55 +00:00
Alkis Evlogimenos
39354c99a1
Change MRegisterInfo::foldMemoryOperand to return the folded
...
instruction to make the API more flexible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12386 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 07:19:51 +00:00
Alkis Evlogimenos
6a367f33f3
Spill explicit physical register defs as well.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12260 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-09 08:35:13 +00:00
Alkis Evlogimenos
5ae00066c6
As I wrote in the docs, simple is the default spiller :-)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12189 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06 23:08:44 +00:00
Alkis Evlogimenos
499b2bad27
Add simple spiller.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12188 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06 22:38:29 +00:00
Brian Gaeke
c54839573c
Make MachineOperand's value named 'contents'. Make really, really sure
...
it is always completely initialized and copied.
Also, fix up many comments and asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12100 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 19:07:27 +00:00
Alkis Evlogimenos
dd420e060a
Add a spiller option to llc. A simple spiller will come soon. When we get CFG in the machine code represenation a global spiller will also be possible. Also document the linear scan register allocator but mark it as experimental for now.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12062 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 23:18:15 +00:00
Alkis Evlogimenos
5f37502bfb
Add the long awaited memory operand folding support for linear scan
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12058 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 20:05:10 +00:00
Brian Gaeke
05b15fb075
TargetCacheInfo has been removed; its only uses were to propagate a constant
...
(16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's
dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in
the interest of not breaking things any more than they already are, I'm going
to leave the constant alone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 06:43:29 +00:00
Tanya Lattner
9b3cbdbedb
Adding new Modulo Scheduling graph files.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12031 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 02:50:57 +00:00
Tanya Lattner
d14b83733e
Removing old graph files with new graph files that I wrote. Updated ModuloScheduling pass, but still in progress.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12030 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 02:50:01 +00:00
Chris Lattner
92bc3bc11c
Add an assert
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12010 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 22:01:51 +00:00
Chris Lattner
c81295ab24
Add back #include I messed up
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12009 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 21:40:53 +00:00
Chris Lattner
e8d43fdced
Urg, forgot to check this in.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12007 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 21:03:08 +00:00
Chris Lattner
08d4963d49
Move the private MachineInstrAnnot.h into a private directory.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12003 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:12:51 +00:00
Chris Lattner
78827e9f8b
Remove use of an ugly header
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12002 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:04:31 +00:00
Chris Lattner
585911ee21
Move methods out of .h file
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12001 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:02:39 +00:00
Chris Lattner
bceb68807f
Eliminate the distinction between "real" and "unreal" instructions
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 06:31:16 +00:00
Chris Lattner
561c0107b2
int64_t -> int
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11977 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 05:07:02 +00:00
Alkis Evlogimenos
fc54e83cea
Rename member function to be consistent with the rest.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11898 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 06:11:15 +00:00
Alkis Evlogimenos
57af2cf6f3
Make spiller push stores right after the definition of a register so
...
that they are as far away from the loads as possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11895 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 04:51:35 +00:00
Alkis Evlogimenos
ddcfd9e6fa
Fix crash caused by passing register 0 to
...
MRegisterInfo::isPhysicalRegister().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 01:52:34 +00:00
Alkis Evlogimenos
8fa16e47f8
Clear maps right after basic block is processed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 23:22:23 +00:00
Alkis Evlogimenos
71e353ed35
Uncomment assertions that register# != 0 on calls to
...
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11882 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 22:00:20 +00:00
Chris Lattner
7b1af15612
No need to clear the map here, it will always be empty
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11868 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 05:21:21 +00:00
Alkis Evlogimenos
e3fcabe068
Fix bugs found with recent addition of assertions in
...
MRegisterInfo::is{Physical,Virtual}Register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11849 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 23:21:52 +00:00
Brian Gaeke
367b91d1bd
Great sparc renaming fallout IV: Sparc --> SparcV9.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11844 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 22:09:36 +00:00
Alkis Evlogimenos
1d8b28a357
Remove asssert since it is breaking cases that it shouldn't.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11841 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 22:01:06 +00:00
Alkis Evlogimenos
4d0d864be3
Add DenseMap template and actually use it for for mapping virtual regs
...
to objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11840 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 21:55:45 +00:00
Chris Lattner
95c34f2efd
Add an assertion
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11830 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 19:37:44 +00:00