[PATCH] Add straight-line strength reduction to LLVM

Jingyue Wu jingyue at google.com
Mon Feb 2 15:34:48 PST 2015


Hi Andrew,

The code example in my file commentary

  #pragma unroll
  foo (int i = 0; i < 3; ++i) {
    sum += foo((b + i) * s);
  }

pretty much reflects real-world source code. More often, I see `(b + i) * s` used as an array index which creates the same issue.

LSR cannot yet solve the problem I'm facing here due to phase ordering. Loop unrolling, which happens way before LSR, destroys the loop structure. I agree with you that, if the loop is not unrolled, LSR should take care of this pattern.


http://reviews.llvm.org/D7310

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list