[PATCH] D48225: [llvm-mca][X86] Teach how to identify register writes that implicitly clear the upper portion of a super-register.

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 19 08:34:35 PDT 2018


mattd added inline comments.


================
Comment at: lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp:330
+
+  auto ClearsSuperReg = [=](unsigned RegID) {
+    // On X86-64, a general purpose integer register is viewed as a 64-bit
----------------
mattd wrote:
> I like this lambda, and it makes sense to me.  AFAIK, the [=] capture encourages a copy of GR32RC and VR256XRC.  Can we get away with a reference capture [&] instead?
Nevermind, the GR43RC and VR128XRC are not automatic to this lambda, so they are propagated via reference semantics.  This looks good to me.


https://reviews.llvm.org/D48225





More information about the llvm-commits mailing list