GlobalISel: add merge/unmerge nodes for legalization.
authorTim Northover <tnorthover@apple.com>
Fri, 3 Mar 2017 22:46:09 +0000 (22:46 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 3 Mar 2017 22:46:09 +0000 (22:46 +0000)
commitbf017293af6e0f91a3ff7f173521abf66a32a18b
tree7e50c84787444bba6b8a2e40e1cc15931ce91168
parent5013eb9e1acb16b81a3a16dbd47353cf3ce4a22b
GlobalISel: add merge/unmerge nodes for legalization.

These are simplified variants of the current G_SEQUENCE and G_EXTRACT, which
assume the individual parts will be contiguous, homogeneous, and occupy the
entirity of the larger register. This makes reasoning about them much easer
since you only have to look at the first register being merged and the result
to know what the instruction is doing.

I intend to gradually replace all uses of the more complicated sequence/extract
with these (or single-element insert/extracts), and then remove the older
variants. For now we start with legalization.

llvm-svn: 296921
llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/include/llvm/Target/GenericOpcodes.td
llvm/include/llvm/Target/TargetOpcodes.def
llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-add.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-load-store.mir