Ignore:
Timestamp:
Mar 5, 2019, 3:08:46 PM (6 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
972540e
Parents:
3c0d4cd
Message:

Fixed error for % of parent printing in timing sections and added more timing instrumentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r3c0d4cd rc884f2d  
    315315                        Stats::Heap::newPass("validate-B");
    316316                        Stats::Time::BlockGuard guard("validate-B");
    317                         acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions
    318                         mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes, because aggregate members are accessed
    319                         HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order
    320                         EliminateTypedef::eliminateTypedef( translationUnit ); //
     317                        Stats::Time::TimeBlock("Link Reference To Types", [&]() {
     318                                acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions
     319                        });
     320                        Stats::Time::TimeBlock("Fix Qualified Types", [&]() {
     321                                mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes, because aggregate members are accessed
     322                        });
     323                        Stats::Time::TimeBlock("Hoist Structs", [&]() {
     324                                HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order
     325                        });
     326                        Stats::Time::TimeBlock("Eliminate Typedefs", [&]() {
     327                                EliminateTypedef::eliminateTypedef( translationUnit ); //
     328                        });
    321329                }
    322330                {
     
    331339                        Stats::Heap::newPass("validate-D");
    332340                        Stats::Time::BlockGuard guard("validate-D");
    333                         Concurrency::applyKeywords( translationUnit );
    334                         acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution
    335                         ControlStruct::hoistControlDecls( translationUnit );  // hoist initialization out of for statements; must happen before autogenerateRoutines
    336                         autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay
     341                        Stats::Time::TimeBlock("Apply Concurrent Keywords", [&]() {
     342                                Concurrency::applyKeywords( translationUnit );
     343                        });
     344                        Stats::Time::TimeBlock("Forall Pointer Decay", [&]() {
     345                                acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution
     346                        });
     347                        Stats::Time::TimeBlock("Hoist Control Declarations", [&]() {
     348                                ControlStruct::hoistControlDecls( translationUnit );  // hoist initialization out of for statements; must happen before autogenerateRoutines
     349                        });
     350                        Stats::Time::TimeBlock("Generate Autogen routines", [&]() {
     351                                autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay
     352                        });
    337353                }
    338354                {
    339355                        Stats::Heap::newPass("validate-E");
    340356                        Stats::Time::BlockGuard guard("validate-E");
    341                         Concurrency::implementMutexFuncs( translationUnit );
    342                         Concurrency::implementThreadStarter( translationUnit );
    343                         mutateAll( translationUnit, compoundliteral );
    344                         ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables
     357                        Stats::Time::TimeBlock("Implement Mutex Func", [&]() {
     358                                Concurrency::implementMutexFuncs( translationUnit );
     359                        });
     360                        Stats::Time::TimeBlock("Implement Thread Start", [&]() {
     361                                Concurrency::implementThreadStarter( translationUnit );
     362                        });
     363                        Stats::Time::TimeBlock("Compound Literal", [&]() {
     364                                mutateAll( translationUnit, compoundliteral );
     365                        });
     366                        Stats::Time::TimeBlock("Resolve With Expressions", [&]() {
     367                                ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables
     368                        });
    345369                }
    346370                {
    347371                        Stats::Heap::newPass("validate-F");
    348372                        Stats::Time::BlockGuard guard("validate-F");
    349                         FixObjectType::fix( translationUnit );
    350                         ArrayLength::computeLength( translationUnit );
    351                         acceptAll( translationUnit, finder ); // xxx - remove this pass soon
    352                         mutateAll( translationUnit, labelAddrFixer );
    353                         Validate::handleAttributes( translationUnit );
     373                        Stats::Time::TimeBlock("Fix Object Type", [&]() {
     374                                FixObjectType::fix( translationUnit );
     375                        });
     376                        Stats::Time::TimeBlock("Array Length", [&]() {
     377                                ArrayLength::computeLength( translationUnit );
     378                        });
     379                        Stats::Time::TimeBlock("Find Special Declarations", [&]() {
     380                                acceptAll( translationUnit, finder ); // xxx - remove this pass soon
     381                        });
     382                        Stats::Time::TimeBlock("Fix Label Address", [&]() {
     383                                mutateAll( translationUnit, labelAddrFixer );
     384                        });
     385                        Stats::Time::TimeBlock("Handle Attributes", [&]() {
     386                                Validate::handleAttributes( translationUnit );
     387                        });
    354388                }
    355389        }
Note: See TracChangeset for help on using the changeset viewer.