[PATCH] D35907: [StackColoring] Update AliasAnalysis information in stack coloring pass

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 11:37:07 PDT 2017


MatzeB added inline comments.


================
Comment at: lib/CodeGen/StackColoring.cpp:1033-1034
+        if (MayHaveConflictingAAMD) {
+          MemOps[MemOpIdx++] = MF->getMachineMemOperand(MMO, AAMDNodes());
+          ReplaceMemOps = true;
+        }
----------------
MatzeB wrote:
> - Does `AAMDNodes()` mean it can alias with anything? In that case you could simply use `I.dropMemRefs()` as we make the same assumption for an instruction without any memory operands.
> 
> - Can't you simplify to `MemOps[MemOpIdx++]` to `*MMO = ...` and avoid the extra counter?
Ignore my last point about the `MemOps`. I missed that fact that you are duplicating the information and not just replacing the existing operands (may help understand if you renamed the variable to `NewMemOps`).


https://reviews.llvm.org/D35907





More information about the llvm-commits mailing list