diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-01-24 22:47:04 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-01-24 22:47:04 +0000 |
| commit | baa5d2e69c156a9d8c5bb33ca76a2f3b4629ea65 (patch) | |
| tree | f8bdfcc4a7fca8292e5e8ee2217cb18ede64d4fe /llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp | |
| parent | f3ecbfc164540353bc882137425e1a5e34623598 (diff) | |
| download | bcm5719-llvm-baa5d2e69c156a9d8c5bb33ca76a2f3b4629ea65.tar.gz bcm5719-llvm-baa5d2e69c156a9d8c5bb33ca76a2f3b4629ea65.zip | |
RegBankSelect: Support some more complex part mappings
llvm-svn: 352123
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp b/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp index 6c91dad20fb..1b639945293 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp @@ -497,6 +497,19 @@ void RegisterBankInfo::PartialMapping::print(raw_ostream &OS) const { OS << "nullptr"; } +bool RegisterBankInfo::ValueMapping::partsAllUniform() const { + if (NumBreakDowns < 2) + return true; + + const PartialMapping *First = begin(); + for (const PartialMapping *Part = First + 1; Part != end(); ++Part) { + if (Part->Length != First->Length || Part->RegBank != First->RegBank) + return false; + } + + return true; +} + bool RegisterBankInfo::ValueMapping::verify(unsigned MeaningfulBitWidth) const { assert(NumBreakDowns && "Value mapped nowhere?!"); unsigned OrigValueBitWidth = 0; |

