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

Unified Diff: src/IceCfgNode.cpp

Issue 1399523003: Subzero: Don't bother printing stack/frame ptr as part of LiveIn/LiveOut. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | src/IceTargetLowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfgNode.cpp
diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp
index fe1d359aab048513cf8f18395a497df4680bc337..2bcea9ad255da9671ab0817fda8f678c86fbb3e0 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -883,6 +883,8 @@ void emitRegisterUsage(Ostream &Str, const Cfg *Func, const CfgNode *Node,
return;
Liveness *Liveness = Func->getLiveness();
const LivenessBV *Live;
+ const int32_t StackReg = Func->getTarget()->getStackReg();
+ const int32_t FrameOrStackReg = Func->getTarget()->getFrameOrStackReg();
if (IsLiveIn) {
Live = &Liveness->getLiveIn(Node);
Str << "\t\t\t\t# LiveIn=";
@@ -893,14 +895,17 @@ void emitRegisterUsage(Ostream &Str, const Cfg *Func, const CfgNode *Node,
if (!Live->empty()) {
CfgVector<Variable *> LiveRegs;
for (SizeT i = 0; i < Live->size(); ++i) {
- if ((*Live)[i]) {
- Variable *Var = Liveness->getVariable(i, Node);
- if (Var->hasReg()) {
- if (IsLiveIn)
- ++LiveRegCount[Var->getRegNum()];
- LiveRegs.push_back(Var);
- }
- }
+ if (!(*Live)[i])
+ continue;
+ Variable *Var = Liveness->getVariable(i, Node);
+ if (!Var->hasReg())
+ continue;
+ const int32_t RegNum = Var->getRegNum();
+ if (RegNum == StackReg || RegNum == FrameOrStackReg)
+ continue;
+ if (IsLiveIn)
+ ++LiveRegCount[RegNum];
+ LiveRegs.push_back(Var);
}
// Sort the variables by regnum so they are always printed in a familiar
// order.
« no previous file with comments | « no previous file | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698