Load Elimination and Non-Constant Offsets

If during load elinination a store is observed into a captured object (we only care about captured objects at this point, since we know them to be alias free) that does not use a constant offset (i.e. array access with a variable index), we have to stop the analysis for all downstream accesses to this object. This is due to the fact that we can’t safely predict which part of the object the store modified, and thus we can’t reliably re-connent future loads to the value. I added this safety check to the compiler.