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

Unified Diff: src/IceInstMIPS32.h

Issue 2275883002: [SubZero] Branch optimization (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Tests added for branch optimization. Created 4 years, 4 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/IceInstMIPS32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstMIPS32.h
diff --git a/src/IceInstMIPS32.h b/src/IceInstMIPS32.h
index 5dc836713db774ea7a2f25b74f08b2c6af2a1425..16bd5948ac0f160c4a24391602a2fa087e50b5bd 100644
--- a/src/IceInstMIPS32.h
+++ b/src/IceInstMIPS32.h
@@ -201,6 +201,8 @@ public:
static const char *getWidthString(Type Ty);
+ CondMIPS32::Cond getOppositeCondition(CondMIPS32::Cond Cond);
+
void dump(const Cfg *Func) const override;
void dumpOpcode(Ostream &Str, const char *Opcode, Type Ty) const {
@@ -669,7 +671,9 @@ public:
const CfgNode *getTargetTrue() const { return TargetTrue; }
const CfgNode *getTargetFalse() const { return TargetFalse; }
-
+ CondMIPS32::Cond getPredicate() const { return Predicate; }
+ void setPredicate(CondMIPS32::Cond Pred) { Predicate = Pred; }
+ bool optimizeBranch(const CfgNode *NextNode);
bool isUnconditionalBranch() const override {
return Predicate == CondMIPS32::AL;
}
@@ -694,7 +698,7 @@ private:
const CfgNode *TargetTrue;
const CfgNode *TargetFalse;
const InstMIPS32Label *Label; // Intra-block branch target
- const CondMIPS32::Cond Predicate;
+ CondMIPS32::Cond Predicate;
};
class InstMIPS32Call : public InstMIPS32 {
« no previous file with comments | « no previous file | src/IceInstMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698