[PATCH] D107226: [WIP][InstCombine] Enhance the sinking to handle multiple uses

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 31 10:20:47 PDT 2021


lebedev.ri added a comment.

Thanks for trying, but yikes.
Like i expected, this has a pretty interesting effect on the compile time:
https://llvm-compile-time-tracker.com/compare.php?from=ad28ff71647503c0a93f8b23a04844484f26f52b&to=c159423d2c3146b4c00fd00bd0d64ce802a74e03&stat=instructions

While i do expect this could be improved somewhat (1. pass instruction's current BB into `findCommonDominator()` and stop looping once `CommonDom` becomes that 2. ???),
i do think it's unresolvable in general, because why do we even perform this sinking in instcombine in the first place, does it allow some further instcombine folds?
We'll re-perform the same sinking each time we visit each instruction, that's a lot. If we'd just did it once, it would basically compile-time free.
Just thinking out loud.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107226/new/

https://reviews.llvm.org/D107226



More information about the llvm-commits mailing list