summaryrefslogtreecommitdiffstats
path: root/llvm/test/Other/time-passes.ll
Commit message (Collapse)AuthorAgeFilesLines
* [PassTimingInfo] Stop double (or worse) counting passes/analysesArthur Eubanks2022-10-131-12/+17
| | | | | | | | | | | | | | If we nest timers, we end up double counting anything nested. The most egregious is ModuleInlinerWrapperPass/DevirtSCCRepeatedPass showing up as >20% of the total time when they're just wrappers. Analyses also end up getting counted multiple times because they're nested inside wrappers and passes. Ignore ModuleInlinerWrapperPass/DevirtSCCRepeatedPass and put analyses into their own TimerGroup. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D135219
* [test] Remove legacy PM tests in llvm/test/OtherArthur Eubanks2021-09-021-58/+40
| | | | Differential Revision: https://reviews.llvm.org/D109180
* [LICM] Remove AST-based implementationNikita Popov2021-08-181-4/+4
| | | | | | | | | | | | MSSA-based LICM has been enabled by default for a few years now. This drops the old AST-based implementation. Using loop(licm) will result in a fatal error, the use of loop-mssa(licm) is required (or just licm, which defaults to loop-mssa). Note that the core canSinkOrHoistInst() logic has to retain AST support for now, because it is shared with LoopSink. Differential Revision: https://reviews.llvm.org/D108244
* [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control ↵Yuanfang Chen2020-12-081-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | the pass timing aggregation Currently, -ftime-report + new pass manager emits one line of report for each pass run. This potentially causes huge output text especially with regular LTO or large single file (Obeserved in private tests and was reported in D51276). The behaviour of -ftime-report + legacy pass manager is emitting one line of report for each pass object which has relatively reasonable text output size. This patch adds a flag `-ftime-report=` to control time report aggregation for new pass manager. The flag is for new pass manager only. Using it with legacy pass manager gives an error. It is a driver and cc1 flag. `per-pass` is the new default so `-ftime-report` is aliased to `-ftime-report=per-pass`. Before this patch, functionality-wise `-ftime-report` is aliased to `-ftime-report=per-pass-run`. * Adds an boolean variable TimePassesHandler::PerRun to control per-pass vs per-pass-run. * Adds a new clang CodeGen flag CodeGenOptions::TimePassesPerRun to work with the existing CodeGenOptions::TimePasses. * Remove FrontendOptions::ShowTimers, its uses are replaced by the existing CodeGenOptions::TimePasses. * Remove FrontendTimesIsEnabled (It was introduced in D45619 which was largely reverted.) Differential Revision: https://reviews.llvm.org/D92436
* [NewPM] Pin various tests under Other/ to legacy PMArthur Eubanks2020-08-171-3/+3
| | | | | | | | These all are legacy PM-specific or have a corresponding NPM RUN line. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D86124
* [TimePasses] allow -time-passes reporting into a custom streamFedor Sergeev2019-03-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | TimePassesHandler object (implementation of time-passes for new pass manager) gains ability to report into a stream customizable per-instance (per pipeline). Intended use is to specify separate time-passes output stream per each compilation, setting up TimePasses member of StandardInstrumentation during PassBuilder setup. That allows to get independent non-overlapping pass-times reports for parallel independent compilations (in JIT-like setups). By default it still puts timing reports into the info-output-file stream (created by CreateInfoOutputFile every time report is requested). Unit-test added for non-default case, and it also allowed to discover that print() does not work as declared - it did not reset the timers, leading to yet another report being printed into the default stream. Fixed print() to actually reset timers according to what was declared in print's comments before. Reviewed By: philip.pfaffe Differential Revision: https://reviews.llvm.org/D59366 llvm-svn: 356305
* [New PM][PassTiming] implement -time-passes for the new pass managerFedor Sergeev2018-10-051-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable time-passes functionality through PassInstrumentation callbacks for passes and analyses. TimePassesHandler class keeps all the callbacks, the timing data as it is being collected as well as the stack of currently active timers. Parts of the fix that might be somewhat unobvious: - mapping of passes into Timer (TimingData) can not be done per-instance. PassID name provided into the callback is common for all the pass invocations. Thus the only way to get a timing with reasonable granularity is to collect timing data per pass invocation, getting a new timer for each BeforePass. Hence the key for TimingData uses a pair of <StringRef/unsigned count> to uniquely identify a pass invocation. - consequently, this new-pass-manager implementation performs no aggregation of timing data, reporting timings for each pass invocation separately. In that it differs from legacy-pass-manager time-passes implementation that reports timing data aggregated per pass instance. - pass managers and adaptors are not tracked, similar to how pass managers are not tracked in legacy time-passes. - TimerStack tracks timers that are active, each BeforePass pushes the new timer on stack, each AfterPass pops active timer from stack and stops it. Reviewers: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D51276 llvm-svn: 343898
* [NFC] correcting patterns in time-passes test to fix buildbotFedor Sergeev2018-09-041-2/+2
| | | | llvm-svn: 341348
* [PassTiming] reporting time-passes separately for multiple pass instances of ↵Fedor Sergeev2018-09-041-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | the same pass Summary: Refactoring done by rL340872 accidentally appeared to be non-NFC, changing the way how multiple instances of the same pass are handled - aggregation of results by PassName forced data for multiple instances to be merged together and reported as one line. Getting back to creating/reporting timers per pass instance. Reporting was a bit enhanced by counting pass instances and adding #<num> suffix to the pass description. Note that it is instances that are being counted, not invocations of them. time-passes test updated to account for multiple passes being run. Reviewers: paquette, jhenderson, MatzeB, skatkov Reviewed By: skatkov Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51535 llvm-svn: 341346
* NFC. fixing time-passes test failure on Windows.Fedor Sergeev2018-08-291-1/+1
| | | | llvm-svn: 340893
* [NFC][PassTiming] factor out generic PassTimingInfoFedor Sergeev2018-08-281-0/+15
Moving PassTimingInfo from legacy pass manager code into a separate header. Making it suitable for both legacy and new pass manager. Adding a test on -time-passes main functionality. llvm-svn: 340872