atassis wrote: I hope this version look ok. Per ideas- I think that we can reuse the per-module lock that already stops two workers compiling the same module, and make it cover the validate-and-stamp step as well: the 1st worker to reach a module validates it and writes the stamp, while any other arriving after that waits and sees it's already done instead of rechecking the inputs.
I am not sure, though, if that's safe. From what I can tell a module can be out of date for one TU but fine for another (different header search paths and so on), so one worker deciding it's valid might not hold for the next. If that's the case, then the lock can still stop them validating at the same time, but it can't let the second worker skip validation outright. So before building anything I'd want to measure whether the duplicate validation is actually expensive enough to matter. Either way I'll keep it a separate change https://github.com/llvm/llvm-project/pull/210587 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
