[PATCH] D21720: Unroll for uncountable loops

Michael Zolotukhin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 14:28:15 PDT 2017


mzolotukhin added a comment.

> Okay, so is the general plan here to?
> 
> 1. Generally allow unrolling of uncountable loops
> 2. Adjust the profitability heuristic to account for the cost of the branches for the uncountable case
> 3. Include, as necessary, in our general profitability heuristic (if we don't get this naturally), savings from phi-derived values which are cyclic with a small cycle length (like the s = -s case).

I agree that we should start from (1). But I don't understand, why (2) (and (3) ) is considered special for the uncountable case. AFAIU, the current heuristic aims at simulating these savings (removed branches) already - even though we do not try to accurately predict cost of rolled and unrolled version of the loop. Am I missing something?

Michael


Repository:
  rL LLVM

https://reviews.llvm.org/D21720





More information about the llvm-commits mailing list