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

Unified Diff: src/IceCfgNode.cpp

Issue 1113133002: Subzero: Also dump live-end info for stack vars under -asm-verbose. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 8 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 | no next file » | 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 b5e9d86613c38466a5c6a93436edb461164a2aed..a9b34fc6cd029b4dab305cf84b64b83537c3642a 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -824,15 +824,14 @@ void emitLiveRangesEnded(Ostream &Str, const Cfg *Func, const Inst *Instr,
SizeT NumVars = Src->getNumVars();
for (SizeT J = 0; J < NumVars; ++J) {
const Variable *Var = Src->getVar(J);
- if (Var->hasReg()) {
- if (Instr->isLastUse(Var) && --LiveRegCount[Var->getRegNum()] == 0) {
- if (First)
- Str << " \t# END=";
- else
- Str << ",";
- Var->emit(Func);
- First = false;
- }
+ if (Instr->isLastUse(Var) &&
+ (!Var->hasReg() || --LiveRegCount[Var->getRegNum()] == 0)) {
+ if (First)
+ Str << " \t# END=";
+ else
+ Str << ",";
+ Var->emit(Func);
+ First = false;
}
}
}
@@ -870,8 +869,10 @@ void CfgNode::emit(Cfg *Func) const {
Liveness && Func->getContext()->getFlags().getDecorateAsm();
Str << getAsmName() << ":\n";
std::vector<SizeT> LiveRegCount(Func->getTarget()->getNumRegisters());
- if (DecorateAsm)
- emitRegisterUsage(Str, Func, this, true, LiveRegCount);
+ if (DecorateAsm) {
+ const bool IsLiveIn = true;
+ emitRegisterUsage(Str, Func, this, IsLiveIn, LiveRegCount);
+ }
for (const Inst &I : Phis) {
if (I.isDeleted())
@@ -894,8 +895,10 @@ void CfgNode::emit(Cfg *Func) const {
Str << "\n";
updateStats(Func, &I);
}
- if (DecorateAsm)
- emitRegisterUsage(Str, Func, this, false, LiveRegCount);
+ if (DecorateAsm) {
+ const bool IsLiveIn = false;
+ emitRegisterUsage(Str, Func, this, IsLiveIn, LiveRegCount);
+ }
}
// Helper class for emitIAS().
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698