[PATCH] D95375: [MC] Adding MCContext parameter to MCAsmBackend::relaxInstruction

Dominik Montada via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 00:07:40 PST 2021


gargaroff added a comment.

In D95375#2520987 <https://reviews.llvm.org/D95375#2520987>, @MaskRay wrote:

> OK. Currently `MCRelaxableFragment` encodes just one MCInst. Do you intend to loose the requirement?

Well, not sure. What we much rather would like to know is what the intended way to implement this correctly is. Apart from Hexagon, I am not aware of any other target that implements this relaxation. Hexagon does use `BUNDLE`, but in order to get the required `MCContext`, they have to resort to some hacky implementation leveraging `fixupNeedsRelaxation` IIRC.

We could implement this using a pseudo instruction, that we then expand in our target's `MCCodeEmitter`. But we thought that maybe there is no context available in `relaxInstructions`, because no other target implements this yet, so instead of working around this limitation using a pseudo, we should simply make the context available.

We really are unsure what the intended way should be, so we would definitely like some feedback here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95375



More information about the llvm-commits mailing list