[PATCH] D39028: Irreducible loop metadata for more accurate block frequency under PGO.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 17:42:58 PDT 2017


yamauchi created this revision.
Herald added subscribers: eraman, mehdi_amini.

Currently the block frequency analysis is an approximation for irreducible
loops.

The new irreducible loop metadata is used to annotate the irreducible loop
headers with their header weights based on the PGO profile (currently this is
approximated to be evenly weighted) and to help improve the accuracy of the
block frequency analysis for irreducible loops.

This patch is a basic support for this.


https://reviews.llvm.org/D39028

Files:
  include/llvm/Analysis/BlockFrequencyInfo.h
  include/llvm/Analysis/BlockFrequencyInfoImpl.h
  include/llvm/CodeGen/MachineBasicBlock.h
  include/llvm/CodeGen/MachineBlockFrequencyInfo.h
  include/llvm/IR/BasicBlock.h
  include/llvm/IR/LLVMContext.h
  include/llvm/IR/MDBuilder.h
  include/llvm/Transforms/PGOInstrumentation.h
  lib/Analysis/BlockFrequencyInfo.cpp
  lib/Analysis/BlockFrequencyInfoImpl.cpp
  lib/CodeGen/MachineBasicBlock.cpp
  lib/CodeGen/MachineBlockFrequencyInfo.cpp
  lib/IR/BasicBlock.cpp
  lib/IR/LLVMContext.cpp
  lib/IR/MDBuilder.cpp
  lib/Transforms/Instrumentation/PGOInstrumentation.cpp
  test/Analysis/BlockFrequencyInfo/irreducible_pgo.ll
  test/ThinLTO/X86/lazyload_metadata.ll
  test/Transforms/PGOProfile/Inputs/irreducible.proftext
  test/Transforms/PGOProfile/irreducible.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39028.119410.patch
Type: text/x-patch
Size: 100820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171018/1a70daa1/attachment.bin>


More information about the llvm-commits mailing list