mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-13 17:38:39 +00:00
Add a new lazily constructed mapping from Idx's the MBB they represent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11017 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
09caa3751f
commit
43549f710a
@ -103,6 +103,12 @@ private: // Intermediate data structures
|
|||||||
/// BBMap - Maps LLVM basic blocks to their corresponding machine basic block.
|
/// BBMap - Maps LLVM basic blocks to their corresponding machine basic block.
|
||||||
/// This also provides a numbering of the basic blocks in the function.
|
/// This also provides a numbering of the basic blocks in the function.
|
||||||
std::map<const BasicBlock*, std::pair<MachineBasicBlock*, unsigned> > BBMap;
|
std::map<const BasicBlock*, std::pair<MachineBasicBlock*, unsigned> > BBMap;
|
||||||
|
|
||||||
|
|
||||||
|
/// BBIdxMap - This contains the inverse mapping of BBMap, going from block ID
|
||||||
|
/// numbers to the corresponding MachineBasicBlock. This is lazily computed
|
||||||
|
/// when the getIndexMachineBasicBlock() method is called.
|
||||||
|
std::vector<MachineBasicBlock*> BBIdxMap;
|
||||||
|
|
||||||
const MRegisterInfo *RegInfo;
|
const MRegisterInfo *RegInfo;
|
||||||
|
|
||||||
@ -126,6 +132,9 @@ public:
|
|||||||
return BBMap.find(BB)->second;
|
return BBMap.find(BB)->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// getIndexMachineBasicBlock() - Given a block index, return the
|
||||||
|
/// MachineBasicBlock corresponding to it.
|
||||||
|
MachineBasicBlock *getIndexMachineBasicBlock(unsigned Idx);
|
||||||
|
|
||||||
/// killed_iterator - Iterate over registers killed by a machine instruction
|
/// killed_iterator - Iterate over registers killed by a machine instruction
|
||||||
///
|
///
|
||||||
@ -243,6 +252,7 @@ public:
|
|||||||
RegistersKilled.clear();
|
RegistersKilled.clear();
|
||||||
RegistersDead.clear();
|
RegistersDead.clear();
|
||||||
BBMap.clear();
|
BBMap.clear();
|
||||||
|
BBIdxMap.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getVarInfo - Return the VarInfo structure for the specified VIRTUAL
|
/// getVarInfo - Return the VarInfo structure for the specified VIRTUAL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user