@@ -730,7 +730,7 @@ bool AccessAnalysis::canCheckPtrAtRT(RuntimePointerChecking &RtCheck,
730
730
// First, count how many write and read accesses are in the alias set. Also
731
731
// collect MemAccessInfos for later.
732
732
SmallVector<MemAccessInfo, 4> AccessInfos;
733
- for (auto A : AS) {
733
+ for (const auto & A : AS) {
734
734
Value *Ptr = A.getValue();
735
735
bool IsWrite = Accesses.count(MemAccessInfo(Ptr, true));
736
736
@@ -864,7 +864,7 @@ void AccessAnalysis::processMemAccesses() {
864
864
// compatibility and potential for underlying-object overlap. As a result, we
865
865
// only need to check for potential pointer dependencies within each alias
866
866
// set.
867
- for (auto &AS : AST) {
867
+ for (const auto &AS : AST) {
868
868
// Note that both the alias-set tracker and the alias sets themselves used
869
869
// linked lists internally and so the iteration order here is deterministic
870
870
// (matching the original instruction order within each set).
@@ -884,12 +884,12 @@ void AccessAnalysis::processMemAccesses() {
884
884
bool UseDeferred = SetIteration > 0;
885
885
PtrAccessSet &S = UseDeferred ? DeferredAccesses : Accesses;
886
886
887
- for (auto AV : AS) {
887
+ for (const auto & AV : AS) {
888
888
Value *Ptr = AV.getValue();
889
889
890
890
// For a single memory access in AliasSetTracker, Accesses may contain
891
891
// both read and write, and they both need to be handled for CheckDeps.
892
- for (auto AC : S) {
892
+ for (const auto & AC : S) {
893
893
if (AC.getPointer() != Ptr)
894
894
continue;
895
895
0 commit comments