Lines Matching full:we

100     // We could preserve the information from these two analysis but  in getAnalysisUsage()
113 // By default we assume we will have to repair something. in assignmentMatch()
142 assert(!NewVRegs.empty() && "We should not have to repair"); in repairReg()
146 // Assume we are repairing a use and thus, the original reg will be in repairReg()
151 // If we repair a definition, swap the source and destination for in repairReg()
157 "We are about to create several defs for Dst"); in repairReg()
216 // Check if MI is legal. if not, we need to legalize all the in repairReg()
217 // instructions we are going to insert. in repairReg()
240 assert(MO.isReg() && "We should only repair register operand"); in getRepairCost()
245 // If MO does not have a register bank, we should have just been in getRepairCost()
246 // able to set one unless we have to break the value down. in getRepairCost()
256 // We should remember that this value is available somewhere else to in getRepairCost()
264 // If we repair a definition, swap the source and destination for in getRepairCost()
269 // If we repair something where the source is defined by a copy in getRepairCost()
270 // and the source of that copy is on the right bank, we can reuse in getRepairCost()
275 // We can simply propagate AlternativeSrc instead of copying RegToRepair in getRepairCost()
277 // We would also need to propagate this information in the in getRepairCost()
327 assert(RepairPt.hasSplit() && "We should not have to adjust for split"); in tryAvoidingSplit()
329 // because we only do local repairing. in tryAvoidingSplit()
330 assert((MI.isPHI() || MI.isTerminator()) && "Why do we split?"); in tryAvoidingSplit()
335 // If we need splitting for phis, that means it is because we in tryAvoidingSplit()
341 // We split to repair the use of a phi or a terminator. in tryAvoidingSplit()
357 // At this point, we need to repair a defintion of a terminator. in tryAvoidingSplit()
359 // Technically we need to fix the def of MI on all outgoing in tryAvoidingSplit()
360 // edges of MI to keep the repairing local. In other words, we in tryAvoidingSplit()
364 // However, there are other cases where we can get away with in tryAvoidingSplit()
369 // Since we use RPO traversal, if we need to repair a definition in tryAvoidingSplit()
376 // is supported so we may just drop them. Indeed, if we do not change in tryAvoidingSplit()
378 // when we get to them. in tryAvoidingSplit()
382 // the same as for #2. If the value stays in one register, we could in tryAvoidingSplit()
383 // just switch the register bank of the definition, but we would need to in tryAvoidingSplit()
384 // account for a repairing cost for each phi we silently change. in tryAvoidingSplit()
387 // registers, the repairing is not local anymore as we need to patch in tryAvoidingSplit()
391 // - If the value is in a physical register, we can do the split and in tryAvoidingSplit()
394 // - If the value remains in one register, we do not have to split in tryAvoidingSplit()
395 // just switching the register bank would do, but we need to account in tryAvoidingSplit()
396 // in the repairing cost all the phi we changed. in tryAvoidingSplit()
397 // - If the value spans several registers, then we cannot do a local in tryAvoidingSplit()
403 // We are going to split every outgoing edges. in tryAvoidingSplit()
407 // Because of that we would technically need a way to get in tryAvoidingSplit()
409 // we have to split. in tryAvoidingSplit()
410 // Assert that we do not hit the ill-formed representation. in tryAvoidingSplit()
420 // If the next terminator uses Reg, this means we have in tryAvoidingSplit()
421 // to split right after MI and thus we need a way to ask in tryAvoidingSplit()
425 // We will split all the edges and repair there. in tryAvoidingSplit()
429 // There is nothing to repair, but we may actually lie on in tryAvoidingSplit()
435 // We need to do non-local repairing. Basically, patch all in tryAvoidingSplit()
436 // the uses (i.e., phis) that we already proceeded. in tryAvoidingSplit()
467 // match this mapping. In other words, we may need to locally reassign the in computeMapping()
503 // If we need to split a basic block to materialize this insertion point, in computeMapping()
504 // we may give a higher cost to this mapping. in computeMapping()
505 // Nevertheless, we may get away with the split, so try that first. in computeMapping()
516 // Unless the cost is already saturated or we do not care about the cost. in computeMapping()
520 // To get accurate information we need MBFI and MBPI. in computeMapping()
521 // Thus, if we end up here this information should be here. in computeMapping()
524 // FIXME: We will have to rework the repairing cost model. in computeMapping()
526 // However, when we break down the value into different values, in computeMapping()
528 // For the fast mode, we don't compute the cost so that is fine, in computeMapping()
529 // but still for the repairing code, we will have to make a choice. in computeMapping()
530 // For the greedy mode, we should choose greedily what is the best in computeMapping()
543 // We should not need more than a couple of instructions to repair in computeMapping()
552 assert(InsertPt->canMaterialize() && "We should not have made it here"); in computeMapping()
553 // We will applied some basic block frequency and those uses uint64_t. in computeMapping()
558 // Again we shouldn't overflow here givent that in computeMapping()
564 // Check if we just overflowed. in computeMapping()
579 // We need to still gather the repairing information though. in computeMapping()
646 // We can assume every instruction above this one has a selected register in assignInstr()
683 // Use a RPOT to make sure all registers are assigned before we choose in assignRegisterBanks()
764 // Default is, we are going to insert code to repair OpIdx. in RepairingPlacement()
776 // Check if we are done with MI. in RepairingPlacement()
779 // We are done with the initialization. in RepairingPlacement()
786 // * Before, we have to split the related incoming edge. in RepairingPlacement()
796 // We repair a use of a phi, we may need to split the related edge. in RepairingPlacement()
798 // Check if we can move the insertion point prior to the in RepairingPlacement()
804 // We cannot hoist the repairing code in the predecessor. in RepairingPlacement()
809 // At this point, we can insert in Pred. in RepairingPlacement()
811 // - If It is invalid, Pred is empty and we can insert in Pred in RepairingPlacement()
812 // wherever we want. in RepairingPlacement()
821 // * After, we have to split the outcoming edges. in RepairingPlacement()
837 // We are sure to be right before the first terminator. in RepairingPlacement()
842 // we do not know how to split. in RepairingPlacement()
880 // Since we do not support splitting, we do not need to update in InstrInsertPoint()
891 // If we need to split between the terminators, we theoritically in materialize()
894 // Now, in pratice, we should have a maximum of 2 branch in materialize()
896 // we know how to update the successor by looking at the target of in materialize()
898 // If we end up splitting at some point, then, we should update in materialize()
899 // the liveness information and such. I.e., we would need to in materialize()
911 // If the insertion point is after a terminator, we need to split. in isSplit()
914 // If we insert before an instruction that is after a terminator, in isSplit()
915 // we are still after a terminator. in isSplit()
920 // Even if we need to split, because we insert between terminators, in frequency()
938 // If we end up repairing twice at the same place before materializing the in materialize()
939 // insertion point, we may think we have to split an edge twice. in materialize()
940 // We should have a factory for the insert point such that identical points in materialize()
946 // We reuse the destination block to hold the information of the new block. in materialize()
971 // If this is not a critical edge, we should not have used this insert in canMaterialize()
1028 // At this point we know both costs hold sensible values. in operator <()
1031 // we can do but to scale everything. in operator <()
1032 // However, if they have the same base frequency we can avoid making in operator <()
1038 // At this point, we know the local costs are comparable. in operator <()
1045 // The base costs are comparable so we may only keep the relative in operator <()
1082 // If both overflows, we cannot compare without additional in operator <()
1086 // If one overflows but not the other, we can still compare. in operator <()