[llvm-dev] [Proposal][RFC] Cache aware Loop Cost Analysis
Vikram TV via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 9 09:33:55 PDT 2016
On Wed, Jun 8, 2016 at 10:56 PM, Ehsan Amiri <ehsanamiri at gmail.com> wrote:
> a. 1, if the reference is invariant with the innermost loop,
>> b. TripCount for non-unit stride access,
>> c. TripCount / CacheLineSize for a unit-stride access.
>> Loop Cost is then calculated as the sum of the reference penalties times
>> the product of the loop bounds of the outer loops. This loop cost can then
>> be used as a profitability measure for cache reuse related optimizations.
>> This is just a brief description; please refer to  for more details.
> I think you need finer granularity here. At least you need to distinguish
> between stride-c (for some reasonable constant, say c = 2) access and
> non-strided access as in indirect indexing (a[b[x]]) or otherwise
> unpredictable index.
I think, 'c' should be <= CacheLineSize. I will have this as a to-do as
only canonical loops are supported for now.
Mysore, Karnataka, INDIA
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev