This is non-functional change to re-order if statements to bail out earlier
from unreachable and ColdCall heuristics.
Details
Diff Detail
Event Timeline
lib/Analysis/BranchProbabilityInfo.cpp | ||
---|---|---|
215–217 | Sholud we even get here? should this be in the caller? | |
348–350 | This seems like it should merge into the above if? But my comment about hoisting all of this to the caller still applies. I feel like thes eshould be able to assume there are interesting successor counts. |
LGTM, seems like a clear improvement in this code. See one nit about the asserts below, but feel free to submit with that addressed.
lib/Analysis/BranchProbabilityInfo.cpp | ||
---|---|---|
208 | Nit: add a message here and elsewhere. like "expected more than one successor!" to help confirm that the assert isn't a typo or something. |
Nit: add a message here and elsewhere. like "expected more than one successor!" to help confirm that the assert isn't a typo or something.