为什么/Qvec-report:2 什么都不返回?(MSVC 2012) [英] Why would /Qvec-report:2 return nothing ? (MSVC 2012)

查看:38
本文介绍了为什么/Qvec-report:2 什么都不返回?(MSVC 2012)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了/Qvec-report:2 选项以查看 MSVC 自动矢量化器是否有用.不幸的是,我没有得到任何结果,无论是正面还是负面:

I tried the /Qvec-report:2 option to see if the MSVC auto-vectorizer would be any use. Unfortunately, I didn't get any result, positive nor negative:

>  Microsoft (R) C/C++ Optimizing Compiler Version 17.00.60610.1 for x86
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1>  
1>  cl /c /Zi /nologo- /W3 /WX- /O2 /Ob2 /Oi /Oy /GL /D WIN32 /D _SCL_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_WARNINGS /D NDEBUG /D _LIB /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /Yu"stdafx.h" /Fp"Release\(redacted).pch" /Fo"Release\\" /Fd"Release\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt  /Qvec-report:2 (redacted).cpp
1>cl : Command line warning D9035: option 'nologo-' has been deprecated and will be removed in a future release
1>  
1>  (redacted).cpp
1>
1>Build succeeded.

我希望收到类似于

--- Analyzing function: main 
c:\source.cpp(4) : loop vectorized 
c:\source.cpp(5) : loop not vectorized due to reason '1200'

推荐答案

原因原来是 /GL 选项.使用链接时代码生成,编译步骤只是一个解析步骤,不包括任何向量化.由于该步骤完全缺失,编译时不会生成任何报告(正面或负面).

The cause turned out to be the /GL option. With link-time code generation, the compile step becomes just a parsing step, and does not include any vectorization. Since that step is entirely missing, no report (positive nor negative) is generated at compile time.

链接器现在可以改为发出矢量化步骤.即使将 LTCG 目标文件放在库中,也会发生这种情况.

The linker can now emit vectorization steps instead. This happens even if the LTCG object files were placed in a library.

这篇关于为什么/Qvec-report:2 什么都不返回?(MSVC 2012)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆