This is preparatory work to make Jump Threading to use PredIterCache.
There are places in which some of the predecessors are split in Jump Threading.
Details
- Reviewers
• dberlin
Diff Detail
- Build Status
Buildable 4725 Build 4725: arc lint + arc unit
Event Timeline
I'm all in favor of cache invalidation when weird things happen, but I also assume you could just tell it when you are removing/adding edges as well?
IE i would expect this kind of invalidation when we do something like "clone a loop", or "clone a region" and it's difficult to tell what happened.
But otherwise, i presume we could just update it instead of destroy it.
Anyway, probably not worth it here.
Just sayin.
Hmmm, actually, i bet, for jump threading, the way it caches preds is slower than counting them repeatedly.
If it just cached the count, that would likely be fast, but i expect the copying is slower than the counting,.
There are some opportunities for caching the basicblock* list in jump threading (In addtion to the count). But we also need to do the copy ... I will wait for the outcome of your investigation in https://reviews.llvm.org/D30873