Question about Value Range Propagation

Chris,
one way to look at array bounds check optimization, and the value range propagation that it can be based on, is that it’s usefulness is language dependent. Ada and Java benefit from it greatly, C/C++ not at all, but then a “codesafe” version of C/C++ would, as John T was pointing out below.

It seems like the software engineering modularity of llvm’s various analysis and transform phases lends itself to having phases that fit this description, worthwhile to have, but not necessarily linked in and/or not necessarily invoked, for every front end language.

Another approach is to only trigger the analysis/transform if any bounds check instructions have been encountered, which won’t happen in traditional C/C++.

Are either of these approaches consistent with your design philosophy ?

thanks,
Peter Lawrence.

(ps, the possible performance problem with the previous ABCD should not be a factor in the above, since while I don’t yet know why that implementation suffered, or if it even did, I do know from personal experience that VRP/ABCD can be both very efficient and very effective.)