[llvm-mca] Add method cycleEvent() to class Scheduler. NFCI
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 21 Aug 2018 12:40:15 +0000 (12:40 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 21 Aug 2018 12:40:15 +0000 (12:40 +0000)
commit5184995f9b7ff867dd458b638ccb1c5bc77239c1
tree375dd1e017c0779f88e544805bbf3a3b772faf02
parentb59b45e7f1bd7486d8d30bd5c08f08c4b71dcca9
[llvm-mca] Add method cycleEvent() to class Scheduler. NFCI

The goal of this patch is to simplify the Scheduler's interface in preparation
for D50929.
Some methods in the Scheduler's interface should not be exposed to external
users, since their presence makes it hard to both understand, and extend the
Scheduler's interface.

This patch removes the following two methods from the public Scheduler's API:
 - reclaimSimulatedResources()
 - updatePendingQueue()
Their logic has been migrated to a new method named 'cycleEvent()'.

Methods 'updateIssuedSet()' and 'promoteToReadySet()' still exist. However,
they are now private members of class Scheduler.

This simplifies the interaction with the Scheduler from the ExecuteStage.

llvm-svn: 340273
llvm/tools/llvm-mca/ExecuteStage.cpp
llvm/tools/llvm-mca/ExecuteStage.h
llvm/tools/llvm-mca/Instruction.h
llvm/tools/llvm-mca/RegisterFile.cpp
llvm/tools/llvm-mca/Scheduler.cpp
llvm/tools/llvm-mca/Scheduler.h