File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -526,13 +526,17 @@ class InstRef {
526526 InstRef (unsigned Index, Instruction *I) : Data(std::make_pair(Index, I)) {}
527527
528528 bool operator ==(const InstRef &Other) const { return Data == Other.Data ; }
529+ bool operator !=(const InstRef &Other) const { return Data != Other.Data ; }
530+ bool operator <(const InstRef &Other) const {
531+ return Data.first < Other.Data .first ;
532+ }
529533
530534 unsigned getSourceIndex () const { return Data.first ; }
531535 Instruction *getInstruction () { return Data.second ; }
532536 const Instruction *getInstruction () const { return Data.second ; }
533537
534538 // / Returns true if this references a valid instruction.
535- operator bool () const { return Data.second != nullptr ; }
539+ explicit operator bool () const { return Data.second != nullptr ; }
536540
537541 // / Invalidate this reference.
538542 void invalidate () { Data.second = nullptr ; }
Original file line number Diff line number Diff line change 1818namespace llvm {
1919namespace mca {
2020
21- bool EntryStage::hasWorkToComplete () const { return CurrentInstruction; }
21+ bool EntryStage::hasWorkToComplete () const {
22+ return static_cast <bool >(CurrentInstruction);
23+ }
2224
2325bool EntryStage::isAvailable (const InstRef & /* unused */ ) const {
2426 if (CurrentInstruction)
You can’t perform that action at this time.
0 commit comments