https://github.com/aaronpuchert requested changes to this pull request.
The concept looks good to me, except for this part: > A held/conditionally held join difference is silent only when the terminator > rebranches on the call whose ProvedHeld try fact stands beside the definite > side's hold I don't see why this should be dependent on whether there is a later branch. In fact, I think we no longer need to warn at join points, we should simply warn when the conditionally held lock disappears (e.g. at the end of a scope, or on a loop back edge). What I don't like is how much code this is (+>1000 lines). LLMs are really good at churning out lots of code, which you would probably avoid if you had to write this yourself. Perhaps you should start conceptualizing this on paper and try expressing the logic in the appropriate primitives (perhaps some kind of ternary logic). When we did the parameter annotations for passing scoped locks (#110523), we also developed the semantics on paper before writing any code to make sure the logic is straightforward. Since you're essentially replacing a messy workaround with proper handling, it feels like things should become simpler. Perhaps it's also a good idea to think how you would handle try-acquire if you would build it from scratch, and then check where existing tests disagree. We can discuss about changing existing behavior where it makes sense. https://github.com/llvm/llvm-project/pull/241550 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
