[all-commits] [llvm/llvm-project] 182126: [Time-report] Add a flag -ftime-report={per-pass, p...
Yuanfang Chen via All-commits
all-commits at lists.llvm.org
Tue Dec 8 10:14:05 PST 2020
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1821265db681cd2289fce9331e3aed26bdf814e3
https://github.com/llvm/llvm-project/commit/1821265db681cd2289fce9331e3aed26bdf814e3
Author: Yuanfang Chen <yuanfang.chen at sony.com>
Date: 2020-12-08 (Tue, 08 Dec 2020)
Changed paths:
M clang/include/clang/Basic/CodeGenOptions.def
M clang/include/clang/Driver/Options.td
M clang/include/clang/Frontend/FrontendOptions.h
M clang/include/clang/Frontend/Utils.h
M clang/lib/CodeGen/BackendUtil.cpp
M clang/lib/CodeGen/CodeGenAction.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Frontend/CMakeLists.txt
M clang/lib/Frontend/CompilerInstance.cpp
M clang/lib/Frontend/CompilerInvocation.cpp
R clang/lib/Frontend/FrontendTiming.cpp
A clang/test/Driver/time-report.c
A clang/test/Misc/time-passes.c
M llvm/include/llvm/IR/PassTimingInfo.h
M llvm/include/llvm/Pass.h
M llvm/lib/IR/PassTimingInfo.cpp
M llvm/test/Other/time-passes.ll
Log Message:
-----------
[Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control 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
More information about the All-commits
mailing list