Linux LLVM上的Simplescalar支持

Linux LLVM上的Simplescalar支持,linux,ubuntu,profiling,llvm,Linux,Ubuntu,Profiling,Llvm,我想查看LLVM IR程序的配置文件。simplescalar模拟器是否支持LLVM?是否有其他模拟器可以执行相同的操作?如果Simplescalar支持ARM和x86 ELF二进制文件,则可以将其用于LLVM编译程序 但是,如果您想进行简单的评测(在真实CPU上运行时,程序的每个部分需要多少时间),您可以检查更多已知的评测器,如: 谷歌性能工具 呼叫研磨/缓存研磨或 oprofile 您不能只运行LLVM IR,因为SimpleScalar或普通探查器不支持LLVM的IR。IR由lli和其

我想查看LLVM IR程序的配置文件。simplescalar模拟器是否支持LLVM?是否有其他模拟器可以执行相同的操作?

如果Simplescalar支持ARM和x86 ELF二进制文件,则可以将其用于LLVM编译程序

但是,如果您想进行简单的评测(在真实CPU上运行时,程序的每个部分需要多少时间),您可以检查更多已知的评测器,如:

  • 谷歌性能工具
  • 呼叫研磨/缓存研磨或
  • oprofile
您不能只运行LLVM IR,因为SimpleScalar或普通探查器不支持LLVM的IR。IR由lli和其他llvm工具支持

如果您想分析使用了哪些分支以及使用频率,那么有针对PGO的LLVM分析(概要文件引导优化)。有和
utils/profile.pl
script来评测LLVM IR程序

如何从

#程序:profile.pl
#
#简介:将插装代码插入程序,使用JIT运行它,
#然后打印一份个人资料报告。
#
#语法:profile.pl[OPTIONS]字节码文件
#
#选项可能包括以下一项或多项:
#-block-启用基本块分析
#-边缘-启用边缘分析
#-函数-启用函数分析
#-o-将分析信息发送到指定的文件
#llvmprof.out的
#
#任何无法识别的选项都会传递到llvm prof的调用中
内部是

  • 通过一些
    -insert-*-profiling
    过程运行opt。输出是仪器化的
  • 使用lli运行嵌入式IR(希望使用JIT)
  • 启动llvm prof以将llvmprof.out转换为可读文本
  • PS有一些关于LLLVM评测的研究论文:llvm.org/pubs/2010-04-neustifterprefiling.pdf

    # Program:  profile.pl
    #
    # Synopsis: Insert instrumentation code into a program, run it with the JIT,
    #           then print out a profile report.
    #
    # Syntax:   profile.pl [OPTIONS] bytecodefile <arguments>
    #
    # OPTIONS may include one or more of the following:
    #     -block    - Enable basicblock profiling
    #     -edge     - Enable edge profiling
    #     -function - Enable function profiling
    #     -o <filename> - Emit profiling information to the specified file, instead
    #                     of llvmprof.out
    #
    # Any unrecognized options are passed into the invocation of llvm-prof