diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-06-08 15:40:32 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-06-08 15:40:32 +0000 |
commit | 6feaf82088c5b188928cde3924d484334c8c8d89 (patch) | |
tree | 1e46f9d35a6ddc6b4deac6826af1c91fb145d899 /llvm/lib/CodeGen | |
parent | cf236ec299a8e14b86dd767babfb52c3629a7d2f (diff) | |
download | bcm5719-llvm-6feaf82088c5b188928cde3924d484334c8c8d89.tar.gz bcm5719-llvm-6feaf82088c5b188928cde3924d484334c8c8d89.zip |
[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
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp index 4890d45a6d3..53472857b9a 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp @@ -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%. |