[PATCH] D106408: Allow rematerialization of virtual reg uses

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 16 06:13:23 PDT 2021


dmgreen added a comment.

Have you gone through the uses of isTriviallyReMaterializable to check they line up to the new semantics? It looks like it's used in CalcSpillWeight, LiveRangeEdits (you've fixed recently?), MachineLICM (is getting an updated costmodel), Register Coalescer, shouldRegionSplitForVirtReg, WebAssemblyRegStackifty. Are they all expected to keep working with the change here?

I feel like the new behavior isn't really "Trivial" any more, and it may be worth keeping the old method for trivial cases, which is just the base case plus a virtual reg use check. Essentially MachineLICMBase::isTriviallyReMaterializable from D107677 <https://reviews.llvm.org/D107677>. I'm not sure what to call the new method though, and not sure its worth it if all the uses above are OK as-is.


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

https://reviews.llvm.org/D106408



More information about the llvm-commits mailing list