diff options
Diffstat (limited to 'lib/CodeGen/VirtRegMap.h')
-rw-r--r-- | lib/CodeGen/VirtRegMap.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index b0af8c5c73..90cc44d31c 100644 --- a/lib/CodeGen/VirtRegMap.h +++ b/lib/CodeGen/VirtRegMap.h @@ -22,18 +22,23 @@ #include "llvm/CodeGen/SSARegMap.h" #include "Support/DenseMap.h" #include <climits> +#include <map> namespace llvm { + class MachineInstr; + class VirtRegMap { public: typedef DenseMap<unsigned, VirtReg2IndexFunctor> Virt2PhysMap; typedef DenseMap<int, VirtReg2IndexFunctor> Virt2StackSlotMap; + typedef std::multimap<MachineInstr*, unsigned> MI2VirtMap; private: MachineFunction* mf_; Virt2PhysMap v2pMap_; Virt2StackSlotMap v2ssMap_; + MI2VirtMap mi2vMap_; // do not implement VirtRegMap(const VirtRegMap& rhs); @@ -89,6 +94,15 @@ namespace llvm { int assignVirt2StackSlot(unsigned virtReg); + void virtFolded(unsigned virtReg, + MachineInstr* oldMI, + MachineInstr* newMI); + + std::pair<MI2VirtMap::const_iterator, MI2VirtMap::const_iterator> + getFoldedVirts(MachineInstr* MI) const { + return mi2vMap_.equal_range(MI); + } + friend std::ostream& operator<<(std::ostream& os, const VirtRegMap& li); }; |