diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-05-20 18:37:33 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-05-20 18:37:33 +0000 |
commit | 8cd572cb8ff5220342508ef830f6208ccd0cdc28 (patch) | |
tree | a3e405379ff60a87c83a9f1a3b1b068c24fa58b8 /include | |
parent | 28b72d65fffafa270213b67e043f690b22285b57 (diff) |
[RegBankSelect] Look for the best mapping in greedy mode.
The Fast mode takes the first mapping, the greedy mode loops over all
the possible mapping for an instruction and choose the cheaper one.
Test case will come with target specific code, since we currently do not
have instructions that have several mappings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/GlobalISel/RegBankSelect.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/GlobalISel/RegBankSelect.h b/include/llvm/CodeGen/GlobalISel/RegBankSelect.h index 7b8601fc3ae..e8454e82f89 100644 --- a/include/llvm/CodeGen/GlobalISel/RegBankSelect.h +++ b/include/llvm/CodeGen/GlobalISel/RegBankSelect.h @@ -525,6 +525,13 @@ private: RegBankSelect::RepairingPlacement &RepairPt, const iterator_range<SmallVectorImpl<unsigned>::iterator> &NewVRegs); + /// Find the best mapping for \p MI from \p PossibleMappings. + /// \return a reference on the best mapping in \p PossibleMappings. + RegisterBankInfo::InstructionMapping & + findBestMapping(MachineInstr &MI, + RegisterBankInfo::InstructionMappings &PossibleMappings, + SmallVectorImpl<RepairingPlacement> &RepairPts); + /// Compute the cost of mapping \p MI with \p InstrMapping and /// compute the repairing placement for such mapping in \p /// RepairPts. |