summaryrefslogtreecommitdiff
path: root/src/jit/liveness.cpp
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2016-08-01 16:42:15 -0700
committerPat Gavlin <pagavlin@microsoft.com>2016-08-01 16:42:15 -0700
commit8ab671ec13b7f625ae57c46e60a79128be19fa86 (patch)
tree78d3a93bacd073f02f9dd8294ed4d2387ee065be /src/jit/liveness.cpp
parent4faa40e2b9cb2a48023aa6a21a6b09b7a94f0988 (diff)
downloadcoreclr-8ab671ec13b7f625ae57c46e60a79128be19fa86.tar.gz
coreclr-8ab671ec13b7f625ae57c46e60a79128be19fa86.tar.bz2
coreclr-8ab671ec13b7f625ae57c46e60a79128be19fa86.zip
Add function headers for new liveness methods.
In particular, `Compiler::fgComputeLife{Call,Local}` now have function headers.
Diffstat (limited to 'src/jit/liveness.cpp')
-rw-r--r--src/jit/liveness.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/jit/liveness.cpp b/src/jit/liveness.cpp
index 65c7e81556..b761bb21cb 100644
--- a/src/jit/liveness.cpp
+++ b/src/jit/liveness.cpp
@@ -1518,6 +1518,14 @@ VARSET_VALRET_TP Compiler::fgUpdateLiveSet(VARSET_VALARG_TP liveSet,
return newLiveSet;
}
+//------------------------------------------------------------------------
+// Compiler::fgComputeLifeCall: compute the changes to local var liveness
+// due to a GT_CALL node.
+//
+// Arguments:
+// life - The live set that is being computed.
+// call - The call node in question.
+//
void Compiler::fgComputeLifeCall(VARSET_TP& life, GenTreeCall* call)
{
assert(call != nullptr);
@@ -1632,6 +1640,25 @@ void Compiler::fgComputeLifeCall(VARSET_TP& life, GenTreeCall* call)
}
}
+//------------------------------------------------------------------------
+// Compiler::fgComputeLifeLocal: compute the changes to local var liveness
+// due to a use or a def of a local var and
+// indicates wither the use/def is a dead
+// store.
+//
+// Arguments:
+// life - The live set that is being computed.
+// keepAliveVars - The currents set of variables to keep alive
+// regardless of their actual lifetime.
+// lclVarNode - The node that corresponds to the local var def or
+// use. Only differs from `node` when targeting the
+// legacy backend.
+// node - The actual tree node being processed.
+//
+// Returns:
+// `true` if the local var node corresponds to a dead store; `false`
+// otherwise.
+//
bool Compiler::fgComputeLifeLocal(VARSET_TP& life, VARSET_TP& keepAliveVars, GenTree* lclVarNode, GenTree* node)
{
unsigned lclNum = lclVarNode->gtLclVarCommon.gtLclNum;