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

Unified Diff: src/IceInst.cpp

Issue 1876413002: Subzero. WASM. Additional progress. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review feedback and merging with master Created 4 years, 8 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/IceInstX86Base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.cpp
diff --git a/src/IceInst.cpp b/src/IceInst.cpp
index 1265d5898b7d1118723fb78a6e36c19f35b92a26..aac42c3bd2f98823a6a1a0d622c6f4558210f1d2 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -105,6 +105,7 @@ const char *Inst::getInstName() const {
X(Store, "store");
X(Switch, "switch");
X(Assign, "assign");
+ X(Breakpoint, "break");
X(BundleLock, "bundlelock");
X(BundleUnlock, "bundleunlock");
X(FakeDef, "fakedef");
@@ -516,8 +517,10 @@ void InstSwitch::addBranch(SizeT CaseIndex, uint64_t Value, CfgNode *Label) {
NodeList InstSwitch::getTerminatorEdges() const {
NodeList OutEdges;
OutEdges.reserve(NumCases + 1);
+ assert(LabelDefault);
OutEdges.push_back(LabelDefault);
for (SizeT I = 0; I < NumCases; ++I) {
+ assert(Labels[I]);
OutEdges.push_back(Labels[I]);
}
std::sort(OutEdges.begin(), OutEdges.end(),
@@ -1047,6 +1050,9 @@ void InstTarget::dump(const Cfg *Func) const {
Inst::dump(Func);
}
+InstBreakpoint::InstBreakpoint(Cfg *Func)
+ : InstHighLevel(Func, Inst::Breakpoint, 0, nullptr) {}
+
bool checkForRedundantAssign(const Variable *Dest, const Operand *Source) {
const auto *SrcVar = llvm::dyn_cast<const Variable>(Source);
if (!SrcVar)
« no previous file with comments | « src/IceInst.h ('k') | src/IceInstX86Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698