Reland "b19ec1eb3d0c [BPI] Improve unreachable/ColdCall heurstics to handle loops."
authorTaewook Oh <taewook.oh@gmail.com>
Mon, 2 Dec 2019 18:15:22 +0000 (10:15 -0800)
committerTaewook Oh <taewook.oh@gmail.com>
Mon, 2 Dec 2019 18:28:40 +0000 (10:28 -0800)
commit2da205d43eeb402d2c42bdbd2f564e2686b5573d
tree81dfdcfa2abac6d5178f6e65b5c374ef3d9c77c6
parentfe459ce65a993dee5e20648a8e01330a44e879b8
Reland "b19ec1eb3d0c [BPI] Improve unreachable/ColdCall heurstics to handle loops."

Summary: b19ec1eb3d0c has been reverted because of the test failures
with PowerPC targets. This patch addresses the issues from the previous
commit.

Test Plan: ninja check-all. Confirmed that CodeGen/PowerPC/pr36292.ll
and CodeGen/PowerPC/sms-cpy-1.ll pass

Subscribers: llvm-commits
DIFF [new file with mode: 0644]
llvm/include/llvm/Analysis/BranchProbabilityInfo.h
llvm/lib/Analysis/BranchProbabilityInfo.cpp
llvm/test/Analysis/BranchProbabilityInfo/basic.ll
llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
llvm/test/CodeGen/PowerPC/pr36292.ll
llvm/test/CodeGen/PowerPC/sms-cpy-1.ll
llvm/test/CodeGen/X86/block-placement.ll
llvm/test/CodeGen/X86/pr37916.ll
llvm/test/CodeGen/X86/ragreedy-hoist-spill.ll