当我执行 PGO 优化步骤(使用LINK.EXE /LTCG:PGU
)时,Visual Studio 2010 链接器抱怨:
Merging foo!1.pgc
'FOO_EDGE::get_input': Arc 2 --> 4 has negative count (-414343)
Expectation failed: f line 4241
'FOO_DELAY::set_delay': Block 18 outgoing counts differ from block count (-9 diff)
Expectation failed: f line 4261
Expectation failed: f line 4211
'FOO_DELAY::set_delay': Arc 12 --> 23 has negative count (-3)
Expectation failed: f line 4220
Generating code
907 of 4948 ( 18.33%) profiled functions will be compiled for speed
4948 of 4948 functions (100.0%) were optimized using profile data
42912225037 of 42912225037 instructions (100.0%) were optimized using profile data
是什么导致了这些“预期失败”?我应该如何解决它们?似乎 PGO 仍在优化代码,但我对存在这些消息的优化的质量/完整性有点怀疑。