This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Add a knob for MCOperandInfo expansion in gen-instr-info
ClosedPublic

Authored by Amir on Jun 15 2022, 8:45 PM.

Details

Summary

Control the MCOperandInfo expansion with -instr-info-expand-mi-operand-info.
For X86, this would make it possible to see memory operand type e.g.:

/* MOV8rm */
GR8, i8mem,
/* MOV8rm_NOREX */
GR8_NOREX, i8mem_NOREX,

The intended use is a follow-up diff D126116 (getMemOperandSize).

Diff Detail

Event Timeline

Amir created this revision.Jun 15 2022, 8:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2022, 8:45 PM
Amir requested review of this revision.Jun 15 2022, 8:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2022, 8:45 PM
Amir edited the summary of this revision. (Show Details)Jun 15 2022, 9:32 PM
Amir updated this revision to Diff 438473.Jun 20 2022, 2:09 PM

Update test; fix incorrect rebase

skan added inline comments.Jun 23 2022, 8:07 AM
llvm/test/TableGen/get-operand-type-no-expand.td
42

Do we need to test that -instr-info-expand-mi-operand-info=1 while -gen-instr-info is not enabled?

48

Question: i512complex is expanded to what above?

Amir marked an inline comment as done.Jun 23 2022, 10:36 AM
Amir added inline comments.
llvm/test/TableGen/get-operand-type-no-expand.td
42

I don't think so. -instr-info-expand-mi-operand-info=1 only has an effect when gen-instr-info is enabled.

48

i8complex and i512complex both expand into (ops i8imm, i32imm) according to ComplexOperand definition. Similar to X86MemOperand that expands into a fixed MIOperandInfo DAG.

skan accepted this revision.Jun 28 2022, 6:57 PM

LGTM

This revision is now accepted and ready to land.Jun 28 2022, 6:57 PM
Amir marked an inline comment as done.Jun 29 2022, 12:27 AM

@skan - thank you for looking at these changes.

This revision was landed with ongoing or failed builds.Jun 29 2022, 12:59 AM
This revision was automatically updated to reflect the committed changes.