[PATCH] D45842: [Reassociate] swap binop operands to increase factoring potential

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 03:52:04 PDT 2018


lebedev.ri added a comment.

One important take-away from https://reviews.llvm.org/D46336#1090588:
The InstCombine and Reassociate need to be run after each another in a loop (what't the correct term, internal pipeline?) until neither of them produces any more changes.

  bool madeChanges = false;
  do {
    madeChanges |= instcombine();
    madeChanges |= reassociate();
  } while(madeChanges);


https://reviews.llvm.org/D45842





More information about the llvm-commits mailing list