[clang] [Serialization] Load Specializations Lazily (PR #76774)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 19:03:23 PST 2024


ChuanqiXu9 wrote:

> > @ilya-biryukov any chance you/your folks could test this change for performance implications in google? It's especially helpful to CERN, but the last iteration of this direction had some regressions that stalled out progress on that version a few years ago, so it'd be good to help poke this along while making sure it doesn't cause release hiccups/etc for google.
> 
> Sorry for the long reply time. I will check which ways to check compilation performance we have here. I believe we should also probably check this for correctness (which should be slightly easier than checking the performance implications) as we are hitting quite some issues related to lazy reads from modules, which have proven very hard to debug and reduce in the last years. I am slightly worried it may get worse with this change and we won't be able to compile our code because of some other existing bugs.

I feel it may be sufficient to test the correctness by running your internal workloads. And if it compiles and passes the test, we can assume it is correct.

And for the debugability, yeah, it is a problem. But it has been a problem for a long time. To not make it worse with the patch, maybe we can add a CC1 flag for the patch to always emit the same hash value for template arguments. Then it becomes to the same behavior with the current one. 

Further more, for the debugability, I am wondering if we can make it better by dumpping all the deserialized declarations (this is easy with deserialization listener) well. This may be helpful since we can get rid of all the unused things immediately.

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


More information about the cfe-commits mailing list