[PATCH] D109077: Do not attempt rematerialization with a killed register use

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 14:32:27 PDT 2021


rampitec added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetInstrInfo.cpp:988-990
+    // Do not bother to try rematerializing an instruction with a killed use,
+    // the value of the operand will not be available anyway.
+    if (MO.isKill())
----------------
arsenm wrote:
> Can't the caller base this check on the live segment?
TII does not have LIS and multiple callers which do have it would need to scan operands again, which defeats the purpose of the patch to quickly bail if we cannot process it anyway. Here we already have MO available and the check is very cheap.


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

https://reviews.llvm.org/D109077



More information about the llvm-commits mailing list