summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineRegisterInfo.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-11-08 20:39:03 +0000
committerTim Northover <tnorthover@apple.com>2016-11-08 20:39:03 +0000
commit6cddfc14f9d0ada23ba5a22902e0140260788058 (patch)
treea36f29efe98808dac0d43f94d880dd25073a0fc0 /llvm/lib/CodeGen/MachineRegisterInfo.cpp
parent6a9767c7e6983c3211e35757899fb83afb2eb807 (diff)
downloadbcm5719-llvm-6cddfc14f9d0ada23ba5a22902e0140260788058.tar.gz
bcm5719-llvm-6cddfc14f9d0ada23ba5a22902e0140260788058.zip
GlobalISel: allow CodeGen to fallback on VReg type/class issues.
After instruction selection we perform some checks on each VReg just before discarding the type information. These checks were assertions before, but that breaks the fallback path so this patch moves the logic into the main flow and reports a better error on failure. llvm-svn: 286289
Diffstat (limited to 'llvm/lib/CodeGen/MachineRegisterInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineRegisterInfo.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
index 1d6e10acb15..242cb0b8095 100644
--- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp
+++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
@@ -143,17 +143,6 @@ MachineRegisterInfo::createGenericVirtualRegister(LLT Ty) {
}
void MachineRegisterInfo::clearVirtRegTypes() {
-#ifndef NDEBUG
- // Verify that the size of the now-constrained vreg is unchanged.
- for (auto &VRegToType : getVRegToType()) {
- auto *RC = getRegClass(VRegToType.first);
- if (VRegToType.second.isValid() &&
- VRegToType.second.getSizeInBits() > (RC->getSize() * 8))
- llvm_unreachable(
- "Virtual register has explicit size different from its class size");
- }
-#endif
-
getVRegToType().clear();
}
OpenPOWER on IntegriCloud