Skip to content
Commit c1c810de authored by David Callahan's avatar David Callahan
Browse files

[AutoFDO] Fix handling of empty profiles

Summary:
If a profile has no samples for a function, then the function "entry count" is set to the value 0. Several places in the code test that if the Function::getEntryCount is defined at all. Here we change to treat a 0 entry count the same as undefined.

In particular, this fixes a problem in getLayoutSuccessorProbThreshold in MachineBlockPlacement.cpp where we use a different and inferior heuristic for laying out basic blocks.

Reviewers: danielcdh, dnovillo

Subscribers: llvm-commits

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

llvm-svn: 277849
parent b0b4e862
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment