Lines Matching defs:gate
22 void GraphEditor::RemoveDeadState(Circuit* circuit, GateRef gate)
25 editor.ReplaceGate(gate);
44 void GraphEditor::ReplaceGate(GateRef gate)
46 auto uses = acc_.Uses(gate);
49 GateRef depend = acc_.GetDep(gate);
56 acc_.DeleteGate(gate);
63 GateRef gate = edge.GetGate();
65 auto opcode = acc_.GetOpCode(gate);
86 GateRef gate = edge.GetGate();
88 if (acc_.IsStateIn(gate, edge.GetIndex())) {
89 ASSERT(acc_.GetStateCount(gate) == 1);
90 ReplaceGate(gate);
95 if (acc_.IsValueIn(gate, edge.GetIndex())) {
96 // value gate
97 ReplaceGate(gate);
103 GateRef gate = edge.GetGate();
104 auto numIns = acc_.GetNumIns(gate);
106 ReplaceGate(gate);
108 auto uses = acc_.Uses(gate);
121 acc_.DecreaseIn(gate, edge.GetIndex());
125 bool GraphEditor::HasOsrDeoptUse(GateRef gate)
128 acc_.GetValueUses(gate, valueOuts);
159 // set finished for used gate which is self-use or has same inputs
161 for (auto gate : gateList) {
162 if (acc_.IsValueSelector(gate)) {
163 phis.emplace_back(gate);
166 if (acc_.IsFrameValues(gate) && !HasOsrDeoptUse(gate)) {
170 auto valueNum = acc_.GetNumValueIn(gate);
172 GateRef input = acc_.GetValueIn(gate, i);