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

Unified Diff: src/IceCfgNode.cpp

Issue 1890283002: Subzero, Wasm: Link and run torture tests; bug fixes. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review feedback 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/IceCfgNode.h ('k') | src/WasmTranslator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfgNode.cpp
diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp
index 94acff9802acca0caacc270ae40a2dbd5482752d..fb3708b0d08a94acb2c38ba80b6622719f42fd36 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -28,7 +28,7 @@ namespace Ice {
// Adds an instruction to either the Phi list or the regular instruction list.
// Validates that all Phis are added before all regular instructions.
-void CfgNode::appendInst(Inst *Instr, bool AllowPhisAnywhere) {
+void CfgNode::appendInst(Inst *Instr) {
++InstCountEstimate;
if (BuildDefs::wasm()) {
@@ -41,7 +41,7 @@ void CfgNode::appendInst(Inst *Instr, bool AllowPhisAnywhere) {
}
if (auto *Phi = llvm::dyn_cast<InstPhi>(Instr)) {
- if (!AllowPhisAnywhere && !Insts.empty()) {
+ if (!Insts.empty()) {
Func->setError("Phi instruction added to the middle of a block");
return;
}
@@ -84,6 +84,7 @@ void CfgNode::computePredecessors() {
void CfgNode::computeSuccessors() {
OutEdges.clear();
InEdges.clear();
+ assert(!Insts.empty());
OutEdges = Insts.rbegin()->getTerminatorEdges();
}
« no previous file with comments | « src/IceCfgNode.h ('k') | src/WasmTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698