[PATCH] D74482: [KnownBits] Introduce anyext instead of passing a flag into zext

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 09:28:40 PST 2020


bjope added a comment.

In D74482#1872332 <https://reviews.llvm.org/D74482#1872332>, @foad wrote:

> In D74482#1872292 <https://reviews.llvm.org/D74482#1872292>, @bjope wrote:
>
> > I guess this has been to follow the same pattern as the underlying APInt objects, and I guess one goals is to make it possible to do things like this
> >
> >   Known = Known.zext(X).trunc(Y).zextOrTrunc(Z):
> >   
> >
> > But aren't we getting a lot of copying of KnownBits objects?
>
>
> Yes, but I think the way to fix that is to add better support for move semantics. APInt already does quite a bit of this.


Sure. You are probably right. Move semantics could solve that problem in a better way.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74482





More information about the llvm-commits mailing list