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)
commit7bf4d4eee01df4debe56daa02912a479970c38f4
tree24093ddb0dffd22a9d448e97237adc60c32d1947
parent948a4bbc92d48127136dd9436f7419d6ee6f4641
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.

llvm-svn: 235945
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h