-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Labels
enhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing featurellvm:core
Description
Consider:
$ clang -O2 -c t.cpp -ftime-report |& wc -l
381
$ clang -O2 -c t.cpp -ftime-report |& tail -20
.... lots of lines
0.0000 ( 0.0%) 0.0000 ( 0.1%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) Assumption Cache Tracker
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) Machine Branch Probability Analysis
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) Profile summary info
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) Scoped NoAlias Alias Analysis
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) Type-Based Alias Analysis
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) Target Pass Configuration
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) Target Transform Information
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) Default Regalloc Eviction Advisor
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) Default Regalloc Priority Advisor
0.0031 (100.0%) 0.0045 (100.0%) 0.0077 (100.0%) 0.0077 (100.0%) Total
...
These passes that take very little time are just not interesting, and we should drop them from the list to make the time-report output more readable. This comes up again and again internally, where we frequently use -ftime-report
to identify which pass is exhibiting superlinear runtime in PGO/LTO builds.
LLVM should have some configurable mechanism with a better default that reduces this output to only show the top 10 passes, passes that take less than 5% of overall pass pipeline time, or something else. The time trace tool has -ftime-trace-granularity=
which solves a similar but different problem for -ftime-trace
.
fhahn
Metadata
Metadata
Assignees
Labels
enhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing featurellvm:core