-
Notifications
You must be signed in to change notification settings - Fork 190
Description
Clear and concise description of the problem
Tai-e currently logs when an analysis (including IRBuilder, PointerAnalysis, and so on) reaches its end, but barely logs the starting. This may make the log a little bit ambiguous:
In the following example, I ran the same analysis twice, the first one without --world-cache-mode while the second with --world-cache-mode.
As the red line shows, the runtime of pointer analysis on the right hand side is much faster! This could be a little misleading as pta starts ... comes after the IR is created.
After consulting a core developer, I found that this is because of the timing logic.
When --world-cache-mode is off or the cache is not ready, the analysis is like:
PointerAnalysisstarts timingPointerAnalysiscalls theIRBuilderand therefore count the IR building time into the overall time cost.PointerAnalysisstarts its main logic (with the logpta starts ...)PointerAnalysisfinishes timing
But when one of the following is satisfied:
a) --world-cache-mode is on and the cache is ready
b) --pre-build-ir is on
The analysis is like:
IRBuilderbuilds/loads the IR.PointerAnalysisstarts timingPointerAnalysisfinds that IR is already there and starts its main logic immediatelyPointerAnalysisfinishes timing
Therefore, the IR building time is included in the first setting but excluded in the second setting. This could be a little misleading and confusing as the user cannot tell this fact from the log.
Impact Analysis
No response
Suggested Solution
No response
Alternative
No response
Intention to submit PR
No
Additional Context
No response