[英]Where can I find the llvm -stats information
I am running the command line 我正在运行命令行
opt test.bc -loop-vectorize -o test2.bc -stats
to check the statistics collected by the LLVM
loop vectorize pass. 检查
LLVM
循环矢量化传递收集的统计信息。 However, after running the command, I only get the test2.bc without getting any stats printed. 但是,运行命令后,我仅获得了test2.bc,而未打印任何统计信息。 May I know where should I look for these stats?
我可以知道在哪里可以找到这些统计信息吗?
Thanks in advance, T 预先感谢,T
They should be printed on your terminal after the command has finished executing. 命令完成执行后,应将它们打印在终端上。 However, your
LLVM
needs to be built with assertions enabled, documented here : 但是,您的
LLVM
需要在启用了断言的情况下构建, 在此处记录 :
Note that in order to use the '-stats' option, LLVM must be compiled with assertions enabled.
请注意,为了使用“ -stats”选项,必须在启用断言的情况下编译LLVM。
This corresponds to this cmake
flag, if you are building LLVM
from source: 如果要从源代码构建
LLVM
,则与该cmake
标志相对应:
-DLLVM_ENABLE_ASSERTIONS=On
Moreover, you can query a specific LLVM
installation for its assertion mode using: 此外,您可以使用以下命令查询特定的
LLVM
安装的断言模式:
llvm-config --assertion-mode
If assertions are enabled, then it should return ON
. 如果启用了断言,则它应返回
ON
。
For code introspection of this feature, the corresponding preprocessor definition is 对于此功能的代码自省,相应的预处理器定义为
LLVM_ENABLE_STATS
or when NDEBUG
is not defined, as seen in the include/llvm/Support/Statistic.h
header file. 或当
NDEBUG
没有被定义,如在所述include/llvm/Support/Statistic.h
头文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.