[llvm-mca] Speedup the default resource selection strategy.

This patch removes a (potentially) slow while loop in
DefaultResourceStrategy::select(). A better (and faster) approach is to do some
bit manipulation in order to shrink the range of candidate resources.
On a release build, this change gives an average speedup of ~10%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348007 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed