aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-01-02 15:40:52 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2019-01-02 15:40:52 +0000
commit0682afbaeed4471483ed6069a080f0cfd922767b (patch)
treecd29e9115c98653a31696a975fc61bbe13cd7bce /llvm/lib/IR/Module.cpp
parentb1ae8926fef5b3520c6b73e98966b4bbc4e966d0 (diff)
downloadllvm-0682afbaeed4471483ed6069a080f0cfd922767b.zip
llvm-0682afbaeed4471483ed6069a080f0cfd922767b.tar.gz
llvm-0682afbaeed4471483ed6069a080f0cfd922767b.tar.bz2
[MCA] Minor refactoring of method DefaultResourceStrategy::select. NFCI
Common code used by the default resource strategy to select pipeline resources has been moved to an helper function. The new selection logic has been slightly rewritten to get rid of a redundant zero check on the `ReadyMask` value. Before this patch, method select internally called function `PowerOf2Floor` to compute the next ready pipeline resource. However, `PowerOf2Floor` forces an implicit (redundant) zero check on the input value. By construction, `ReadyMask` can never be zero. This patch replaces the call to `PowerOf2Floor` with an equivalent block of code which avoids the redundant zero check. This gives a minor 3-3.5% speedup on a release build. No functional change intended. llvm-svn: 350218
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions