[llvm-mca] Move the routine that computes processor resource masks to its own file.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 20 Mar 2018 12:25:54 +0000 (12:25 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 20 Mar 2018 12:25:54 +0000 (12:25 +0000)
commit4704f0386bb8a29edb5d014ef7c00ef1b82fe78d
tree0259e9d0987c641812784514b3e69858e3ab902f
parenta713ebea2456be61281e7570106a842357ce43a1
[llvm-mca] Move the routine that computes processor resource masks to its own file.

Function computeProcResourceMasks is used by the ResourceManager (owned by the
Scheduler) to compute resource masks for processor resources.  Before this
refactoring, there was an implicit dependency between the Scheduler and the
InstrBuilder. That is because InstrBuilder has to know about resource masks when
computing the set of processor resources consumed by a new instruction.

With this patch, the functionality that computes resource masks has been
extracted from the ResourceManager, and moved to a separate file (Support.h).
This helps removing the dependency between the Scheduler and the InstrBuilder.

No functional change intended.

llvm-svn: 327973
llvm/tools/llvm-mca/Backend.cpp
llvm/tools/llvm-mca/Backend.h
llvm/tools/llvm-mca/CMakeLists.txt
llvm/tools/llvm-mca/InstrBuilder.cpp
llvm/tools/llvm-mca/InstrBuilder.h
llvm/tools/llvm-mca/Scheduler.cpp
llvm/tools/llvm-mca/Scheduler.h
llvm/tools/llvm-mca/Support.cpp [new file with mode: 0644]
llvm/tools/llvm-mca/Support.h [new file with mode: 0644]