diff options
author | Hans Wennborg <hans@hanshq.net> | 2014-12-16 23:41:59 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2014-12-16 23:41:59 +0000 |
commit | 224cb82a39851c9d9f34c13c469c78e14ca4d8e4 (patch) | |
tree | b17dbeaa0edb70318cf6c6a610df4f931303d7e9 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | 5e09c8c32cb61ef3633afa7ecfc9609b5b97c779 (diff) | |
download | bcm5719-llvm-224cb82a39851c9d9f34c13c469c78e14ca4d8e4.tar.gz bcm5719-llvm-224cb82a39851c9d9f34c13c469c78e14ca4d8e4.zip |
SelectionDAG switch lowering: use 'unsigned' to count destination popularity
SwitchInst::getNumCases() returns unsinged, so using uint64_t to count cases
seems unnecessary.
Also fix a missing CHECK in the test case.
llvm-svn: 224393
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 3c0229f2bf3..81b824f305e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -2712,8 +2712,8 @@ void SelectionDAGBuilder::visitSwitch(const SwitchInst &SI) { !Cases.empty()) { // Replace an unreachable default destination with the most popular case // destination. - DenseMap<const BasicBlock *, uint64_t> Popularity; - uint64_t MaxPop = 0; + DenseMap<const BasicBlock *, unsigned> Popularity; + unsigned MaxPop = 0; const BasicBlock *MaxBB = nullptr; for (auto I : SI.cases()) { const BasicBlock *BB = I.getCaseSuccessor(); |