[PATCH] D69898: [Mips] Add rematerialization support for ldi.fmt

Mirko Brkusanin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 08:27:46 PST 2019


mbrkusanin added a comment.

In D69898#1740862 <https://reviews.llvm.org/D69898#1740862>, @atanasyan wrote:

> As far as I understand the code, overriding `isReallyTriviallyReMaterializable` and `reMaterialize` is not mandatory to avoid spill for `ldi.fmt`. Let's split the patch. The first patch could adds `isReMaterializable` flag to the `MSA_I10_LDI_DESC_BASE` and test the change. The second one - overrides `isReallyTriviallyReMaterializable` and `reMaterialize`. By the way, what is a goal of overriding `reMaterialize`? Does it give any benefit?


I removed everything expect adding the `isReMaterializable` flag. You're right, no additional code is necessary. In my earlier version of the patch there was a part of the checking and rematerializing that was done manually so I needed the checks for other instructions. But now I see that all of that was unnecessary. I went in a roundabout way and arrived at the same thing that `isReallyTriviallyReMaterializableGeneric` was already doing. The only benefit of overriding `isReallyTriviallyReMaterializable` at this point would be in slightly less checks for some instructions (but not in case they can't be rematerialized). Sorry for wasting your time on redundant code.


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

https://reviews.llvm.org/D69898





More information about the llvm-commits mailing list