[PATCH] D60801: [X86] Disable argument copy elision for arguments passed via pointers

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 13:50:53 PDT 2019


rnk added a comment.

The code change seems reasonable to me. I looked at it for a while, but I struggled to find a way to simplify it.



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:3013-3014
 
   // This is an argument in memory. We might be able to perform copy elision.
-  if (Flags.isCopyElisionCandidate()) {
+  // Unless its passed by pointer.
+  if (Flags.isCopyElisionCandidate() &&
----------------
I think this comment needs to be reworked, since things aren't as simple as I thought they were. Something like:
  // If the argument is passed directly in memory without any extension, then we can perform copy elision.
  // Large vector types, for example, may be passed indirectly by pointer.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60801/new/

https://reviews.llvm.org/D60801





More information about the llvm-commits mailing list