[PATCH] D11915: Let edge weight be always greater than zero in both BPI and MBPI.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 14:21:43 PDT 2015
davidxl added a comment.
Ok -- it is a very messy situation that need lots of cleanup (summarized below). For now, since the only producer of zero weight for BPI is from 'opt' by reading developer's hand writing .ll file, I suggest simply set zero weight to 1 in calcMetaDataWeights to match BlockFrequencyInfoImpl's behavior.
-------------------
Current situation:
1. there is no client (other than opt) producing zero weight for BPI
2. BPI can have missing weights (empty map entry) -- in which case, the edge weight returned is DEFAULT_WEIGHT= 16
for MBPI
3. the default weight in the setter interface is '0' -- which can not be differentiated with real zero weight
4. when Weight list for a BB is empty, the getter interface returns 16 as the default weight.
5. the getter interface also unconditionally change 0 weight into DEFAULT_WEIGHT == 16
6. the weight list and successor list can be out of sync.
http://reviews.llvm.org/D11915
More information about the llvm-commits
mailing list