[PATCH] D10979: Update the branch weight metadata in JumpThreading pass.

Cong Hou congh at google.com
Thu Jul 16 16:46:05 PDT 2015


congh added a reviewer: dexonsmith.
congh updated this revision to Diff 29963.
congh added a comment.

This update merges the patch that adds setBlockFreq() interfaces to BlockFrequencyInfo (http://reviews.llvm.org/D11104). As both BFI and BPI can be used without including passes with them, in jump-threading pass, we can update the edge weights only in PGO mode (i.e., only when we have the entry count of a function) without introducing new passes. To make sure both BFI/BPI have up-to-date information, for every CFG change, we need to update BFI and BPI accordingly. Two utility functions (JumpThreading::UpdateEdgeWeight() and JumpThreading::SplitBlockPreds()) are created to facilitate the update.


http://reviews.llvm.org/D10979

Files:
  include/llvm/Analysis/BlockFrequencyInfo.h
  include/llvm/Analysis/BlockFrequencyInfoImpl.h
  include/llvm/Analysis/BranchProbabilityInfo.h
  lib/Analysis/BlockFrequencyInfo.cpp
  lib/Analysis/BlockFrequencyInfoImpl.cpp
  lib/Analysis/BranchProbabilityInfo.cpp
  lib/Transforms/Scalar/JumpThreading.cpp
  test/Transforms/JumpThreading/update-edge-weight.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10979.29963.patch
Type: text/x-patch
Size: 14771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150716/ab65aa0c/attachment.bin>


More information about the llvm-commits mailing list