diff options
author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-10-04 10:36:49 +0000 |
---|---|---|
committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-10-04 10:36:49 +0000 |
commit | aacd5e187b9111d2ee206f4e7b942e7243b6dbc4 (patch) | |
tree | 17314c6a1ce8b6dc3277afa5435ba714f6951f22 /llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h | |
parent | 991b0d24fffc53e49b87978d0b2f2143c1d86759 (diff) | |
download | bcm5719-llvm-aacd5e187b9111d2ee206f4e7b942e7243b6dbc4.tar.gz bcm5719-llvm-aacd5e187b9111d2ee206f4e7b942e7243b6dbc4.zip |
[llvm-mca] Check for inconsistencies when constructing instruction descriptors.
This should help with catching inconsistent definitions of instructions with
zero opcodes, which also declare to consume scheduler/pipeline resources.
llvm-svn: 343766
Diffstat (limited to 'llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h')
-rw-r--r-- | llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h b/llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h index 7f2d699e410..552a2094ff1 100644 --- a/llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h +++ b/llvm/tools/llvm-mca/include/HardwareUnits/RetireControlUnit.h @@ -70,6 +70,11 @@ public: // of the reorder buffer. To avoid problems, cap the amount of slots to // the size of the reorder buffer. Quantity = std::min(Quantity, static_cast<unsigned>(Queue.size())); + + // Further normalize the number of micro opcodes for instructions that + // declare zero opcodes. This should match the behavior of method + // reserveSlot(). + Quantity = std::max(Quantity, 1U); return AvailableSlots >= Quantity; } |