[PATCH] D31239: [WIP] Add Caching of Known Bits in InstCombine
    Michael Zolotukhin via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Mar 22 14:34:24 PDT 2017
    
    
  
mzolotukhin added a comment.
Thanks for posting this, Hal!
I'll run some experiments with it, but in general I support this approach.
@rnk:
> Long term, I agree with Danny that computing known bits on demand doesn't seem to scale. We might want to just do the analysis up front and see if that works better.
The problem with computing everything upfront is that at some point we might want to partially invalidate the results. Recomputing everything from scratch after it  sounds inefficient, and if we add caching, we'll end up with something like what's proposed here. To me this looks very similar to what we have in SCEV (a map from expression to the corresponding analysis result, that we can invalidate and recompute whenever it's requested again), and I think SCEV has been working pretty well so far in this aspect.
Michael
https://reviews.llvm.org/D31239
    
    
More information about the llvm-commits
mailing list