[PATCH] D50783: [CodeGen] Merge identical block descriptor global variables

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 15 13:20:19 PDT 2018


rjmccall added a comment.

In https://reviews.llvm.org/D50783#1200868, @ahatanak wrote:

> A few points I forgot to mention:
>
> - This optimization kicks in only in NonGC mode. I don't think we need to care much about GC anymore, so I think that's OK.


Yes, that's fine.

> - There is a lot of redundancy among the copy/dispose helper function strings and the block layout string in the block descriptor name (they all encode the information about the captures), which can make the descriptor name long. If that becomes a problem, it's possible to encode the information in a way that shortens the descriptor name, but that would probably make the function that generates the name more complex.

It should be straightforward to at least get merge the copy/dispose helper function names, right?  Those make basically the same pass over the captures and just check for slightly different things; the block-descriptor summary just has to include a little of both.

To unique the block layout string as well, we'd just have to cover the captures for which we haven't added any other description.  If you want to punt on that, I think that's fine.


Repository:
  rC Clang

https://reviews.llvm.org/D50783





More information about the cfe-commits mailing list