summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/VirtRegMap.h
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-05-29 19:03:29 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-05-29 19:03:29 +0000
commite3cec71bdc02c41036752890fdab8882d7a2e816 (patch)
treedc07c531b8e3b8d1eb617d0e9514869f08193108 /llvm/lib/CodeGen/VirtRegMap.h
parent1010116a8f08fcca59c168b371b09001956dafc6 (diff)
downloadbcm5719-llvm-e3cec71bdc02c41036752890fdab8882d7a2e816.tar.gz
bcm5719-llvm-e3cec71bdc02c41036752890fdab8882d7a2e816.zip
Add grow() member that grows the maps when the number of virtual
registers in the function has changed. llvm-svn: 13893
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegMap.h')
-rw-r--r--llvm/lib/CodeGen/VirtRegMap.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.h b/llvm/lib/CodeGen/VirtRegMap.h
index 3c2f8eec4ad..c4188bcfbcd 100644
--- a/llvm/lib/CodeGen/VirtRegMap.h
+++ b/llvm/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 {
OpenPOWER on IntegriCloud