File tree Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Original file line number Diff line number Diff line change 1010#define BOLT_PASSES_FRAMEANALYSIS_H
1111
1212#include " bolt/Passes/StackPointerTracking.h"
13+ #include < tuple>
1314
1415namespace llvm {
1516namespace bolt {
@@ -53,9 +54,7 @@ struct ArgInStackAccess {
5354 uint8_t Size;
5455
5556 bool operator <(const ArgInStackAccess &RHS) const {
56- if (StackOffset != RHS.StackOffset )
57- return StackOffset < RHS.StackOffset ;
58- return Size < RHS.Size ;
57+ return std::tie (StackOffset, Size) < std::tie (RHS.StackOffset , RHS.Size );
5958 }
6059};
6160
Original file line number Diff line number Diff line change @@ -43,9 +43,7 @@ struct MCInstInBBReference {
4343 return BB == RHS.BB && BBIndex == RHS.BBIndex ;
4444 }
4545 bool operator <(const MCInstInBBReference &RHS) const {
46- if (BB != RHS.BB )
47- return BB < RHS.BB ;
48- return BBIndex < RHS.BBIndex ;
46+ return std::tie (BB, BBIndex) < std::tie (RHS.BB , RHS.BBIndex );
4947 }
5048 operator MCInst &() const {
5149 assert (BB != nullptr );
Original file line number Diff line number Diff line change @@ -90,13 +90,7 @@ struct BranchInfo {
9090 }
9191
9292 bool operator <(const BranchInfo &RHS) const {
93- if (From < RHS.From )
94- return true ;
95-
96- if (From == RHS.From )
97- return (To < RHS.To );
98-
99- return false ;
93+ return std::tie (From, To) < std::tie (RHS.From , RHS.To );
10094 }
10195
10296 // / Merges branch and misprediction counts of \p BI with those of this object.
You can’t perform that action at this time.
0 commit comments