Page MenuHomePhabricator

[WebAssembly] refactored utilities to not depend on MachineInstr (NFC)
ClosedPublic

Authored by aardappel on Fri, Jul 12, 9:34 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

aardappel created this revision.Fri, Jul 12, 9:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Jul 12, 9:34 AM
aheejin accepted this revision.Fri, Jul 12, 11:46 AM

LGTM. How about adding overriden functions that takes MachineInstr argument that calls these functions? And if this is pure refactoring adding (NFC) to the title might be better.

This revision is now accepted and ready to land.Fri, Jul 12, 11:46 AM
aardappel retitled this revision from [WebAssembly] refactored utilities to not depend on MachineInstr to [WebAssembly] refactored utilities to not depend on MachineInstr (NFC).Fri, Jul 12, 2:41 PM

Most of the functions are only called once or twice, so adding overloads is not worth it, I think.
I think its cleaner for them to work on generic opcodes, irrespective of where those are stored.

I am actually moving these function to MCTargetDesc so they are available to all the code, not just the backend.

aardappel updated this revision to Diff 209613.Fri, Jul 12, 3:06 PM

Moved functions to MCTargetDesc to be available to all.

This revision was automatically updated to reflect the committed changes.