1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/tools/llvm-mca
Andrea Di Biagio 8e91b0faf1 [llvm-mca] Use a small vector for instructions in the EntryStage.
Use a simple SmallVector to track the lifetime of simulated instructions.
An ordered map was not needed because instructions are already picked in program
order. It is also much faster if we avoid searching for already retired
instructions at the end of every cycle.
The new policy only triggers a "garbage collection" when the number of retired
instructions becomes significantly big when compared with the total size of the
vector.

While working on this, I noticed that instructions were correctly retired, but
their internal state was not updated (i.e. there was no transition from the
EXECUTED state, to the RETIRED state). While this was not a problem for the
views, it prevented the EntryStage from correctly garbage collecting already
retired instructions. That was a bad oversight, and this patch fixes it.

The observed speedup on a debug build of llvm-mca after this patch is ~6%.
On a release build of llvm-mca, the observed speedup is ~%15%.

llvm-svn: 346487
2018-11-09 12:29:57 +00:00
..
include [llvm-mca] Use a small vector for instructions in the EntryStage. 2018-11-09 12:29:57 +00:00
lib [llvm-mca] Use a small vector for instructions in the EntryStage. 2018-11-09 12:29:57 +00:00
Views [llvm-mca] Add extra counters for move elimination in view RegisterFileStatistics. 2018-11-01 18:04:39 +00:00
CMakeLists.txt [llvm-mca] Move the AssembleInput logic into its own class. 2018-11-07 19:20:04 +00:00
CodeRegion.cpp [llvm-mca] Move namespace mca inside llvm:: 2018-10-30 15:56:08 +00:00
CodeRegion.h [llvm-mca] Move the AssembleInput logic into its own class. 2018-11-07 19:20:04 +00:00
CodeRegionGenerator.cpp [llvm-mca] Move the AssembleInput logic into its own class. 2018-11-07 19:20:04 +00:00
CodeRegionGenerator.h [llvm-mca] Move the AssembleInput logic into its own class. 2018-11-07 19:20:04 +00:00
llvm-mca.cpp [llvm-mca] Partially revert r346417. 2018-11-08 18:08:43 +00:00
LLVMBuild.txt
PipelinePrinter.cpp [llvm-mca] Move namespace mca inside llvm:: 2018-10-30 15:56:08 +00:00
PipelinePrinter.h [llvm-mca] Move namespace mca inside llvm:: 2018-10-30 15:56:08 +00:00