[llvm-mca] Clear the content of map VariantDescriptors in InstrBuilder before we...
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 2 Jul 2018 20:39:57 +0000 (20:39 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 2 Jul 2018 20:39:57 +0000 (20:39 +0000)
commit9b3cb081f3a558dad5c1d24c5d5bd03a34c8ac38
treef6f11396ed658689752c5845b29975df03b4456a
parent7aea360924bae0559d50774c88d60381247bd7eb
[llvm-mca] Clear the content of map VariantDescriptors in InstrBuilder before we start analyzing a new CodeBlock. NFCI.

Different CodeBlocks don't overlap. The same MCInst cannot appear in more than
one code block because all blocks are instantiated before the simulation is run.

We should always clear the content of map VariantDescriptors before every
simulation, since VariantDescriptors cannot possibly store useful information
for the next blocks. It is also "safer" to clear its content because `MCInst*`
is used as the key type for map VariantDescriptors.

llvm-svn: 336142
llvm/tools/llvm-mca/InstrBuilder.h
llvm/tools/llvm-mca/llvm-mca.cpp