diff options
author | Tom Stellard <[email protected]> | 2012-08-23 19:27:48 +0000 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-08-23 21:54:32 +0000 |
commit | 5a1edb8655aeab17bf0d90e202fb31a1adb53498 (patch) | |
tree | 36ae701132e8da585b1fc8dc7c1ccfb6bcb47680 /src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp | |
parent | cb5227b403a9c78a734e5e67657da6c485881cbb (diff) |
radeon/llvm: Simplify the convert to ISA pass
Diffstat (limited to 'src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp')
-rw-r--r-- | src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp b/src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp index b876a660fe7..fbca0a7b832 100644 --- a/src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp +++ b/src/gallium/drivers/radeon/AMDGPUConvertToISA.cpp @@ -52,15 +52,10 @@ bool AMDGPUConvertToISAPass::runOnMachineFunction(MachineFunction &MF) for (MachineFunction::iterator BB = MF.begin(), BB_E = MF.end(); BB != BB_E; ++BB) { MachineBasicBlock &MBB = *BB; - for (MachineBasicBlock::iterator I = MBB.begin(), Next = llvm::next(I); - I != MBB.end(); I = Next, Next = llvm::next(I) ) { + for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); + I != E; ++I) { MachineInstr &MI = *I; - MachineInstr * newInstr = TII->convertToISA(MI, MF, MBB.findDebugLoc(I)); - if (!newInstr) { - continue; - } - MBB.insert(I, newInstr); - MI.eraseFromParent(); + TII->convertToISA(MI, MF, MBB.findDebugLoc(I)); } } return false; |