Lines Matching full:insert
64 MachineInstr *Insert) const {
67 // DBG_VALUEs between Def and Insert
70 if (Def->getParent() == Insert->getParent()) {
71 // When Def and Insert are within the same BB, check if Insert comes after
77 if (&*MI == Insert) {
87 } else { // Def and Insert are in different BBs
88 // If Def and Insert are in different BBs, we only handle a simple case in
89 // which Insert's BB is a successor of Def's BB.
90 if (!Def->getParent()->isSuccessor(Insert->getParent()))
94 // 'Insert BB's begin~Insert'
101 for (MachineBasicBlock::iterator MI = Insert->getParent()->begin(),
102 ME = Insert->getIterator();
109 // Gather DebugVariables that are seen between Def and Insert, excluding our
122 // another DBG_VALUE between Def and Insert referring to the same
221 MachineInstr *Insert) const {
222 if (Def->getParent() != Insert->getParent())
225 ME = Insert;
244 // 'Insert'. Convert the original DBG_VALUEs into undefs.
246 // For DBG_VALUEs to sink properly, if 'Def' and 'Insert' are within the same
247 // BB, 'Insert' should be below 'Def'; if they are in different BBs, 'Insert'
253 void WebAssemblyDebugValueManager::sink(MachineInstr *Insert) {
260 // %1 = anotherinst // Insert
267 // %1 = anotherinst // Insert
268 if (isInsertSamePlace(Insert))
271 MachineBasicBlock *MBB = Insert->getParent();
275 // Def, because we need to examine instructions between Def and Insert.
277 getSinkableDebugValues(Insert);
286 MBB->splice(Insert, Def->getParent(), Def);
291 // Clone sinkable DBG_VALUEs and insert them.
295 MBB->insert(Insert, Clone);
345 // 'Insert'.
347 // For DBG_VALUEs to be cloned properly, if 'Def' and 'Insert' are within the
348 // same BB, 'Insert' should be below 'Def'; if they are in different BBs,
349 // 'Insert' should be in one of 'Def's BBs successors. Def will be cloned
354 void WebAssemblyDebugValueManager::cloneSink(MachineInstr *Insert,
357 MachineBasicBlock *MBB = Insert->getParent();
361 getSinkableDebugValues(Insert);
373 MBB->insert(Insert, Clone);
379 // Clone sinkable DBG_VALUEs and insert them.
383 MBB->insert(Insert, Clone);