mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
add a note about a SPEC hack that gcc mainline does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121849 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
33e77d3cb9
commit
2fc36e19b1
@ -1226,6 +1226,29 @@ loadpre14.c loadpre15.c
|
||||
|
||||
actually a conditional increment: loadpre18.c loadpre19.c
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
[LOAD PRE / STORE SINKING / SPEC HACK]
|
||||
|
||||
This is a chunk of code from 456.hmmer:
|
||||
|
||||
int f(int M, int *mc, int *mpp, int *tpmm, int *ip, int *tpim, int *dpp,
|
||||
int *tpdm, int xmb, int *bp, int *ms) {
|
||||
int k, sc;
|
||||
for (k = 1; k <= M; k++) {
|
||||
mc[k] = mpp[k-1] + tpmm[k-1];
|
||||
if ((sc = ip[k-1] + tpim[k-1]) > mc[k]) mc[k] = sc;
|
||||
if ((sc = dpp[k-1] + tpdm[k-1]) > mc[k]) mc[k] = sc;
|
||||
if ((sc = xmb + bp[k]) > mc[k]) mc[k] = sc;
|
||||
mc[k] += ms[k];
|
||||
}
|
||||
}
|
||||
|
||||
It is very profitable for this benchmark to turn the conditional stores to mc[k]
|
||||
into a conditional move (select instr in IR) and allow the final store to do the
|
||||
store. See GCC PR27313 for more details. Note that this is valid to xform even
|
||||
with the new C++ memory model, since mc[k] is previously loaded and later
|
||||
stored.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user