[LLVMdev] Predictive Commoning / Scalar Replacement

Krzysztof Parzyszek kparzysz at codeaurora.org
Sat Dec 1 17:36:53 PST 2012

On 12/1/2012 7:10 PM, Nick Lewycky wrote:
> I don't know of any, but I was wondering if you could point me to the
> paper that describes predictive commoning? I could only find the
> second-order predictive commoning paper, which if I understand correctly
> is a much newer and different algorithm.

I think the original paper was some internal IBM publication.

The idea is basically to reuse values loaded in previous loop iterations.

For example
   for (i) {
     x += 2*t[i-1] - t[i+1];
would become
   for (i) {
     tm1 = tz;     // t-minus-1 = t-zero
     tz  = tp1;    // t-zero    = t-plus-1
     tp1 = t[i+1]; // t-plus-1  = load
     x += 2*tm1 - tp1;


Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation

More information about the llvm-dev mailing list