[PATCH] D41766: [MachineCombiner] Add check for optimal pattern order.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 5 08:41:31 PST 2018
fhahn created this revision.
fhahn added reviewers: Gerolf, spatel, mssimpso.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.
In https://reviews.llvm.org/D41587, @mssimpso discovered that the order of some patterns for
AArch64 was sub-optimal. I thought a bit about how we could avoid that
case in the future. I do not think there is a need for evaluating all
patterns for now. But this patch adds an extra (expensive) check, that
evaluates the latencies of all patterns, and ensures that the latency
saved decreases for subsequent patterns.
This catches the sub-optimal order fixed in https://reviews.llvm.org/D41587, but I am not
entirely happy with the check, as it only applies to sub-optimal
patterns seen while building with EXPENSIVE_CHECKS on. It did not
discover any other sub-optimal pattern ordering.
Do you think that additional check would be useful?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6790 bytes
Desc: not available
More information about the llvm-commits