[PATCH] D77795: [GlobalISel] translate freeze to COPY

Dominik Montada via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 10:00:14 PDT 2020


gargaroff added a comment.

In D77795#1972248 <https://reviews.llvm.org/D77795#1972248>, @arsenm wrote:

> The copy won't be legalized, so you're going to have issues emitting a copy for any non-legal source. We need a legalizable G_FREEZE


How should legalization rules look like? Since the value has to be stable I'm guessing zero extend for widen and unmerge/merge/extract/insert for narrow?

If we don't need to add selection support to any backend I could do that tomorrow.

My only concern is that the maintenance required to eventually introduce a new FREEZE MachineInstr which G_FREEZE should be selected to is quite a bit higher, since all GlobalISel backends that support G_FREEZE must be updated to properly select to FREEZE, instead of the COPY, while only having to change the IRTranslator is a lot easier.

But if legalization is a problem, then I guess there's nothing else that we can do.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77795





More information about the llvm-commits mailing list