[PATCH] D32002: [X86] Improve large struct pass by value performance

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 14:44:42 PDT 2017


zvi added a comment.

In https://reviews.llvm.org/D32002#728914, @courbet wrote:

> In https://reviews.llvm.org/D32002#727868, @craig.topper wrote:
>
> > Is this related to this bit from the Intel Optimization Manual.
>
>
> Yes, exactly. Do you think calling the flag "HasEnhancedStrings" would make this clearer ?


IMHO HasERMSB would be a good name with a comment specifying the feature name, "Enhanced REP MOVSB and STOSB operation (ERMSB)".



================
Comment at: lib/Target/X86/X86SelectionDAGInfo.cpp:232
   MVT AVT;
-  if (Align & 1)
+  if (Subtarget.hasFastString())
+    // If the target has fast strings, then it's at least as fast to use
----------------
courbet wrote:
> RKSimon wrote:
> > OptSize?
> Do you mean we should also use repmovs instead of copies when optimizing for size ? We could, but remember that this comes at a large performance code (see comment above), I' not sure how much we want to compromise in OptSize in general.
Consider using rep movs when OptForMinSize (rather than OptForSize)


https://reviews.llvm.org/D32002





More information about the llvm-commits mailing list