llvm-project/llvm/lib/MCA
Andrea Di Biagio 0682afbaee [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
2019-01-02 15:40:52 +00:00
..
HardwareUnits [MCA] Minor refactoring of method DefaultResourceStrategy::select. NFCI 2019-01-02 15:40:52 +00:00
Stages [MCA] Add support for BeginGroup/EndGroup. 2018-12-17 14:27:33 +00:00
CMakeLists.txt
Context.cpp
HWEventListener.cpp
InstrBuilder.cpp [MCA] Add support for BeginGroup/EndGroup. 2018-12-17 14:27:33 +00:00
Instruction.cpp
LLVMBuild.txt
Pipeline.cpp
Support.cpp