range-op: avoid copying the bounds in operator_div::wi_fold
Remove redundant copies of bounds parameters in operator_div::wi_fold.
The operator_div::wi_fold function in range-op.cc unnecessarily copied its four const-reference bound parameters into local variables for naming clarity. This commit removes these copies by directly using the parameter names, which have been updated for better readability. This change offers a minor performance improvement by avoiding redundant data copies.
In Details
In range-op.cc, the operator_div::wi_fold function accepted four const references to range_t objects representing bounds. For clarity, it copied these into local variables with more descriptive names. This commit eliminates these copies by renaming the parameters directly, reducing overhead without affecting the function's logic or the Range Optimization pass's behavior.
- range-op
- A GCC optimization pass that analyzes and manipulates the possible range of values for variables. It uses range information to perform optimizations like constant folding or dead code elimination.
- const reference
- A way to pass arguments to functions in C++ that allows the function to access the argument's value without making a copy, while also guaranteeing that the function will not modify the original argument.