diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-07-27 14:31:55 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-07-27 14:31:55 +0000 |
commit | 6756a2c95335fba8bece4402e62f5057a20f3b4c (patch) | |
tree | 709ff96a5dff1a43cd8648f7001709782eb47020 /llvm/lib/CodeGen/MachineRegisterInfo.cpp | |
parent | 5e402eec7bc306343cfba703fd4d4acc981b4ead (diff) | |
download | llvm-6756a2c95335fba8bece4402e62f5057a20f3b4c.zip llvm-6756a2c95335fba8bece4402e62f5057a20f3b4c.tar.gz llvm-6756a2c95335fba8bece4402e62f5057a20f3b4c.tar.bz2 |
[GlobalISel] Introduce an instruction selector.
And implement it for AArch64, supporting x/w ADD/OR.
Differential Revision: https://reviews.llvm.org/D22373
llvm-svn: 276875
Diffstat (limited to 'llvm/lib/CodeGen/MachineRegisterInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineRegisterInfo.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp index 9678655..886de80 100644 --- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp +++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp @@ -136,6 +136,20 @@ MachineRegisterInfo::createGenericVirtualRegister(unsigned Size) { return Reg; } +void MachineRegisterInfo::clearVirtRegSizes() { +#ifndef NDEBUG + // Verify that the size of the now-constrained vreg is unchanged. + for (auto &VRegToSize : getVRegToSize()) { + auto *RC = getRegClass(VRegToSize.first); + if (VRegToSize.second != (RC->getSize() * 8)) + llvm_unreachable( + "Virtual register has explicit size different from its class size"); + } +#endif + + getVRegToSize().clear(); +} + /// clearVirtRegs - Remove all virtual registers (after physreg assignment). void MachineRegisterInfo::clearVirtRegs() { #ifndef NDEBUG |