From cb3b2fc4390e8d51b09ff085e20e0b6589e75285 Mon Sep 17 00:00:00 2001 From: Alkis Evlogimenos Date: Tue, 20 Jul 2004 13:28:17 +0000 Subject: [PATCH] Add function to clear all virtual->physical mappings but not assigned stack slots. This is in preparation for the iterative linear scan. llvm-svn: 15032 --- lib/CodeGen/VirtRegMap.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index e9bfe76d4bf..c76a222341e 100644 --- a/lib/CodeGen/VirtRegMap.h +++ b/lib/CodeGen/VirtRegMap.h @@ -87,6 +87,11 @@ namespace llvm { v2pMap_[virtReg] = NO_PHYS_REG; } + void clearAllVirt() { + v2pMap_.clear(); + grow(); + } + bool hasStackSlot(unsigned virtReg) const { return getStackSlot(virtReg) != NO_STACK_SLOT; }