summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/include/InstrBuilder.h
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-11-24 18:40:45 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-11-24 18:40:45 +0000
commit42720603c44a398b0ffeeecf8d15dc9adf808e17 (patch)
tree331fe0ac6f015347fd0a100a05d8d78942cd37eb /llvm/tools/llvm-mca/include/InstrBuilder.h
parente0466f570e6cd170f74da8e8557e9e511f7c10c0 (diff)
downloadbcm5719-llvm-42720603c44a398b0ffeeecf8d15dc9adf808e17.tar.gz
bcm5719-llvm-42720603c44a398b0ffeeecf8d15dc9adf808e17.zip
[llvm-mca] InstrBuilder: warnings for call/ret instructions are only reported once.
llvm-svn: 347514
Diffstat (limited to 'llvm/tools/llvm-mca/include/InstrBuilder.h')
-rw-r--r--llvm/tools/llvm-mca/include/InstrBuilder.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/include/InstrBuilder.h b/llvm/tools/llvm-mca/include/InstrBuilder.h
index 5f6adead105..1c958c5020e 100644
--- a/llvm/tools/llvm-mca/include/InstrBuilder.h
+++ b/llvm/tools/llvm-mca/include/InstrBuilder.h
@@ -46,6 +46,9 @@ class InstrBuilder {
DenseMap<unsigned short, std::unique_ptr<const InstrDesc>> Descriptors;
DenseMap<const MCInst *, std::unique_ptr<const InstrDesc>> VariantDescriptors;
+ bool FirstCallInst;
+ bool FirstReturnInst;
+
Expected<const InstrDesc &> createInstrDescImpl(const MCInst &MCI);
Expected<const InstrDesc &> getOrCreateInstrDesc(const MCInst &MCI);
@@ -60,7 +63,11 @@ public:
InstrBuilder(const MCSubtargetInfo &STI, const MCInstrInfo &MCII,
const MCRegisterInfo &RI, const MCInstrAnalysis &IA);
- void clear() { VariantDescriptors.shrink_and_clear(); }
+ void clear() {
+ VariantDescriptors.shrink_and_clear();
+ FirstCallInst = true;
+ FirstReturnInst = true;
+ }
Expected<std::unique_ptr<Instruction>> createInstruction(const MCInst &MCI);
};
OpenPOWER on IntegriCloud