+ first->setParent(parent);
+ return;
+ }
+
+ // Otherwise, we have to update the parent and the use/def lists. The common
+ // case when this occurs is if we're splicing from a block in a MF to a block
+ // that is not in an MF.
+ bool HasOldMF = fromList.parent->getParent() != 0;
+ MachineFunction *NewMF = parent->getParent();
+
+ for (; first != last; ++first) {
+ if (HasOldMF) first->RemoveRegOperandsFromUseLists();
+ first->setParent(parent);
+ if (NewMF) first->AddRegOperandsToUseLists(NewMF->getRegInfo());
+ }