clang的等效-ftree-vectorizer-verbose

时间:2013-07-10 16:39:25

标签: clang clang++

问题是关于如何使clang打印有关哪些循环(或代码的其他部分)已被矢量化的信息。 GCC有一个名为-ftree-vectorizer-verbose=6的命令行开关来执行此操作,但我找不到与clang类似的任何内容。 clang是否支持此功能,或者我唯一的选择是查看反汇编?

2 个答案:

答案 0 :(得分:5)

clang具有以下选项来打印与矢量化相关的诊断:

-Rpass=loop-vectorize identifies loops that were successfully vectorized.

-Rpass-missed=loop-vectorize identifies loops that failed vectorization and indicates if vectorization was specified.

-Rpass-analysis=loop-vectorize identifies the statements that caused vectorization to fail.

来源:http://llvm.org/docs/Vectorizers.html

答案 1 :(得分:0)

查看clang源代码,Transforms / Vectorize中有几个矢量化传递:

  • BBVectorize
  • LoopVectorize
  • SLPVectorize

最后三个似乎没有任何打印东西的论据。但是在BBVectorize内部,当clang构建为debug时,有几种打印方式可供选择:

  • bb-vectorize-debug-instruction-examination - 启用调试时,输出指令检查过程的信息
  • bb-vectorize-debug-candidate-selection - 启用调试时,输出候选选择过程的信息
  • bb-vectorize-debug-pair-selection - 启用调试时,输出有关配对选择过程的信息
  • bb-vectorize-debug-cycle-check - 启用调试时,输出循环检查过程的信息
  • bb-vectorize-debug-print-after-each-pair - 启用调试后,在每对融合后转储基本块

看起来就是这样。

相关问题