diff options
author | Jessica Paquette <jpaquette@apple.com> | 2019-08-27 17:47:06 +0000 |
---|---|---|
committer | Jessica Paquette <jpaquette@apple.com> | 2019-08-27 17:47:06 +0000 |
commit | a2ea8a1eca54f9f98b86765b73b051e56e71340c (patch) | |
tree | e220a049d49fafdee84a2e20f3d4a7038264f11f /llvm/utils/TableGen/CodeGenTarget.h | |
parent | 1299945b81284680829d39b2839087dc71f3d176 (diff) | |
download | bcm5719-llvm-a2ea8a1eca54f9f98b86765b73b051e56e71340c.tar.gz bcm5719-llvm-a2ea8a1eca54f9f98b86765b73b051e56e71340c.zip |
Recommit "[GlobalISel] Import patterns containing INSERT_SUBREG"
I thought `llvm::sort` was stable for some reason but it's not.
Use `llvm::stable_sort` in `CodeGenTarget::getSuperRegForSubReg`.
Original patch: https://reviews.llvm.org/D66498
llvm-svn: 370084
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.h')
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h index 1ab2de269c7..d52ffac4ce6 100644 --- a/llvm/utils/TableGen/CodeGenTarget.h +++ b/llvm/utils/TableGen/CodeGenTarget.h @@ -103,6 +103,12 @@ public: /// getRegBank - Return the register bank description. CodeGenRegBank &getRegBank() const; + /// Return the largest register class on \p RegBank which supports \p Ty and + /// covers \p SubIdx if it exists. + Optional<CodeGenRegisterClass *> + getSuperRegForSubReg(const ValueTypeByHwMode &Ty, CodeGenRegBank &RegBank, + const CodeGenSubRegIndex *SubIdx) const; + /// getRegisterByName - If there is a register with the specific AsmName, /// return it. const CodeGenRegister *getRegisterByName(StringRef Name) const; |