HomePhabricator

GlobalISel: move type information to MachineRegisterInfo.
Audit RequiredrL281035

Description

GlobalISel: move type information to MachineRegisterInfo.

We want each register to have a canonical type, which means the best place to
store this is in MachineRegisterInfo rather than on every MachineInstr that
happens to use or define that register.

Most changes following from this are pretty simple (you need an MRI anyway if
you're going to be doing any transformations, so just check the type there).
But legalization doesn't really want to check redundant operands (when, for
example, a G_ADD only ever has one type) so I've made use of MCInstrDesc's
operand type field to encode these constraints and limit legalization's work.

As an added bonus, more validation is possible, both in MachineVerifier and
MachineIRBuilder (coming soon).

Details

Auditors
grosbach
Committed
tnorthoverSep 9 2016, 4:46 AM
Parents
rL281034: IslNodeBuilder: Add missing __isl_take annotation
Branches
Unknown
Tags
Unknown