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

Side by Side Diff: src/IceCfg.cpp

Issue 1775603002: Fix timing of parseFunctions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/IceCompiler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 // Emit the assembly directly so we don't need to hang on to all the names 1020 // Emit the assembly directly so we don't need to hang on to all the names
1021 for (const InstJumpTable *JumpTable : JumpTables) 1021 for (const InstJumpTable *JumpTable : JumpTables)
1022 getTarget()->emitJumpTable(this, JumpTable); 1022 getTarget()->emitJumpTable(this, JumpTable);
1023 } break; 1023 } break;
1024 } 1024 }
1025 } 1025 }
1026 1026
1027 void Cfg::emit() { 1027 void Cfg::emit() {
1028 if (!BuildDefs::dump()) 1028 if (!BuildDefs::dump())
1029 return; 1029 return;
1030 TimerMarker T(TimerStack::TT_emit, this); 1030 TimerMarker T(TimerStack::TT_emitAsm, this);
1031 if (Ctx->getFlags().getDecorateAsm()) { 1031 if (Ctx->getFlags().getDecorateAsm()) {
1032 renumberInstructions(); 1032 renumberInstructions();
1033 getVMetadata()->init(VMK_Uses); 1033 getVMetadata()->init(VMK_Uses);
1034 liveness(Liveness_Basic); 1034 liveness(Liveness_Basic);
1035 dump("After recomputing liveness for -decorate-asm"); 1035 dump("After recomputing liveness for -decorate-asm");
1036 } 1036 }
1037 OstreamLocker L(Ctx); 1037 OstreamLocker L(Ctx);
1038 Ostream &Str = Ctx->getStrEmit(); 1038 Ostream &Str = Ctx->getStrEmit();
1039 const Assembler *Asm = getAssembler<>(); 1039 const Assembler *Asm = getAssembler<>();
1040 const bool NeedSandboxing = Ctx->getFlags().getUseSandboxing(); 1040 const bool NeedSandboxing = Ctx->getFlags().getUseSandboxing();
(...skipping 13 matching lines...) Expand all
1054 Str << "\t" << Asm->getAlignDirective() << " " 1054 Str << "\t" << Asm->getAlignDirective() << " "
1055 << Asm->getBundleAlignLog2Bytes() << "\n"; 1055 << Asm->getBundleAlignLog2Bytes() << "\n";
1056 } 1056 }
1057 Node->emit(this); 1057 Node->emit(this);
1058 } 1058 }
1059 emitJumpTables(); 1059 emitJumpTables();
1060 Str << "\n"; 1060 Str << "\n";
1061 } 1061 }
1062 1062
1063 void Cfg::emitIAS() { 1063 void Cfg::emitIAS() {
1064 TimerMarker T(TimerStack::TT_emit, this); 1064 TimerMarker T(TimerStack::TT_emitAsm, this);
1065 // The emitIAS() routines emit into the internal assembler buffer, so there's 1065 // The emitIAS() routines emit into the internal assembler buffer, so there's
1066 // no need to lock the streams. 1066 // no need to lock the streams.
1067 deleteJumpTableInsts(); 1067 deleteJumpTableInsts();
1068 const bool NeedSandboxing = Ctx->getFlags().getUseSandboxing(); 1068 const bool NeedSandboxing = Ctx->getFlags().getUseSandboxing();
1069 for (CfgNode *Node : Nodes) { 1069 for (CfgNode *Node : Nodes) {
1070 if (NeedSandboxing && Node->needsAlignment()) 1070 if (NeedSandboxing && Node->needsAlignment())
1071 getAssembler()->alignCfgNode(); 1071 getAssembler()->alignCfgNode();
1072 Node->emitIAS(this); 1072 Node->emitIAS(this);
1073 } 1073 }
1074 emitJumpTables(); 1074 emitJumpTables();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 } 1143 }
1144 } 1144 }
1145 // Print each basic block 1145 // Print each basic block
1146 for (CfgNode *Node : Nodes) 1146 for (CfgNode *Node : Nodes)
1147 Node->dump(this); 1147 Node->dump(this);
1148 if (isVerbose(IceV_Instructions)) 1148 if (isVerbose(IceV_Instructions))
1149 Str << "}\n"; 1149 Str << "}\n";
1150 } 1150 }
1151 1151
1152 } // end of namespace Ice 1152 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceCompiler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698