[all-commits] [llvm/llvm-project] 47b95d: [MCA][InstrBuilder] Correctly mark reserved resour...
Andrea Di Biagio via All-commits
all-commits at lists.llvm.org
Sun May 10 11:29:11 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 47b95d7cf462b824b2fbea1eb1a64e9c3eaa1a95
https://github.com/llvm/llvm-project/commit/47b95d7cf462b824b2fbea1eb1a64e9c3eaa1a95
Author: Andrea Di Biagio <andrea.dibiagio at sony.com>
Date: 2020-05-10 (Sun, 10 May 2020)
Changed paths:
M llvm/lib/MCA/InstrBuilder.cpp
A llvm/test/tools/llvm-mca/X86/Haswell/reserved-resources.s
Log Message:
-----------
[MCA][InstrBuilder] Correctly mark reserved resources in initializeUsedResources.
This fixes a bug reported by Alex Renda on LLVMDev where mca did not correctly
mark a resource group as "reserved".
(See http://lists.llvm.org/pipermail/llvm-dev/2020-May/141485.html).
The issue was caused by a wrong check in function `initializeUsedResources`.
As a consequence of this, a resource group was left unreserved, and its field
`NumUnits` incorrectly reported an unrealistic number of consumed resource
units.
This patch fixes the issue with the handling of reserved resources in the
InstrBuilder class, and adds a simple test for it. Ideally, as suggested by
Andy Trick, most of these problems will disappear if in the future we will
introduce a (optional) DelayCycles vector for SchedWriteRes.
More information about the All-commits
mailing list