The scev-based salvaging for LSR can sometimes produce unnecessarily verbose expressions. This patch adds logic to detect when the expression for the value to be recovered and the induction variable differ by only a constant offset, Then the expression to derive the current iteration count can be omitted from the dbg.value. This functionality is similar to the previous method for value recovery.
Details
Diff Detail
Event Timeline
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | ||
---|---|---|
6231 | Does this mean the presence of debug info would change codegen? |
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | ||
---|---|---|
6231 | No. I was using this return bool to check if debuginfo had changed, RewriteDVIUsingIterCount() has a similar return bool. However, the return values are currently unused. I will remove this return value for now as it seems its only use is to be possibly confusing. |
Remove unused (and potentially confusing) bool return value from functions that rewrite the dbg.value intrinsics.
Required a minor modification as I realised the parent patch (D107016) was unnecessary
Does this mean the presence of debug info would change codegen?