From: Alkis Evlogimenos Date: Sat, 29 May 2004 19:03:29 +0000 (+0000) Subject: Add grow() member that grows the maps when the number of virtual X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f174cc303ba0f37ceaed75c3ea751ebd0fb3a4cd;p=oota-llvm.git Add grow() member that grows the maps when the number of virtual registers in the function has changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13893 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index 3c2f8eec4ad..c4188bcfbcd 100644 --- a/lib/CodeGen/VirtRegMap.h +++ b/lib/CodeGen/VirtRegMap.h @@ -54,8 +54,12 @@ namespace llvm { : mf_(&mf), v2pMap_(NO_PHYS_REG), v2ssMap_(NO_STACK_SLOT) { - v2pMap_.grow(mf.getSSARegMap()->getLastVirtReg()); - v2ssMap_.grow(mf.getSSARegMap()->getLastVirtReg()); + grow(); + } + + void grow() { + v2pMap_.grow(mf_->getSSARegMap()->getLastVirtReg()); + v2ssMap_.grow(mf_->getSSARegMap()->getLastVirtReg()); } bool hasPhys(unsigned virtReg) const {