...Hi list,
I made a small function to demonstrate it:let compare_str_sub p s s_off len =if s_off < 0 || s_off + len > String.length sthen invalid_arg "Don't do that!";else p = s
The odd code is toward the beginning: (if (!= 3 1) (exit 2) (exit 3))I don't know a lot about cmm code, but it looks like something the compiler should be able to optimize better. Fiddling with the flambda optimization options doesn't seem to remove it.
Is this just due to how new flambda is, or is there some other reason that code makes it through?
Thanks,Reed Wlison