Lines Matching full:we
75 // We could preserve the information from these two analysis but in getAnalysisUsage()
86 // By default we assume we will have to repair something. in assignmentMatch()
112 assert(NewVRegs.begin() != NewVRegs.end() && "We should not have to repair"); in repairReg()
114 // Assume we are repairing a use and thus, the original reg will be in repairReg()
119 // If we repair a definition, swap the source and destination for in repairReg()
126 "We are about to create several defs for Dst"); in repairReg()
134 // Check if MI is legal. if not, we need to legalize all the in repairReg()
135 // instructions we are going to insert. in repairReg()
157 assert(MO.isReg() && "We should only repair register operand"); in getRepairCost()
162 // If MO does not have a register bank, we should have just been in getRepairCost()
163 // able to set one unless we have to break the value down. in getRepairCost()
164 assert((!IsSameNumOfValues || CurRegBank) && "We should not have to repair"); in getRepairCost()
172 // We should remember that this value is available somewhere else to in getRepairCost()
177 // If we repair a definition, swap the source and destination for in getRepairCost()
182 // If we repair something where the source is defined by a copy in getRepairCost()
183 // and the source of that copy is on the right bank, we can reuse in getRepairCost()
188 // We can simply propagate AlternativeSrc instead of copying RegToRepair in getRepairCost()
190 // We would also need to propagate this information in the in getRepairCost()
230 assert(RepairPt.hasSplit() && "We should not have to adjust for split"); in tryAvoidingSplit()
232 // because we only do local repairing. in tryAvoidingSplit()
233 assert((MI.isPHI() || MI.isTerminator()) && "Why do we split?"); in tryAvoidingSplit()
238 // If we need splitting for phis, that means it is because we in tryAvoidingSplit()
244 // We split to repair the use of a phi or a terminator. in tryAvoidingSplit()
260 // At this point, we need to repair a defintion of a terminator. in tryAvoidingSplit()
262 // Technically we need to fix the def of MI on all outgoing in tryAvoidingSplit()
263 // edges of MI to keep the repairing local. In other words, we in tryAvoidingSplit()
267 // However, there are other cases where we can get away with in tryAvoidingSplit()
272 // Since we use RPO traversal, if we need to repair a definition in tryAvoidingSplit()
279 // is supported so we may just drop them. Indeed, if we do not change in tryAvoidingSplit()
281 // when we get to them. in tryAvoidingSplit()
285 // the same as for #2. If the value stays in one register, we could in tryAvoidingSplit()
286 // just switch the register bank of the definition, but we would need to in tryAvoidingSplit()
287 // account for a repairing cost for each phi we silently change. in tryAvoidingSplit()
290 // registers, the repairing is not local anymore as we need to patch in tryAvoidingSplit()
294 // - If the value is in a physical register, we can do the split and in tryAvoidingSplit()
297 // - If the value remains in one register, we do not have to split in tryAvoidingSplit()
298 // just switching the register bank would do, but we need to account in tryAvoidingSplit()
299 // in the repairing cost all the phi we changed. in tryAvoidingSplit()
300 // - If the value spans several registers, then we cannot do a local in tryAvoidingSplit()
306 // We are going to split every outgoing edges. in tryAvoidingSplit()
310 // Because of that we would technically need a way to get in tryAvoidingSplit()
312 // we have to split. in tryAvoidingSplit()
313 // Assert that we do not hit the ill-formed representation. in tryAvoidingSplit()
323 // If the next terminator uses Reg, this means we have in tryAvoidingSplit()
324 // to split right after MI and thus we need a way to ask in tryAvoidingSplit()
327 // We will split all the edges and repair there. in tryAvoidingSplit()
331 // There is nothing to repair, but we may actually lie on in tryAvoidingSplit()
337 // We need to do non-local repairing. Basically, patch all in tryAvoidingSplit()
338 // the uses (i.e., phis) that we already proceeded. in tryAvoidingSplit()
362 // match this mapping. In other words, we may need to locally reassign the in computeMapping()
394 // If we need to split a basic block to materialize this insertion point, in computeMapping()
395 // we may give a higher cost to this mapping. in computeMapping()
396 // Nevertheless, we may get away with the split, so try that first. in computeMapping()
405 // Unless the cost is already saturated or we do not care about the cost. in computeMapping()
409 // To get accurate information we need MBFI and MBPI. in computeMapping()
410 // Thus, if we end up here this information should be here. in computeMapping()
413 // FIXME: We will have to rework the repairing cost model. in computeMapping()
415 // However, when we break down the value into different values, in computeMapping()
417 // For the fast mode, we don't compute the cost so that is fine, in computeMapping()
418 // but still for the repairing code, we will have to make a choice. in computeMapping()
419 // For the greedy mode, we should choose greedily what is the best in computeMapping()
427 // We should not need more than a couple of instructions to repair in computeMapping()
436 assert(InsertPt->canMaterialize() && "We should not have made it here"); in computeMapping()
437 // We will applied some basic block frequency and those uses uint64_t. in computeMapping()
442 // Again we shouldn't overflow here givent that in computeMapping()
448 // Check if we just overflowed. in computeMapping()
461 // We need to still gather the repairing information though. in computeMapping()
546 // Use a RPOT to make sure all registers are assigned before we choose in runOnMachineFunction()
570 // Default is, we are going to insert code to repair OpIdx. in RepairingPlacement()
585 // Check if we are done with MI. in RepairingPlacement()
588 // We are done with the initialization. in RepairingPlacement()
595 // * Before, we have to split the related incoming edge. in RepairingPlacement()
605 // We repair a use of a phi, we may need to split the related edge. in RepairingPlacement()
607 // Check if we can move the insertion point prior to the in RepairingPlacement()
613 // We cannot hoist the repairing code in the predecessor. in RepairingPlacement()
618 // At this point, we can insert in Pred. in RepairingPlacement()
620 // - If It is invalid, Pred is empty and we can insert in Pred in RepairingPlacement()
621 // wherever we want. in RepairingPlacement()
630 // * After, we have to split the outcoming edges. in RepairingPlacement()
646 // we do not know how to split. in RepairingPlacement()
683 // Since we do not support splitting, we do not need to update in InstrInsertPoint()
694 // If we need to split between the terminators, we theoritically in materialize()
697 // Now, in pratice, we should have a maximum of 2 branch in materialize()
699 // we know how to update the successor by looking at the target of in materialize()
701 // If we end up splitting at some point, then, we should update in materialize()
702 // the liveness information and such. I.e., we would need to in materialize()
714 // If the insertion point is after a terminator, we need to split. in isSplit()
717 // If we insert before an instruction that is after a terminator, in isSplit()
718 // we are still after a terminator. in isSplit()
723 // Even if we need to split, because we insert between terminators, in frequency()
741 // If we end up repairing twice at the same place before materializing the in materialize()
742 // insertion point, we may think we have to split an edge twice. in materialize()
743 // We should have a factory for the insert point such that identical points in materialize()
749 // We reuse the destination block to hold the information of the new block. in materialize()
771 // If this is not a critical edge, we should not have used this insert in canMaterialize()
828 // At this point we know both costs hold sensible values. in operator <()
831 // we can do but to scale everything. in operator <()
832 // However, if they have the same base frequency we can avoid making in operator <()
838 // At this point, we know the local costs are comparable. in operator <()
845 // The base costs are comparable so we may only keep the relative in operator <()
883 // If both overflows, we cannot compare without additional in operator <()
887 // If one overflows but not the other, we can still compare. in operator <()