int main(int argc, char *argv[]) { startCatchingSignals(); { astlocMarker markAstLoc(0, "<internal>"); initFlags(); initChplProgram(); initPrimitive(); initPrimitiveTypes(); initTheProgram(); setupOrderedGlobals(argv[0]); compute_program_name_loc(argv[0], &(arg_state.program_name), &(arg_state.program_loc)); process_args(&arg_state, argc, argv); initCompilerGlobals(); // must follow argument parsing setupDependentVars(); setupModulePaths(); recordCodeGenStrings(argc, argv); } // astlocMarker scope printStuff(argv[0]); if (rungdb) runCompilerInGDB(argc, argv); if (fdump_html || strcmp(log_flags, "")) init_logs(); compile_all(); if (fEnableTimers) { printf("timer 1: %8.3lf\n", timer1.elapsed()); printf("timer 2: %8.3lf\n", timer2.elapsed()); printf("timer 3: %8.3lf\n", timer3.elapsed()); printf("timer 4: %8.3lf\n", timer4.elapsed()); printf("timer 5: %8.3lf\n", timer5.elapsed()); } free_args(&arg_state); clean_exit(0); return 0; }
int main(int argc, char* argv[]) { PhaseTracker tracker; startCatchingSignals(); { astlocMarker markAstLoc(0, "<internal>"); tracker.StartPhase("init"); initFlags(); initChplProgram(); initPrimitive(); initPrimitiveTypes(); initTheProgram(); setupOrderedGlobals(argv[0]); compute_program_name_loc(argv[0], &(arg_state.program_name), &(arg_state.program_loc)); process_args(&arg_state, argc, argv); initCompilerGlobals(); // must follow argument parsing setupDependentVars(); setupModulePaths(); recordCodeGenStrings(argc, argv); } // astlocMarker scope printStuff(argv[0]); if (rungdb) runCompilerInGDB(argc, argv); if (runlldb) runCompilerInLLDB(argc, argv); testInputFiles(arg_state.nfile_arguments, arg_state.file_argument); if (strcmp(chplBinaryName, "chpldoc") == 0) fDocs = true; runPasses(tracker); tracker.StartPhase("driverCleanup"); if (fEnableTimers) { printf("timer 1: %8.3lf\n", timer1.elapsedSecs()); printf("timer 2: %8.3lf\n", timer2.elapsedSecs()); printf("timer 3: %8.3lf\n", timer3.elapsedSecs()); printf("timer 4: %8.3lf\n", timer4.elapsedSecs()); printf("timer 5: %8.3lf\n", timer5.elapsedSecs()); } free_args(&arg_state); tracker.Stop(); if (printPasses == true || printPassesFile != NULL) { tracker.ReportPass(); tracker.ReportTotal(); tracker.ReportRollup(); } if (printPassesFile != NULL) { fclose(printPassesFile); } clean_exit(0); return 0; }