This patch fixes an issue in the Optimize LEAs pass where redundant LEAs were not removed because they were being used by debug values. This issue was discovered when comparing the output of optimized code with and without debug info.
The debug value instructions are now ignored when determining whether LEAs are redundant. The debug values for the redundant LEAs are marked as undefined.
The intention is for a follow up patch which will attempt to preserve the debug values where possible.
LLVM doesn't have much top level const like this - I'd probably leave it off.