OSDN Git Service

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)
commitf4d294cc96f5c891a589c1fd2ec7717d461900f3
tree1292307bb6777c08ae4237b1ecb3c696152ea8f7
parent840eb6500c1d4063a723abceb05d18c408e02eeb
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296921 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/GlobalISel/Legalizer.h
include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
include/llvm/Target/GenericOpcodes.td
include/llvm/Target/TargetOpcodes.def
lib/CodeGen/GlobalISel/Legalizer.cpp
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
lib/CodeGen/GlobalISel/LegalizerInfo.cpp
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
test/CodeGen/AArch64/GlobalISel/legalize-add.mir
test/CodeGen/AArch64/GlobalISel/legalize-load-store.mir