Switch lowering: use uint32_t for weights everywhere
authorHans Wennborg <hans@hanshq.net>
Mon, 27 Apr 2015 23:52:19 +0000 (23:52 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 27 Apr 2015 23:52:19 +0000 (23:52 +0000)
commit5d004276ecc57cec4ed71f441ddd5101760a7ac1
tree58e2c0e9b0b17dc185dd117bbc5c052690877acd
parent0b29dea9f171fa7cbcd7df2cff8f8e596b083895
Switch lowering: use uint32_t for weights everywhere

I previously thought switch clusters would need to use uint64_t in case
the weights of multiple cases overflowed a 32-bit int. It turns
out that the weights on a terminator instruction are capped to allow for
being added together, so using a uint32_t should be safe.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235945 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h