My experience is also exactly like this. We keep adding new patterns to inst-combine, but nothing has been done yet to modularize or somehow partition it to reduce the costs we need to pay for these new patterns. Inst-combine is scheduled to run 8 times in the current O2/Os pipelines and 9 times in O3. In most applications the new patterns will probably never even trigger, but we will check for them at least 8 times. It’s more or less acceptable for O3, where we’re supposed to try squeezing as much optimizations as possible, but for O2 and Os it doesn’t sound reasonable to me.
Recently AggressiveInstCombine pass has been added and probably some of the patterns might go there to slightly reduce the costs, but a bigger rethink might be needed in this area anyway. I’d be glad to help doing this if we agree on a general direction we want to go.
LLVM Developers mailing list
|Free forum by Nabble||Edit this page|