aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-11-04 18:25:56 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-11-04 18:25:56 +0000
commitcce4e7a1b12fcb7b0f4bc63b7515b4abc147a512 (patch)
treebb4a3d0bc4bd0eb6d33d98bbb46aa89198e83c4e
parent2bde8bdc161aa2edfa0d6a22a75f7af15130c584 (diff)
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9697 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/RegAlloc/PhyRegAlloc.cpp4
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
index f387d1948f..65d1b70e3e 100644
--- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
@@ -1204,6 +1204,7 @@ void PhyRegAlloc::verifySavedState () {
}
}
+
/// Finish the job of saveState(), by collapsing FnAllocState into an LLVM
/// Constant and stuffing it inside the Module. (NOTE: Soon, there will be
/// other, better ways of storing the saved state; this one is cumbersome and
@@ -1213,8 +1214,11 @@ bool PhyRegAlloc::doFinalization (Module &M) {
if (!SaveRegAllocState)
return false; // Nothing to do here, unless we're saving state.
+ // If saving state into the module, just copy new elements to the
+ // correct global.
if (!SaveStateToModule) {
ExportedFnAllocState = FnAllocState;
+ // FIXME: should ONLY copy new elements in FnAllocState
return false;
}
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index f387d1948f..65d1b70e3e 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -1204,6 +1204,7 @@ void PhyRegAlloc::verifySavedState () {
}
}
+
/// Finish the job of saveState(), by collapsing FnAllocState into an LLVM
/// Constant and stuffing it inside the Module. (NOTE: Soon, there will be
/// other, better ways of storing the saved state; this one is cumbersome and
@@ -1213,8 +1214,11 @@ bool PhyRegAlloc::doFinalization (Module &M) {
if (!SaveRegAllocState)
return false; // Nothing to do here, unless we're saving state.
+ // If saving state into the module, just copy new elements to the
+ // correct global.
if (!SaveStateToModule) {
ExportedFnAllocState = FnAllocState;
+ // FIXME: should ONLY copy new elements in FnAllocState
return false;
}