Lines Matching defs:gates
36 PrintGraph("Build extra basic block for scheduled gates", cfg);
107 void PostSchedule::ReplaceGateDirectly(std::vector<GateRef> &gates, ControlFlowGraph &cfg, size_t bbIdx, size_t instIdx)
110 bb.insert(bb.begin() + instIdx, gates.begin(), gates.end());
111 bb.erase(bb.begin() + instIdx + gates.size());
114 void PostSchedule::ScheduleEndBB(std::vector<GateRef> &gates, ControlFlowGraph &cfg, size_t bbIdx, size_t instIdx)
118 gates.insert(gates.begin() + 1, bb.begin(), bb.begin() + instIdx); // 1: after state gate
120 cfg.insert(cfg.begin() + bbIdx + 1, std::move(gates)); // 1: after current bb
123 void PostSchedule::ScheduleNewBB(std::vector<GateRef> &gates, ControlFlowGraph &cfg, size_t bbIdx)
125 if (!gates.empty()) {
126 cfg.insert(cfg.begin() + bbIdx + 1, std::move(gates));
130 void PostSchedule::ScheduleCurrentBB(const std::vector<GateRef> &gates, ControlFlowGraph &cfg, size_t bbIdx,
139 bb.insert(bb.begin(), gates.begin(), gates.end());
142 void PostSchedule::PrepareToScheduleNewGate(GateRef gate, std::vector<GateRef> &gates)
144 gates.emplace_back(gate);