[PATCH] Simplify n-ary adds by reassociation

Andrew Trick atrick at apple.com
Mon Apr 13 14:15:31 PDT 2015


Your implementation looks good to me.

I would like at least one other reviewer to sign off on creating a new pass to do this--I'm not sure what the best answer is. There are several places in LLVM where reassociation makes sense. This should probably not happen in the current Reassociate pass because that is really  a canonicalization and it may be better to leave the simple single-use expressions in place for further optimization. We would also like to reassociate in machine code based on registers and critical path, but this is redundancy elimination so doesn't belong there either. So I'm personally ok with a new IR pass that people can experiment with in their pipelines. I would still like to get feedback from others first.


http://reviews.llvm.org/D8950

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






More information about the llvm-commits mailing list