mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 00:20:11 +00:00
Change MachineBasicBlock's vector of MachineInstr pointers into an
ilist of MachineInstr objects. This allows constant time removal and insertion of MachineInstr instances from anywhere in each MachineBasicBlock. It also allows for constant time splicing of MachineInstrs into or out of MachineBasicBlocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11340 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -213,7 +213,7 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
|
||||
// Loop over all of the instructions, processing them.
|
||||
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
|
||||
I != E; ++I) {
|
||||
MachineInstr *MI = *I;
|
||||
MachineInstr *MI = I;
|
||||
const TargetInstrDescriptor &MID = TII.get(MI->getOpcode());
|
||||
|
||||
// Process all of the operands of the instruction...
|
||||
@@ -275,9 +275,8 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
|
||||
MachineBasicBlock *Succ = BBMap.find(*SI)->second.first;
|
||||
|
||||
// PHI nodes are guaranteed to be at the top of the block...
|
||||
for (MachineBasicBlock::iterator I = Succ->begin(), E = Succ->end();
|
||||
I != E && (*I)->getOpcode() == TargetInstrInfo::PHI; ++I) {
|
||||
MachineInstr *MI = *I;
|
||||
for (MachineBasicBlock::iterator MI = Succ->begin(), ME = Succ->end();
|
||||
MI != ME && MI->getOpcode() == TargetInstrInfo::PHI; ++MI) {
|
||||
for (unsigned i = 1; ; i += 2)
|
||||
if (MI->getOperand(i+1).getMachineBasicBlock() == MBB) {
|
||||
MachineOperand &MO = MI->getOperand(i);
|
||||
|
||||
Reference in New Issue
Block a user