mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-07 11:08:46 +00:00
Range-for some LiveIntervals code under review
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252267 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ff8f92da7
commit
baea4d9d8f
@ -222,19 +222,17 @@ void LiveIntervals::computeRegMasks() {
|
||||
RegMaskBlocks.resize(MF->getNumBlockIDs());
|
||||
|
||||
// Find all instructions with regmask operands.
|
||||
for (MachineFunction::iterator MBBI = MF->begin(), E = MF->end();
|
||||
MBBI != E; ++MBBI) {
|
||||
MachineBasicBlock *MBB = &*MBBI;
|
||||
std::pair<unsigned, unsigned> &RMB = RegMaskBlocks[MBB->getNumber()];
|
||||
for (MachineBasicBlock &MBB : *MF) {
|
||||
std::pair<unsigned, unsigned> &RMB = RegMaskBlocks[MBB.getNumber()];
|
||||
RMB.first = RegMaskSlots.size();
|
||||
for (MachineBasicBlock::iterator MI = MBB->begin(), ME = MBB->end();
|
||||
MI != ME; ++MI)
|
||||
for (const MachineOperand &MO : MI->operands()) {
|
||||
for (MachineInstr &MI : MBB) {
|
||||
for (const MachineOperand &MO : MI.operands()) {
|
||||
if (!MO.isRegMask())
|
||||
continue;
|
||||
RegMaskSlots.push_back(Indexes->getInstructionIndex(MI).getRegSlot());
|
||||
RegMaskBits.push_back(MO.getRegMask());
|
||||
RegMaskSlots.push_back(Indexes->getInstructionIndex(&MI).getRegSlot());
|
||||
RegMaskBits.push_back(MO.getRegMask());
|
||||
}
|
||||
}
|
||||
// Compute the number of register mask instructions in this block.
|
||||
RMB.second = RegMaskSlots.size() - RMB.first;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user