Exactly what it says on the tin!
Diff Detail
Event Timeline
Consider:
int flag; bool coin(); void foo() { flag = coin(); } void test() { int *x = 0; int local_flag; flag = 1; foo(); local_flag = flag; if (local_flag) x = new int; foo(); local_flag = flag; if (local_flag) *x = 5; }
I'd rather track flag when i reach local_flag. I believe that we must track the RHS, but only as long as it's an overwrite on its own (or it's the value that participated in the collapse).
This is why the heuristic that i suggested was "track normally until the *last* out-of-frame overwrite point or until the collapse point".
You're right. If condition tracking only adds necessary information, this shouldn't hurt that much anyways.
I'd rather not abandon this patch, because it looks like a strict improvement over the lack of condition tracking, and it might as well still be an improvement over "zealous" condition tracking, as my counterexample is fairly artificial. It indicates that a slightly more sophisticated algorithm is necessary (i'm not sure if it's single-pass or even linear). But i'll be perfectly happy with simply adding it as a FIXME test.