diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-05-21 01:43:25 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-05-21 01:43:25 +0000 |
commit | a829698854d72b6d03912f5942717fa15bec6a1f (patch) | |
tree | 09c028698a46449e2ed3abc7799ee99178ea7668 /include | |
parent | 9e57bf586ce72e30039a8b226ef1aa6c310d25b5 (diff) |
[RegBankSelect] Compute the repairing cost for copies.
Prior to this patch, we were using 1 for all the repairing costs.
Now, we use the information from the target to get this information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/GlobalISel/RegBankSelect.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/GlobalISel/RegBankSelect.h b/include/llvm/CodeGen/GlobalISel/RegBankSelect.h index e8454e82f89..29a89dca18f 100644 --- a/include/llvm/CodeGen/GlobalISel/RegBankSelect.h +++ b/include/llvm/CodeGen/GlobalISel/RegBankSelect.h @@ -525,6 +525,15 @@ private: RegBankSelect::RepairingPlacement &RepairPt, const iterator_range<SmallVectorImpl<unsigned>::iterator> &NewVRegs); + /// Return the cost of the instruction needed to map \p MO to \p ValMapping. + /// The cost is free of basic block frequencies. + /// \pre MO.isReg() + /// \pre MO is assigned to a register bank. + /// \pre ValMapping is a valid mapping for MO. + uint64_t + getRepairCost(const MachineOperand &MO, + const RegisterBankInfo::ValueMapping &ValMapping) const; + /// Find the best mapping for \p MI from \p PossibleMappings. /// \return a reference on the best mapping in \p PossibleMappings. RegisterBankInfo::InstructionMapping & |