[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.
This commit is contained in:
Andrea Di Biagio
2021-08-27 12:48:30 +01:00
parent 78f92c3810
commit 0dc5dc6531
2 changed files with 2 additions and 8 deletions

View File

@@ -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; }

View File

@@ -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;