Skip to content

Commit

Permalink
fix uninitialized data from bad default constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
j2kun committed Mar 15, 2024
1 parent 68dfe21 commit f0571fe
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions include/Analysis/RotationAnalysis/RotationAnalysis.h
Expand Up @@ -19,11 +19,12 @@ namespace rotation_analysis {
// A wrapper around a mapping from tensor SSA values to sets of access indices
class RotationSets {
public:
RotationSets() = default;
~RotationSets() = default;

enum class Status { Normal, TooManyTensors };

public:
RotationSets() : status(Status::Normal){};
~RotationSets() = default;

// Clear the member data, i.e., set the value back to an uninitialized
// state.
void clear() {
Expand Down Expand Up @@ -99,6 +100,10 @@ class RotationSets {
if (lhs.accessedIndices.empty()) return rhs;

if (lhs.tensor != rhs.tensor) {
LLVM_DEBUG({
llvm::dbgs() << "Joining rotations of different tensors: " << lhs.tensor
<< " and " << rhs.tensor << "\n";
});
return overdetermined();
}

Expand Down

0 comments on commit f0571fe

Please sign in to comment.