[PATCH] D106408: Allow rematerialization of virtual reg uses

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 12:04:45 PDT 2021


rampitec added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetInstrInfo.cpp:990
-    // is not necessarily a good idea, certainly not "trivial".
-    if (MO.isUse())
-      return false;
----------------
LuoYuanke wrote:
> The comments looks reasonable to me. The use register's live range is extended if we rematerialize def register. Removing this code is not friendly to RA. Do you have any data  to ensure there is no side effect but benefit by removing this code?
> 
The comment is far from reality. RA does not extend use live ranges. Instead it checks that all uses are available at the point of rematerialization and does not rematerialize if not. There is quite a number of cases where we have less spilling now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106408



More information about the llvm-commits mailing list