Extract helper function to merge MemoryOperand lists [NFC]
authorPhilip Reames <listmail@philipreames.com>
Wed, 6 Jan 2016 04:39:03 +0000 (04:39 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 6 Jan 2016 04:39:03 +0000 (04:39 +0000)
commitf5d467572cb0ac0b80696330ed9d220dc1431bb5
tree353be163dfc31513feda3dbcd86be345502c04f2
parentda5ee8d8cfb2873e28a06bb50de3260049d7d1cb
Extract helper function to merge MemoryOperand lists [NFC]

In the discussion on http://reviews.llvm.org/D15730, Andy pointed out we had a utility function for merging MMO lists. Since it turned we actually had two copies and there's another review in progress (http://reviews.llvm.org/D15230) which needs the same, extract it into a utility function and clean up the interfaces to make it easier to use with a MachineInstBuilder.

I introduced a pair here to track size and allocation together. I think we should probably move in the direction of the MachineOperandsRef helper class, but I'm leaving that for further work. I want to get the poison state introduced before I make major changes to the interface.

Differential Revision: http://reviews.llvm.org/D15757

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256909 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineInstr.h
include/llvm/CodeGen/MachineInstrBuilder.h
lib/CodeGen/MachineInstr.cpp
lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
lib/Target/ARM/ARMLoadStoreOptimizer.cpp