I'm posting this to get any early feedback. Please let me know if this make sense.
TODO: tests should be added.
Differential D19682
[LSR] Skip transformation if the cost of no LSR is cheaper than the best solution selected junbuml on Apr 28 2016, 12:55 PM. Authored by
Details
Diff Detail Event TimelineComment Actions With this change, I observed %2 performance improvement in spec2006/astar. This is a pretty simple try. Please let me know any feedback. Comment Actions Hi Jun, Instead of having a new method, can’t we consider this solution as part of the normal processing? Cheers, Comment Actions
Hi Quentin, I tried to add the original formula used in IsNothingCheaperThanBestSolution() as candidates to allow SolveRecurse() pick them during normal process. However, with that try, I found the formula from original IR was failed to be added in LSRUse::InsertFormula() because they overlapped with the initial formula created in CollectFixupsAndInitialFormulae(). Instead of adding more candidate and expanding search space in SolveRecurse(), we may also want to have a separate function which only finds the cost from original IR. Comment Actions Hi Jun, The thing with LSR is that it is already complex enough that if we can avoid adding more separate paths I think it is best.
That is an interesting piece of information! Cheers, Comment Actions The initial cost I meant here was the cost before the post-increment normalization, and I skipped rewriting for the best solution selected from the post-inc transformed candidates if the initial cost is cheaper than the best solution. However, I found very fundamental cases were not handled by skipping rewriting. |