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 {
526
526
InstRef (unsigned Index, Instruction *I) : Data(std::make_pair(Index, I)) {}
527
527
528
528
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
+ }
529
533
530
534
unsigned getSourceIndex () const { return Data.first ; }
531
535
Instruction *getInstruction () { return Data.second ; }
532
536
const Instruction *getInstruction () const { return Data.second ; }
533
537
534
538
// / 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 ; }
536
540
537
541
// / Invalidate this reference.
538
542
void invalidate () { Data.second = nullptr ; }
Original file line number Diff line number Diff line change 18
18
namespace llvm {
19
19
namespace mca {
20
20
21
- bool EntryStage::hasWorkToComplete () const { return CurrentInstruction; }
21
+ bool EntryStage::hasWorkToComplete () const {
22
+ return static_cast <bool >(CurrentInstruction);
23
+ }
22
24
23
25
bool EntryStage::isAvailable (const InstRef & /* unused */ ) const {
24
26
if (CurrentInstruction)
You can’t perform that action at this time.
0 commit comments