llvm-project/llvm/lib/Passes
Junduo Dong 6975ab7126 [Clang] Reimplement time tracing of NewPassManager by PassInstrumentation framework
The previous implementation of time tracing in NewPassManager is direct but messive.

The key codes are like the demo below:
```
  /// Runs the function pass across every function in the module.
  PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM,
                        LazyCallGraph &CG, CGSCCUpdateResult &UR) {
      /// ...
      PreservedAnalyses PassPA;
      {
        TimeTraceScope TimeScope(Pass.name());
        PassPA = Pass.run(F, FAM);
      }
      /// ...
 }
```

It can be bothered to judge where should we add the tracing codes by hands.

With the PassInstrumentation framework, we can easily add `Before/After` callback
functions to add time tracing codes.

Differential Revision: https://reviews.llvm.org/D131960
2022-09-11 05:42:55 -07:00
..
CMakeLists.txt [NFC] Split up PassBuilder.cpp 2021-09-15 15:30:39 -07:00
OptimizationLevel.cpp [NFC] Split up PassBuilder.cpp 2021-09-15 15:30:39 -07:00
PassBuilder.cpp [NewPM] Switch -filter-passes from ClassName to pass-name 2022-09-07 22:02:26 -07:00
PassBuilderBindings.cpp [Coroutines] Run coroutine passes by default 2021-07-15 14:33:40 +08:00
PassBuilderPipelines.cpp [pipelines] OptimizerEarlyEPCallbacks for ThinLTO prelink 2022-09-06 15:54:04 -07:00
PassPlugin.cpp [NPM] Resolve llvmGetPassPluginInfo to the plugin being loaded 2021-06-30 18:11:28 +01:00
PassRegistry.def [SanitizerBinaryMetadata] Introduce SanitizerBinaryMetadata instrumentation pass 2022-09-07 21:25:40 +02:00
StandardInstrumentations.cpp [Clang] Reimplement time tracing of NewPassManager by PassInstrumentation framework 2022-09-11 05:42:55 -07:00