You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
PointerAnalysis starts timing
PointerAnalysis calls the IRBuilder and therefore count the IR building time into the overall time cost.
PointerAnalysis starts its main logic (with the log pta starts ...)
PointerAnalysis finishes 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:
IRBuilder builds/loads the IR.
PointerAnalysis starts timing
PointerAnalysis finds that IR is already there and starts its main logic immediately
PointerAnalysis finishes 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.
Activity
[-]A Better Timing Structure[/-][+]A Clearer Timing/Logging Format in `tai-e.log`[/+]zhangt2333 commentedon Aug 6, 2025
This is unrelated to
--world-cache-mode. For time-sensitive analysis, it is recommended to enable--pre-build-ir.I have opened a PR to explain the timing issue. #182