[llvm] [GlobalISel] Micro-optimize getConstantVRegValWithLookThrough (PR #91969)

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 08:41:08 PDT 2024


qcolombet wrote:

Do you know how each of these items contributes to the compile time individually:
* Avoid copying APint unnecessarily, especially returning std::optional can be expensive when an out parameter also works.
* Avoid indirect call by using templated function pointers instead of function_ref/std::function

The use of `optional` versus `bool` + `out` parameter is what I think we've been moving towards in the past few years within the LLVM code base and I'm wondering if that means this is generally bad for performance.

https://github.com/llvm/llvm-project/pull/91969


More information about the llvm-commits mailing list