[llvm] [BOLT] Modify MCPlus annotation internals. NFCI. (PR #70412)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 6 12:11:32 PST 2023


maksfb wrote:

> LGTM in general, just two remarks:
> 
> * There is some duplication of logic between `getNumPrimeOperands` and `getAnnotationInstOp` (searching for `kInst`). Maybe one could be written in function of the other?
getNumPrimeOperands() is a bit more optimized. It can return before finding the `kInst`.
> * Since we don't need any `MCPlusBuilder` state anymore for annotations, should we move all the annotation-related functions to `MCPlus`? Not saying that should happen in this PR (the diff is probably fairly large) but it seems to be the more logical place for this functionality.
We still use `AnnotationAllocators` for non-trivial annotations though.



https://github.com/llvm/llvm-project/pull/70412


More information about the llvm-commits mailing list