Commit 09a934d5 authored by zygzagZ's avatar zygzagZ

Cleanup dead code

parent 19fd741d
......@@ -3,21 +3,6 @@
#include "../Compiler.h"
void BasicBlock::finishQuads() {
assert(afterInit.empty());
if (!afterInit.empty()) {
while (!quads.empty() && quads.back()->isFinal()) {
auto final = quads.back();
quads.pop_back();
afterInit.emplace_back(final);
}
for (const auto& q : afterInit) {
assert(q->block.get() == this);
quads.push_back(q);
}
afterInit.clear();
}
for (const auto& q : quads) {
q->useVariables();
}
......
......@@ -19,7 +19,6 @@ public:
quads.emplace_back(phi);
};
vector<QuadruplePtr> quads;
vector<QuadruplePtr> afterInit;
vector<BasicBlockPtr> in, out;
shared_ptr<QPhi> phi;
void append(const BasicBlockPtr& after) {
......@@ -39,10 +38,6 @@ public:
return "?";
}
void addJumpInitQuad(const QuadruplePtr& q) {
afterInit.push_back(q);
}
map<VariablePtr, VariablePtr> &findPhi(const BasicBlockPtr& blk) {
auto it = find(in.begin(), in.end(), blk);
if (it == in.end()) throw runtime_error("blk not found in incoming blocks");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment