diff options
author | Hans Wennborg <hans@hanshq.net> | 2015-04-27 23:52:19 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2015-04-27 23:52:19 +0000 |
commit | 7bf4d4eee01df4debe56daa02912a479970c38f4 (patch) | |
tree | 24093ddb0dffd22a9d448e97237adc60c32d1947 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | |
parent | 948a4bbc92d48127136dd9436f7419d6ee6f4641 (diff) | |
download | bcm5719-llvm-7bf4d4eee01df4debe56daa02912a479970c38f4.tar.gz bcm5719-llvm-7bf4d4eee01df4debe56daa02912a479970c38f4.zip |
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
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h index 7c2cef61a31..ba6d9743d74 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h @@ -153,7 +153,7 @@ private: unsigned JTCasesIndex; unsigned BTCasesIndex; }; - uint64_t Weight; + uint32_t Weight; static CaseCluster range(const ConstantInt *Low, const ConstantInt *High, MachineBasicBlock *MBB, uint32_t Weight) { |