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

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 29 05:38:09 PST 2024


vgvassilev wrote:

> > > > As far as I can tell from [#76774 (comment)](https://github.com/llvm/llvm-project/pull/76774#issuecomment-1914177330) above, the last push only changed the default value of `LoadExternalSpecializationsLazily`. In that case, my test results from [#76774 (comment)](https://github.com/llvm/llvm-project/pull/76774#issuecomment-1912182171) remain fully valid, especially
> > > > > Switching the new `LoadExternalSpecializationsLazily` to disabled by default (somehow the argument didn't work on its own) instead crashes, most of the cases involving `MultiOnDiskHashTable`. I suspect some kind of memory error maybe?
> > > 
> > > 
> > > No, this newest patch changes besides changing the default value. For example, [22c9d11#diff-125f472e690aa3d973bc42aa3c5d580226c5c47661551aca2889f960681aa64dR232-R237](https://github.com/llvm/llvm-project/commit/22c9d1145eb57d9c2cb2ef490b7c474598dd5d12#diff-125f472e690aa3d973bc42aa3c5d580226c5c47661551aca2889f960681aa64dR232-R237) now we won't write specializations into the hash table, while the original patch tries to load all the decls from the consumers' side only. This patch touches the producer's side.
> > > Maybe I shouldn't push force to make the history clear..
> > 
> > 
> > If you want I can set you up with the ROOT project so that you can debug the failures easier.
> 
> Thanks. Although I don't understand how can it be, it will be better if things can be easier.

```bash
git clone https://github.com/vgvassilev/root.git
git checkout llvm-pr76774

mkdir root_obj && cd root_obj
cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_BUILD_TYPE=Debug ../root
```
That will get you llvm-16 under src/interpreter/llvm-project. I have removed our local patch that's essentially https://reviews.llvm.org/D41416 and https://reviews.llvm.org/D154328. Then you will need to apply the changes from this PR.

You might need to install some "trivial" pre-requirements https://root.cern/install/dependencies/

Very likely a Clang-based tool called rootcling will fail with an error. You can re-run with VERBOSE=1 and debug there.

I hope that's not too difficult and will help us narrow down the problems.

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


More information about the cfe-commits mailing list