Following discussion in D120303, introduce API that allows us to
notify SCEV that some loop will be broken or entirely deleted with
all its subloops, and therefore there is no need to store cached data
for them. The conservative fallback is "loop may stay, keep dependencies
that should stay alive".
Details
- Reviewers
nikic lebedev.ri reames fhahn
Diff Detail
Unit Tests
Time | Test | |
---|---|---|
60,030 ms | x64 debian > libFuzzer.libFuzzer::large.test |
Event Timeline
I'm having a hard time wrapping my head around what this patch does and is expected to do.
If I'm reading the prior review correct, clearing the LoopUsers can result in functional bugs. Given that, this "hint" isn't really a hint. You must get it right, or you may have a functional bug. But this patch seems to be adding more cases where we clear LoopUsers? Is this a functional fix?
If not, what is the compile time impact of leaving LoopUsers in place when we could clear it? Is it significant? If not, introducing complexity here does not seem worthwhile.
As an aside, I'd naively expect the loop association to be cleared when the AddRec is. Is there a reason we can't identify the loop dependent SCEVS, forgetValue them, and let forgetValue handle the actual map manipulation? Seems conceptually cleaner and less error prone. (Unless I'm missing something - which is very possible.)