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