[PATCH] D37698: Add target callback doMemOpsHaveSameBasePtr

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 10:46:04 PDT 2017


MatzeB added a comment.

- When seeing the name `doMemOpsHaveSameBasePtr` I would expect this to do exactly `BaseReg1 == BaseReg2`. Can you explain how you happen to have cases with different base pointers that still reference the same object?
- Given that this callback is very specific to the selectiondag clustering mutator, maybe we better add a callback to `createLoadClusterDAGMutation`/`createStoreClusterDAGMutation` rather than in TargetInstructionInfo. That way you could also choose a better name like `shouldCluster`.
- We should indeed not change the behavior for aarch64, as the mutation mainly exists there to enable formation of load/store double instructions which require the same base pointer.


https://reviews.llvm.org/D37698





More information about the llvm-commits mailing list