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

Unified Diff: src/IceInst.cpp

Issue 395193005: Start processing function blocks in Subzero. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code ready for review. Created 6 years, 5 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
Index: src/IceInst.cpp
diff --git a/src/IceInst.cpp b/src/IceInst.cpp
index 12ca16c4caa0c6fbf14858941294e9cae54722a6..9baa7c80a05b5c9ebf2a2e08cb279d260d86e3fb 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -228,6 +228,12 @@ InstArithmetic::InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest,
addSource(Source2);
}
+const char *InstArithmetic::getOpName(OpKind Op) {
+ size_t OpIndex = static_cast<size_t>(Op);
+ return OpIndex < InstArithmeticAttributesSize
+ ? InstArithmeticAttributes[OpIndex].DisplayString : "???";
+}
+
bool InstArithmetic::isCommutative() const {
return InstArithmeticAttributes[getOp()].IsCommutative;
}

Powered by Google App Engine
This is Rietveld 408576698