Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: src/IceTargetLowering.cpp

Issue 2177033002: Subzero: Local variable splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceTargetLowering.cpp
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index 1b9ca23bfe49eb96b1bc0dcc5ad38d72965c9adf..fd08d303aa1517f292dd273fb9103b50905619ed 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -565,16 +565,6 @@ void TargetLowering::sortVarsByAlignment(VarList &Dest,
});
}
-namespace {
-bool mightHaveStackSlot(const Variable *Var, const BitVector &IsVarReferenced) {
- if (!IsVarReferenced[Var->getIndex()])
- return false;
- if (Var->hasReg())
- return false;
- return true;
-}
-} // end of anonymous namespace
-
void TargetLowering::getVarStackSlotParams(
VarList &SortedSpilledVariables, SmallBitVector &RegsUsed,
size_t *GlobalsSize, size_t *SpillAreaSizeBytes,
@@ -594,30 +584,6 @@ void TargetLowering::getVarStackSlotParams(
}
}
- // Find each variable Var where:
- // - Var is actively referenced
- // - Var does not have a register
- // - Var's furthest ancestor through LinkedTo: Root
- // - Root has no active references, or has a register
- //
- // When any such Var is found, rotate the LinkedTo tree by swapping
- // Var->LinkedTo and Root->LinkedTo. This ensures that when Var needs a stack
- // slot, either its LinkedTo field is nullptr, or Var->getLinkedToRoot()
- // returns a variable with a stack slot.
- for (Variable *Var : Func->getVariables()) {
- if (!mightHaveStackSlot(Var, IsVarReferenced))
- continue;
- if (Variable *Root = Var->getLinkedToRoot()) {
- assert(Root->getLinkedTo() == nullptr);
- if (mightHaveStackSlot(Root, IsVarReferenced)) {
- // Found a "safe" root, no need to rotate the tree.
- continue;
- }
- Var->setLinkedTo(nullptr);
- Root->setLinkedTo(Var);
- }
- }
-
// If SimpleCoalescing is false, each variable without a register gets its
// own unique stack slot, which leads to large stack frames. If
// SimpleCoalescing is true, then each "global" variable without a register
« src/IceOperand.h ('K') | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringX86Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698