[MCA][ResourceManager] Add a table that maps processor resource indices to processor...
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 20 Feb 2019 14:53:18 +0000 (14:53 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 20 Feb 2019 14:53:18 +0000 (14:53 +0000)
commitd882ad5e6efba7bc3059e450ec7c303acc40f0b0
tree1eb637e7ce2895110d4c8aa42a2cd2dd096cda4c
parent14e15ec18dd23e75fe54a72dde203dc266390561
[MCA][ResourceManager] Add a table that maps processor resource indices to processor resource identifiers.

This patch adds a lookup table to speed up resource queries in the ResourceManager.
This patch also moves helper function 'getResourceStateIndex()' from
ResourceManager.cpp to Support.h, so that we can reuse that logic in the
SummaryView (and potentially other views in llvm-mca).
No functional change intended.

llvm-svn: 354470
llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h
llvm/include/llvm/MCA/Support.h
llvm/lib/MCA/HardwareUnits/ResourceManager.cpp
llvm/tools/llvm-mca/Views/SummaryView.cpp
llvm/tools/llvm-mca/Views/SummaryView.h