[BPI] Refactor post domination calculation and simple fix for ColdCall
authorSerguei Katkov <serguei.katkov@azul.com>
Wed, 12 Apr 2017 05:42:14 +0000 (05:42 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Wed, 12 Apr 2017 05:42:14 +0000 (05:42 +0000)
commitecebc3db72d8f4f03cb6ce3c122f36b4cda3cec5
tree23820d296349324eb8bc4930ca42869bd4a165b3
parent75ed0acf97f9af3d9e0ba781d9ff1de7b914f261
[BPI] Refactor post domination calculation and simple fix for ColdCall

Collection of PostDominatedByUnreachable and PostDominatedByColdCall have been
split out of heuristics itself. Update of the data happens now for each basic
block (before update for PostDominatedByColdCall might be skipped if
unreachable or matadata heuristic handled this basic block).

This separation allows re-ordering of heuristics without loosing
the post-domination information.

Reviewers: sanjoy, junbuml, vsk, chandlerc, reames

Reviewed By: chandlerc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D31701

llvm-svn: 300029
llvm/include/llvm/Analysis/BranchProbabilityInfo.h
llvm/lib/Analysis/BranchProbabilityInfo.cpp
llvm/test/Analysis/BranchProbabilityInfo/basic.ll