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

Unified Diff: src/llvm2ice.cpp

Issue 610813002: Subzero: Rewrite the pass timing infrastructure. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Make the optimized overlaps() implementation actually correct Created 6 years, 3 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
« src/IceOperand.cpp ('K') | « src/PNaClTranslator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/llvm2ice.cpp
diff --git a/src/llvm2ice.cpp b/src/llvm2ice.cpp
index 515e2fe9fbcdde58d5a58febb5f50304be2741c6..7f1fc38773d9c7e3626ea3500be31bba257c900b 100644
--- a/src/llvm2ice.cpp
+++ b/src/llvm2ice.cpp
@@ -44,7 +44,6 @@ static cl::list<Ice::VerboseItem> VerboseList(
clEnumValN(Ice::IceV_RegOrigins, "orig", "Physical register origins"),
clEnumValN(Ice::IceV_LinearScan, "regalloc", "Linear scan details"),
clEnumValN(Ice::IceV_Frame, "frame", "Stack frame layout details"),
- clEnumValN(Ice::IceV_Timing, "time", "Pass timing details"),
clEnumValN(Ice::IceV_AddrOpt, "addropt", "Address mode optimization"),
clEnumValN(Ice::IceV_All, "all", "Use all verbose options"),
clEnumValN(Ice::IceV_Most, "most",
@@ -175,6 +174,8 @@ int main(int argc, char **argv) {
Ice::GlobalContext Ctx(Ls, Os, VMask, TargetArch, OptLevel, TestPrefix,
Flags);
+ static Ice::TimerIdT IDszmain = Ice::GlobalContext::getTimerID("szmain");
+ Ice::TimerMarker T(IDszmain, &Ctx);
int ErrorStatus = 0;
if (BuildOnRead) {
@@ -184,15 +185,11 @@ int main(int argc, char **argv) {
} else {
// Parse the input LLVM IR file into a module.
SMDiagnostic Err;
- Ice::Timer T;
+ static Ice::TimerIdT IDparse = Ice::GlobalContext::getTimerID("parse");
+ Ice::TimerMarker T1(IDparse, &Ctx);
Module *Mod =
NaClParseIRFile(IRFilename, InputFileFormat, Err, getGlobalContext());
- if (SubzeroTimingEnabled) {
- std::cerr << "[Subzero timing] IR Parsing: " << T.getElapsedSec()
- << " sec\n";
- }
-
if (!Mod) {
Err.print(argv[0], errs());
return 1;
@@ -202,6 +199,8 @@ int main(int argc, char **argv) {
Converter.convertToIce();
ErrorStatus = Converter.getErrorStatus();
}
+ if (SubzeroTimingEnabled)
+ Ctx.dumpTimers();
const bool FinalStats = true;
Ctx.dumpStats("_FINAL_", FinalStats);
return ErrorStatus;
« src/IceOperand.cpp ('K') | « src/PNaClTranslator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698