[PATCH] D19682: [LSR] Skip transformation if the cost of no LSR is cheaper than the best solution selected

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 10:36:56 PDT 2016


junbuml added a comment.

> Instead of having a new method, can’t we consider this solution as part of the normal processing?

> That way, if this is the best solution, we would naturally get it.


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.


http://reviews.llvm.org/D19682





More information about the llvm-commits mailing list