[PATCH] D145379: [FuncSpec] Cost model improvements.

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 08:09:29 PDT 2023


chill added inline comments.


================
Comment at: llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h:87
+// keeps the discovered specialisation opportunities for the module in a single
+// vector, where the specialisations of each function form a contiguous range.
+// This map's value is the beginning and the end of that range.
----------------
SjoerdMeijer wrote:
> labrinea wrote:
> > SjoerdMeijer wrote:
> > > It's not clear to me what this range exactly is.
> > This typdef is unrelated to this patch, I just grouped all the typedef here. Just ignore it.
> Okay, so it lived somewhere else before and you just moved it here, but can you explain what the range is while we are at it?
Isn't that clear from the comment above?

We have a vector of specializations. In this vector the specializations of any one function are adjacent to one another, IOW "form a contiguous range".
For example, if specializations of  `foo` are at indices 4, 5, 6, 7 in the vector, we keep just 4 and 8,
to save space. The range is `[4, 8)`.

A somewhat longer description of the data structures is given in the commit message: in https://reviews.llvm.org/rGe6b9fc4c8be00660c5e1f1605a6a5d92475bdba7



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145379/new/

https://reviews.llvm.org/D145379



More information about the llvm-commits mailing list