Tighten the insert() API for bundled instructions.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 18 Dec 2012 17:54:53 +0000 (17:54 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 18 Dec 2012 17:54:53 +0000 (17:54 +0000)
commitedc3503ca5a4ab9133dd825dce4abd46bc4a3e08
treeb969f8ca6fdf41005ee06bce0b7a3adc9c368531
parentca2dd36c395f5ead63572d45a2106b9d34d8ca90
Tighten the insert() API for bundled instructions.

The normal insert() function takes an MBB::iterator position, and
inserts a stand-alone MachineInstr as before.

The insert() function that takes an MBB::instr_iterator position can
insert instructions inside a bundle, and will now update the bundle
flags correctly when that happens.

When the insert position is between two bundles, it is unclear whether
the instruction should be appended to the previous bundle, prepended to
the next bundle, or stand on its own. The MBB::insert() function doesn't
bundle the instruction in that case, use the MIBundleBuilder class for
that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170437 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineBasicBlock.h
lib/CodeGen/MachineBasicBlock.cpp