Skip to content

Commit a2a9bac

Browse files
alexmalyshevfacebook-github-bot
authored andcommitted
Delete unused method in lir::Rewrite
Summary: Title says it all. Reviewed By: mpage Differential Revision: D81721577 fbshipit-source-id: 1dbeeb2c4446b1908883093b5f7a85361bf16c08
1 parent 82bf28e commit a2a9bac

2 files changed

Lines changed: 0 additions & 26 deletions

File tree

cinderx/Jit/lir/rewrite.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -67,25 +67,4 @@ void Rewrite::runOneStage(int stage) {
6767
} while (changed);
6868
}
6969

70-
Instruction* Rewrite::findRecentFlagAffectingInstr(instr_iter_t instr_iter) {
71-
Instruction* condbranch = instr_iter->get();
72-
JIT_CHECK(
73-
condbranch->isCondBranch(), "Input must be a CondBranch instruction.");
74-
75-
BasicBlock* block = condbranch->basicblock();
76-
while (instr_iter != block->instructions().begin()) {
77-
--instr_iter;
78-
Instruction* instr = instr_iter->get();
79-
switch (InstrProperty::getProperties(instr).flag_effects) {
80-
case FlagEffects::kInvalidate:
81-
return nullptr;
82-
case FlagEffects::kSet:
83-
return instr;
84-
case FlagEffects::kNone:
85-
continue;
86-
}
87-
}
88-
return nullptr;
89-
}
90-
9170
} // namespace jit::lir

cinderx/Jit/lir/rewrite.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,6 @@ class Rewrite {
9292

9393
void run();
9494

95-
protected:
96-
// find the most recent instruction affecting flags within the
97-
// basic block. returns nullptr if not found.
98-
static Instruction* findRecentFlagAffectingInstr(instr_iter_t instr_iter);
99-
10095
private:
10196
template <typename T>
10297
std::pair<bool, const T*> getStageRewrites(

0 commit comments

Comments
 (0)