[PATCH] D45490: [ADT] - Add llvm::make_mapped_range

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 08:53:38 PDT 2018


On Tue, Apr 10, 2018 at 8:47 AM Alexander Richardson via Phabricator <
reviews at reviews.llvm.org> wrote:

> arichardson added inline comments.
>
>
> ================
> Comment at: include/llvm/ADT/STLExtras.h:208
>  private:
> -  FuncTy F;
> +  Optional<FuncTy> F;
>  };
> ----------------
> Will using Optional here make lld slower with D45166 and a
> Release+Assertions build?
> Can the compiler optimize away all the Optional assertions? Maybe using
> `[F](ItTy It) { llvm_unreachable("end() derefeneced"); return F(It); }` is
> easier to optimize?
>

That would be a different functor type, making the end iterator a different
type from the begin iterator, right? I don't think that would work?


>
>
> https://reviews.llvm.org/D45490
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180410/15e7948a/attachment.html>


More information about the llvm-commits mailing list