================ @@ -21,6 +21,88 @@ using namespace clang; using namespace clang::CIRGen; +/// Checks whether the given constructor is a valid subject for the +/// complete-to-base constructor delgation optimization, i.e. emitting the +/// complete constructor as a simple call to the base constructor. ---------------- Lancern wrote:
I think I misunderstood what "delegation optimization" means here. I confused it with "delegating constructors", which made me believe that we already have some information in the generated un-optimized code that could enable this optimization. I agree that it seems no benefits to delay this optimization to later passes. Actually after playing around for some while in godbolt I find it hard to actually trigger this optimization even with OGCG, because nowadays clang just emits C1 as an alias to C2 by default in case they are identical, which leaves no room for this optimization. https://github.com/llvm/llvm-project/pull/143639 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits