如何在VS2008中,输出intel编译器的Qvec-report

CandPointer 2010-10-18 06:32:41
我使用的是
Intel C++ Compiler 11.1.038
Visual Studio 2008 professional


如何才能在Visual Studio的output窗口,显示intel编译器的Vectorization report,就像显示intel编译器输出的error和warning一样。



我已经在Visual Studio 的Configuration Properties 里面的 C/C++ > Command Line 里面的Additional options: 添加了/Qvec-report3

可是,我在 Visual Studio的 Output 里面,看不到类似“LOOP WAS VECTORIZED”之类的信息。(同样的代码,在cmd窗口里面,用icl /QxHost /Qvec-report:3 mApLoader.c 就能看到显示的remark:LOOP WAS VECTORIZED)

只能看到
1>------ Rebuild All started: Project: mApLoader, Configuration: Debug x64 ------
1>Deleting intermediate files and output files for project 'mApLoader', configuration 'Debug|x64'.
1>Compiling with Intel(R) C++ 11.1.038 [Intel(R) 64]... (Intel C++ Environment)
1>mApLoader.c
1>Compiling manifest to resources... (Microsoft VC++ Environment)
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>
...全文
214 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
intel_iclifort 2010-10-21
  • 打赏
  • 举报
回复
呵呵,手册中的例子确实有问题的(输出和不输出都是完全一样的命令行,汗啊),需要在将来的版本中改正

Reference ID#: DPD200161999
CandPointer 2010-10-21
  • 打赏
  • 举报
回复
啊,太好了,太感谢intel_iclifort了。
明天,可以结贴了。

终于,能够在Visual Studio 的Output窗口,直接根据“loop was not vectorized”之类的提示,双击,就可以调到编辑器中相应的代码中修改了。很方便。


有个疑问,手册中,这么一句话:
Usage with Other Options 中的 “If you use the following option combinations, the compiler issues a warning and does not generate a report:”

可是,实际上在Visual studio 中的output里面,并没有没有issues a warning,没有提示我“编译参数有冲突”。



我原来,用命令行,试验的时候,也胡乱翻了手册。
手册中,居然有这么一段(ms-help://MS.VSCC.v90/MS.VSIPCC.v90/intel.cppprodocs.en/intel.cprocompilerdocs.en/main_cls/optaps/common/optaps_perf_vecrep.htm)

Vectorization Report -> Usage with Other Options


The following commands generate a vectorization report:
icl /QxSSSE3 /Qvec-report:3 sample.cpp
icl /QxSSSE3 /Qipo /Qvec-report:3 sample.cpp
icl /c /QxSSSE3 /Qipo /Qvec-report:3 sample.cpp

The following commands will not generate a vectorization report:
icl /c /QxSSSE3 /Qvec-report:3 sample.cpp
icl /QxSSSE3 /Qipo /Qvec-report:3 sample.cpp
icl /c /QxSSSE3 /Qipo /Qvec-report:3 sample.cpp




第三条,是不是有点不对啊,icl /c /QxSSSE3 /Qipo /Qvec-report:3 sample.cpp。
我肉眼看上去,产生报告/不产生报告 各自的第三条example,似乎是一摸一样的啊
intel_iclifort 2010-10-21
  • 打赏
  • 举报
回复
可以再试试命令行
> icl /c /Qipo /QHost /Qvec-report:3 mApLoader.c
> icl /o /Qipo /QHost /Qvec-report:3 mApLoader.obj

你就能明白这个过程
intel_iclifort 2010-10-21
  • 打赏
  • 举报
回复
也就是说,想看到vec-report, /c 和 /Qipo 选项无法同时用。 原因就是向量化报告只能在代码生成的阶段产生,而IPO优化有两次编译过程。

上面的例子中,你在VS IDE中恰好/c和/Qipo都用了。你可以命令行加上/c /Qipo试试看是否还能显示向量化报告。另外,你把/Qvec-report:3加到Visual Studio Project的Linker 选项中再看看结果。
intel_iclifort 2010-10-21
  • 打赏
  • 举报
回复
你看看去掉 /Qipo 选项是否能看到 vec report。

使用手册里已经提到了:

Usage with Other Options

The vectorization reports are generated during the final compilation phase, which is when the executable is generated; therefore, there are certain option combinations you cannot use if you are attempting to generate a report. If you use the following option combinations, the compiler issues a warning and does not generate a report:

-c or -ipo or -x with -vec-report (Linux* and Mac OS* X) and /c or /Qipo or /Qx with /Qvec-report (Windows*)

-c or -ax with -vec-report (Linux and Mac OS X) and /c or /Qax with /Qvec-report (Windows)
CandPointer 2010-10-18
  • 打赏
  • 举报
回复

/c /O2 /Oi /Qipo /I "F:\progs\intel\Compiler\11.1\038\IPP\em64t\Include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /EHsc /MD /GS /Gy /fp:fast /Fo"x64\Release/" /W3 /nologo /Wp64 /Zi /TC /QxHost /Quse-intel-optimized-headers /Qstd=c99 /Qrestrict /Qvec-report:3




1>------ Rebuild All started: Project: mApLoader, Configuration: Release x64 ------
1>Deleting intermediate files and output files for project 'mApLoader', configuration 'Release|x64'.
1>Compiling with Intel(R) C++ 11.1.038 [Intel(R) 64]... (Intel C++ Environment)
1>mApLoader.c
1>Linking... (Intel C++ Environment)
1>xilink: executing 'link'
1>Embedding manifest... (Microsoft VC++ Environment)
1>Build Time: 0:00:01
1>Build log was saved at "file://G:\Vs2008\Stage04\mApLoader\mApLoader\x64\Release\BuildLog.htm"
1>mApLoader - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

562

社区成员

发帖
与我相关
我的任务
社区描述
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
社区管理员
  • 英特尔技术社区
  • shere_lin
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧