[PATCH] D99560: Utility to construct visitors from lambdas.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 13:29:51 PDT 2021


mehdi_amini added a comment.

In D99560#2665902 <https://reviews.llvm.org/D99560#2665902>, @bakhtiyarneyman wrote:

> Regarding deriving from using other kinds of functors: I have not yet seen a need for this. My preference is to cross that bridge when we reach it. :)
>
> Regarding taking references to the functors: I played around but on my first attempts the assembly seemed to have become scarier than without the references, so I decided not to push it further. Here's the evidence: https://godbolt.org/z/eoGKMW3jx

Have you tried adding `-O3`? Seems like it impacts your Godbolt example quite significantly.

Also to really be relevant for LLVM, `-fno-exceptions -fno-rtti` helps in some cases as well (not here I think).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99560



More information about the llvm-commits mailing list