[PATCH] D47349: [AArch64] Limit inlining string functions with strict alignment

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 24 17:35:01 PDT 2018


efriedma added a comment.

If I'm following correctly, the problem here is that we don't have paired load/store operations for byte operations, so the threshold is roughly double what it should be. StrictAlign isn't really a good proxy for that; it doesn't have anything to do with whether a particular memcpy will lower to paired operations. Ideally, we should probably come up with some callback to give a bonus to paired operations rather than penalize all operations in StrictAlign mode.

That said, just checking StrictAlign might be a good enough approximation for now; most code isn't built with strict alignment.  Needs an comment explaining what you're doing, though.

Given you're just checking the subtarget, I don't think you need to make getMaxStoresPerMemcpy virtual; you can just modify AArch64TargetLowering::AArch64TargetLowering.


Repository:
  rL LLVM

https://reviews.llvm.org/D47349





More information about the llvm-commits mailing list