[RegBankSelect] Explain what it would take to support non-copy

repairing.

Copies are easy because we repair only when there is a mismatch. For
non-copy repairing, i.e., cases that involves breaking down or gathering
up the value, one of the operand may not have a register bank yet. Thus,
derivate a cost from that, requires more work.

llvm-svn: 272157
This commit is contained in:
Quentin Colombet 2016-06-08 15:40:32 +00:00
parent cf236ec299
commit 6feaf82088
1 changed files with 9 additions and 0 deletions

View File

@ -384,6 +384,15 @@ RegBankSelect::MappingCost RegBankSelect::computeMapping(
// Thus, if we end up here this information should be here.
assert(MBFI && MBPI && "Cost computation requires MBFI and MBPI");
// FIXME: We will have to rework the repairing cost model.
// The repairing cost depends on the register bank that MO has.
// However, when we break down the value into different values,
// MO may not have a register bank while still needing repairing.
// For the fast mode, we don't compute the cost so that is fine,
// but still for the repairing code, we will have to make a choice.
// For the greedy mode, we should choose greedily what is the best
// choice based on the next use of MO.
// Sums up the repairing cost of MO at each insertion point.
uint64_t RepairCost = getRepairCost(MO, ValMapping);
// Bias used for splitting: 5%.