[llvm] 0dc5dc6 - [MCA][NFC] Removed unused method, and fixed a coverity issue.
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 27 04:51:55 PDT 2021
Author: Andrea Di Biagio
Date: 2021-08-27T12:49:49+01:00
New Revision: 0dc5dc6531de2b8542fbb0a0bef281c7f9f46a22
URL: https://github.com/llvm/llvm-project/commit/0dc5dc6531de2b8542fbb0a0bef281c7f9f46a22
DIFF: https://github.com/llvm/llvm-project/commit/0dc5dc6531de2b8542fbb0a0bef281c7f9f46a22.diff
LOG: [MCA][NFC] Removed unused method, and fixed a coverity issue.
The coverity issue was reported agaist class MCAOperand
due to the lack of proper initialization for field Index.
No functional change intended.
Added:
Modified:
llvm/include/llvm/MCA/Instruction.h
llvm/tools/llvm-mca/Views/SummaryView.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/MCA/Instruction.h b/llvm/include/llvm/MCA/Instruction.h
index 988cddcbe013e..3eb32186d5513 100644
--- a/llvm/include/llvm/MCA/Instruction.h
+++ b/llvm/include/llvm/MCA/Instruction.h
@@ -46,7 +46,7 @@ class MCAOperand {
kSFPImmediate, ///< Single-floating-point immediate operand.
kDFPImmediate, ///< Double-Floating-point immediate operand.
};
- MCAOperandType Kind = kInvalid;
+ MCAOperandType Kind;
union {
unsigned RegVal;
@@ -62,7 +62,7 @@ class MCAOperand {
unsigned Index;
public:
- MCAOperand() : FPImmVal(0) {}
+ MCAOperand() : Kind(kInvalid), FPImmVal(), Index() {}
bool isValid() const { return Kind != kInvalid; }
bool isReg() const { return Kind == kRegister; }
diff --git a/llvm/tools/llvm-mca/Views/SummaryView.h b/llvm/tools/llvm-mca/Views/SummaryView.h
index 834dc63dce0dc..21f3fad23ca07 100644
--- a/llvm/tools/llvm-mca/Views/SummaryView.h
+++ b/llvm/tools/llvm-mca/Views/SummaryView.h
@@ -71,12 +71,6 @@ class SummaryView : public View {
// Used to map resource indices to actual processor resource IDs.
llvm::SmallVector<unsigned, 8> ResIdx2ProcResID;
- // Compute the reciprocal throughput for the analyzed code block.
- // The reciprocal block throughput is computed as the MAX between:
- // - NumMicroOps / DispatchWidth
- // - Total Resource Cycles / #Units (for every resource consumed).
- double getBlockRThroughput() const;
-
/// Compute the data we want to print out in the object DV.
void collectData(DisplayValues &DV) const;
More information about the llvm-commits
mailing list