Skip to content
Commit 3f5e7b1f authored by Chandler Carruth's avatar Chandler Carruth
Browse files

[PM] Use a SmallVector instead of std::vector to avoid heap allocations

for small switches, and avoid using a complex loop to set up the
weights.

We know what the baseline weights will be so we can just resize the
vector to contain all that value and clobber the one slot that is
likely. This seems much more direct than the previous code that tested
at every iteration, and started off by zeroing the vector.

llvm-svn: 226995
parent 0012c778
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment