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

Unified Diff: src/IceCfg.cpp

Issue 673783002: Subzero: Improve debugging controls, plus minor refactoring. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 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/IceCfgNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index cc779083f7d64156f4803f4e63c30ec461109280..ed962d151f43b11d980ede9898db01912ee843f7 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -65,17 +65,12 @@ bool Cfg::hasComputedFrame() const { return getTarget()->hasComputedFrame(); }
void Cfg::translate() {
if (hasError())
return;
- VerboseMask OldVerboseMask = getContext()->getVerbose();
const IceString &TimingFocusOn = getContext()->getFlags().TimingFocusOn;
if (TimingFocusOn == "*" || TimingFocusOn == getFunctionName()) {
setFocusedTiming();
getContext()->resetTimer(GlobalContext::TSK_Default);
getContext()->setTimerName(GlobalContext::TSK_Default, getFunctionName());
}
- bool VerboseFocus =
- (getContext()->getFlags().VerboseFocusOn == getFunctionName());
- if (VerboseFocus)
- getContext()->setVerbose(IceV_All);
TimerMarker T(TimerStack::TT_translate, this);
dump("Initial CFG");
@@ -87,8 +82,6 @@ void Cfg::translate() {
dump("Final output");
if (getFocusedTiming())
getContext()->dumpTimers();
- if (VerboseFocus)
- getContext()->setVerbose(OldVerboseMask);
}
void Cfg::computePredecessors() {
@@ -150,9 +143,6 @@ void Cfg::genCode() {
void Cfg::genFrame() {
TimerMarker T(TimerStack::TT_genFrame, this);
getTarget()->addProlog(Entry);
- // TODO: Consider folding epilog generation into the final
- // emission/assembly pass to avoid an extra iteration over the node
- // list. Or keep a separate list of exit nodes.
for (CfgNode *Node : Nodes)
if (Node->getHasReturn())
getTarget()->addEpilog(Node);
@@ -323,7 +313,7 @@ void Cfg::emit() {
IceString MangledName = getContext()->mangleName(getFunctionName());
if (Ctx->getFlags().FunctionSections)
Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n";
- if (!getInternal()) {
+ if (!getInternal() || Ctx->getFlags().DisableInternal) {
Str << "\t.globl\t" << MangledName << "\n";
Str << "\t.type\t" << MangledName << ",@function\n";
}
@@ -347,7 +337,7 @@ void Cfg::dump(const IceString &Message) {
// Print function name+args
if (getContext()->isVerbose(IceV_Instructions)) {
Str << "define ";
- if (getInternal())
+ if (getInternal() && !Ctx->getFlags().DisableInternal)
Str << "internal ";
Str << ReturnType << " @" << Ctx->mangleName(getFunctionName()) << "(";
for (SizeT i = 0; i < Args.size(); ++i) {
« no previous file with comments | « no previous file | src/IceCfgNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698