请问我在使用C++编程的时候为了方便Intel的编译器优化应该注意哪些问题呢?

烟灯居士 2008-04-23 10:19:36
如上,谢谢
...全文
118 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
intel_iclifort 2008-04-23
  • 打赏
  • 举报
回复
首先, 不用刻意为之

当然, 如果能够参考一下编译器给出的优化报告, 就能够知道如何进一步改动了

如果想要看到优化报告, 可以在工程或者命令行中, 加入如下的编译选项(仅适用于Intel 编译器):

Linux and Mac OS X: -opt-report [n]
Windows: /Qopt-report[:n]

n Is the level of detail in the report. Possible values are:
0 Tells the compiler to generate no optimization report.
1 Tells the compiler to generate a report with the minimum level of detail.
2 Tells the compiler to generate a report with the medium level of detail.
3 Tells the compiler to generate a report with the maximum level of detail.

Linux and Mac OS X: -opt-report-phase[phase]
Windows: /Qopt-report-phase[:phase]

phase Is the phase to generate reports for. Some of the possible values are:
ipo The Interprocedural Optimizer phase
hlo The High Level Optimizer phase
hpo The High Performance Optimizer phase
ilo The Intermediate Language Scalar Optimizer phase
ecg The Code Generator phase (Windows and Linux systems using IA-64 architecture only)
ecg_swp The software pipelining component of the Code Generator phase (Windows and Linux systems using IA-64 architecture only)
pgo The Profile Guided Optimization phase
all All optimizer phases

Default
OFF No optimization reports are generated.

568

社区成员

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

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