[PATCH] D24989: Use profile info to set function section prefix to group hot/cold functions.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 14:58:58 PDT 2016


danielcdh created this revision.
danielcdh added reviewers: eraman, davidxl.
danielcdh added a subscriber: llvm-commits.

The original implementation is in r261607, which was reverted in r269726 to accomendate the ProfileSummaryInfo analysis pass. The new implementation:
1. add a new metadata for function section prefix
2. query against ProfileSummaryInfo in CGP to set the correct section prefix for each function
3. output the section prefix set by CGP

https://reviews.llvm.org/D24989

Files:
  include/llvm/IR/Function.h
  include/llvm/IR/LLVMContext.h
  include/llvm/IR/MDBuilder.h
  lib/CodeGen/CodeGenPrepare.cpp
  lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  lib/IR/Function.cpp
  lib/IR/LLVMContext.cpp
  lib/IR/MDBuilder.cpp
  test/Transforms/CodeGenPrepare/section.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24989.72716.patch
Type: text/x-patch
Size: 8375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160927/28b0b507/attachment.bin>


More information about the llvm-commits mailing list