Skip to content

Loop Profiling

Ziyang Xu edited this page Sep 3, 2020 · 2 revisions

lib/LoopProf

  • LoopProfiling.cpp
    • treat call site and loop similarly
    • add loopProf_invocation at the beginning of a loop/ before a callsite
    • add loop_exit in all exit blocks of a loop / after a callsite
    • test if it's a LLVM intrinsic function
    • Go through and instrument each loop and its subloops
  • LoopProfLoad.cpp
  • TargetLoopHierarchy.cpp
  • Targets.cpp

support/FullLoopProf

  • FullLoopProf.cpp: Actual loop profiling runtime
    • initialization at the beginning
    • keep track of call stack

Clone this wiki locally