zygoloid wrote:

Thank you for tackling this longstanding issue! How much does saving this extra 
state add to the runtime and memory usage on a template-heavy compilation?

If the cost is concerning, one other option we could consider here would be 
performing pending local instantiations eagerly when we reach the end of a 
region in which we have a context note -- that'd mean we don't need to save 
state for later. That's subtly behavior changing because it will pick an 
earlier point of instantiation for those local instantiations, but it's a 
permitted point of instantiation; we could try it and see if it works well 
enough in practice. We could also delay implicit definitions of special members 
like we do for template instantiations to reduce the impact.

https://github.com/llvm/llvm-project/pull/125453
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to