[PATCH] D118413: [Debuginfod] [Symbolizer] Break debuginfod out of libLLVM.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 3 13:07:38 PST 2022


mysterymath added a comment.

In D118413#3294741 <https://reviews.llvm.org/D118413#3294741>, @dblaikie wrote:

> In D118413#3292466 <https://reviews.llvm.org/D118413#3292466>, @mysterymath wrote:
>
>> I took a look at the existing concepts in LLVM, and given the overhead in code, they have to be born of deep frustrations. Given that those aren't present here, removed; it should be obvious when they are necessary.
>
> Can't say I'm following this comment - could you describe it in more detail. What existing concepts? What gives the impression they were "Born of deep frustration"?

Ah, this is in reference to the "concept/model" pattern from Sean Parent's "Inheritance is the base class of evil" talk: https://www.youtube.com/watch?v=bIhUE5uUFOA
It's a way of using templates to get golang-style structural typing interfaces.

It's used in a few places in LLVM; an example is AliasAnalysis.h and IIRC, TargetTransformInfo. You have to duplicate each method two or three times to implement the pattern, so it incurs a large constant overhead in code/maintenance, but the benefits are less clear. Since I don't fully understand why things were done that way for those specific places in LLVM where it's used, I can't effectively argue for the pattern here, so I was just cargo-culting by using it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118413



More information about the llvm-commits mailing list