Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: src/IceOperand.h

Issue 631483002: Subzero: Optimize a common live range overlap calculation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceOperand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceOperand.h
diff --git a/src/IceOperand.h b/src/IceOperand.h
index 25f80b3e893ae19f9079ffda3ba0c0e4b4fa0ae3..69c9b1c7a3306037e4b606bb346c0d2369d2f584 100644
--- a/src/IceOperand.h
+++ b/src/IceOperand.h
@@ -298,7 +298,7 @@ bool operator==(const RegWeight &A, const RegWeight &B);
// inside a loop.
class LiveRange {
public:
- LiveRange() : Weight(0) {}
+ LiveRange() : Weight(0), IsNonpoints(false) {}
void reset() {
Range.clear();
@@ -335,6 +335,11 @@ private:
#endif
RangeType Range;
RegWeight Weight;
+ // IsNonpoints keeps track of whether the live range contains at
+ // least one interval where Start!=End. If it is empty or has the
+ // form [x,x),[y,y),...,[z,z), then overlaps(InstNumberT) is
+ // trivially false.
+ bool IsNonpoints;
};
Ostream &operator<<(Ostream &Str, const LiveRange &L);
« no previous file with comments | « no previous file | src/IceOperand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698