This is an archive of the discontinued LLVM Phabricator instance.

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

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

Diff Detail

Event Timeline

aardappel created this revision.Jul 12 2019, 9:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2019, 9:34 AM
aheejin accepted this revision.Jul 12 2019, 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.Jul 12 2019, 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).Jul 12 2019, 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.Jul 12 2019, 3:06 PM

Moved functions to MCTargetDesc to be available to all.

This revision was automatically updated to reflect the committed changes.