[PATCH] D129518: [BOLT] Add function layout class

Fabian Parzefall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 15:30:36 PDT 2022


FPar added a comment.

In D129518#3649320 <https://reviews.llvm.org/D129518#3649320>, @tschuett wrote:

> Just as a comment. Maybe down the line, you could replace the `unsigned` with a `FragmentId`, a wrapper around an `unsigned`,  to avoid confusion.
>
> I have a feeling that you want to deprecate `FunctionLayout::blocks()`. There is probably a `LLVM_DEPRECATED` macro.

Your intution is correct, we want to get rid of `FunctionLayout::blocks()`. We discussed marking it as deprecated, but we figured it'll mostly create warning noise for now, because it is used too pervasively. So we defer that for now.

I did add a type for FragmentNum. I want to avoid the term "Id" here, because it is not used as an identifier across functions and can change arbitrarily in case if fragments are inserted in the middle of a function. Thanks for the suggestion!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129518



More information about the llvm-commits mailing list