diff options
| author | Nate Begeman <natebegeman@mac.com> | 2005-07-28 03:02:05 +0000 |
|---|---|---|
| committer | Nate Begeman <natebegeman@mac.com> | 2005-07-28 03:02:05 +0000 |
| commit | c5b6bd9a8e35d5395e5cfebeacb82ac7261550fb (patch) | |
| tree | 1e9998b872312d73b72d2b56c26ef7bb81c5420f /llvm/lib/System/Program.cpp | |
| parent | 8e3830dae7c988284a5eaa989710dae44aa23127 (diff) | |
| download | bcm5719-llvm-c5b6bd9a8e35d5395e5cfebeacb82ac7261550fb.tar.gz bcm5719-llvm-c5b6bd9a8e35d5395e5cfebeacb82ac7261550fb.zip | |
Fold constant adds into loads and stores to frame indices.
For the following code:
double %ext(int %A.0__, long %A.1__) {
%A_addr = alloca %typedef.DComplex ; <%typedef.DComplex*> [#uses=2]
%tmp.1 = cast %typedef.DComplex* %A_addr to int* ; <int*> [#uses=1]
store int %A.0__, int* %tmp.1
%tmp.2 = getelementptr %typedef.DComplex* %A_addr, int 0, uint 1 ; <double*> [#uses=2]
%tmp.3 = cast double* %tmp.2 to long* ; <long*> [#uses=1]
store long %A.1__, long* %tmp.3
%tmp.5 = load double* %tmp.2 ; <double> [#uses=1]
ret double %tmp.5
}
We now generate:
_ext:
.LBB_ext_0: ;
stw r3, -12(r1)
stw r4, -8(r1)
stw r5, -4(r1)
lfd f1, -8(r1)
blr
Instead of:
_ext:
.LBB_ext_0: ;
stw r3, -12(r1)
addi r2, r1, -12
stw r4, 4(r2)
stw r5, 8(r2)
lfd f1, 4(r2)
blr
This also fires hundreds of times on MultiSource.
llvm-svn: 22533
Diffstat (limited to 'llvm/lib/System/Program.cpp')
0 files changed, 0 insertions, 0 deletions

