1. A method, in a data processing system, for optimizing loops with conditional control flow in source code based on array reference safety, comprising: analyzing blocks of the source code to identify a conditional control flow loop having loop source code specifying a total access range for an array reference, identifying a safe access range, of the total access range of the array reference in the loop source code, over which a compiler-based optimization of the loop source code can be safely applied without introducing new exception conditions; performing the compiler-based optimization of the loop source code based on the identified safe access range to generate optimized code; and outputting the optimized code for generation of executable code for execution on a processor.