Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Inspired by comments ([here](#73424 (comment)) and [here]( #73424 (comment))) - Remove `RefPosition* currentRefPosition = &reverseIterator` as it creates two variables that are essentially the same, especially since the iterator has operators like `->`. In fact, I had to spend a bit of time verifying that there weren't any updates to one but not the other in the code. (And actually #73424 did slightly impact this relationship since it moved the assignment from the loop iteration step to the loop body, but I don't believe that this mattered.) I renamed the "iterator" variable to the "position" name to reduce textual churn in the code. This didn't work as well for the range-based loops since they yield -references- to the underlying object so a bunch of C++ punctuation changes. - Break apart two complicated `for` conditions and remove duplication between the condition and the loop body. Search for `continueLoop` to see them. - Delete list's `operator&` on each iterator since they are no longer used and not part of normal iterators. Manually verified no diffs (other than memory addresses) on a jitdump for a test case with minopts on and off to exercise the dump code in lsra. Manually verified asm diffs were spurious (differences in runtime addresses, sometimes also causing changes in the compiler internal representation size and then locations of labels). This regains the unexplained small throughput loss in #73424.
- Loading branch information