The patch rL309080 was reverted because it did not clean up the cache on "forgetValue"
method call. This patch re-enables this change, adds the missing check and introduces
two new unit tests that make sure that the cache is cleaned properly.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I just realized that the attached IR test takes unreasonably long time with this fix, what makes the entire patch pointless.
Now we don't throw away the exit limit for sake of a more optimistic future estimation every time we calculate getBackedgeTakenInfo. It doesn't look like estimation of Exit Limit for a particular exit block may be improved from what we have there.
lgtm
I've also verified that this does not break on the internal test case we had.
include/llvm/Analysis/ScalarEvolution.h | ||
---|---|---|
1133 ↗ | (On Diff #108923) | Please add a comment on EraseExitLimit. While the name is pretty self explanatory in terms of what it does, it isn't obvious in what situations it can safely be set to false. |
lib/Analysis/ScalarEvolution.cpp | ||
10858 ↗ | (On Diff #108923) | You don't have to fix this in this patch, I think we only need to do this if S has a SCEVUnknown somewhere in it. Can you please add a TODO? |
10862 ↗ | (On Diff #108923) | Use braces to avoid the dangling else here. |