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

Unified Diff: src/IceInstX8632.h

Issue 580633002: Subzero: Add rudimentary statistics on generated code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove SpillsPlusFills and calculate as Spills+Fills Created 6 years, 3 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 | « src/IceInst.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX8632.h
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index ed538f49b33dbacb0b0d46b8306dcfc22dde838a..f0558db34e35675c7396925388c3eccf1ce3c2a3 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -290,6 +290,7 @@ public:
static InstX8632Label *create(Cfg *Func, TargetX8632 *Target) {
return new (Func->allocate<InstX8632Label>()) InstX8632Label(Func, Target);
}
+ virtual uint32_t getEmitInstCount() const { return 0; }
IceString getName(const Cfg *Func) const;
virtual void emit(const Cfg *Func) const;
virtual void dump(const Cfg *Func) const;
@@ -324,7 +325,7 @@ public:
InstX8632Br(Func, Target, NULL, NULL, Condition);
}
// Create a conditional intra-block branch (or unconditional, if
- // Condition==None) to a label in the current block.
+ // Condition==Br_None) to a label in the current block.
static InstX8632Br *create(Cfg *Func, InstX8632Label *Label,
BrCond Condition) {
return new (Func->allocate<InstX8632Br>())
@@ -332,6 +333,15 @@ public:
}
CfgNode *getTargetTrue() const { return TargetTrue; }
CfgNode *getTargetFalse() const { return TargetFalse; }
+ virtual uint32_t getEmitInstCount() const {
+ if (Label)
+ return 1;
+ if (Condition == Br_None)
+ return 1;
+ if (getTargetFalse())
+ return 2;
+ return 1;
+ }
virtual void emit(const Cfg *Func) const;
virtual void dump(const Cfg *Func) const;
static bool classof(const Inst *Inst) { return isClassof(Inst, Br); }
« no previous file with comments | « src/IceInst.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698