summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineRegisterInfo.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-09-12 11:20:10 +0000
committerTim Northover <tnorthover@apple.com>2016-09-12 11:20:10 +0000
commitd28d3cc079bbda0e0d028a1cd012db0f9d0bcff7 (patch)
tree137a13971af516384119817ef02fd080d8c3a546 /llvm/lib/CodeGen/MachineRegisterInfo.cpp
parentc6a123111a3b24ea48d15c13b4374c3671fea815 (diff)
downloadbcm5719-llvm-d28d3cc079bbda0e0d028a1cd012db0f9d0bcff7.tar.gz
bcm5719-llvm-d28d3cc079bbda0e0d028a1cd012db0f9d0bcff7.zip
GlobalISel: disambiguate types when printing MIR
Some generic instructions have multiple types. While in theory these always be discovered by inspecting the single definition of each generic vreg, in practice those definitions won't always be local and traipsing through a big function to find them will not be fun. So this changes MIRPrinter to print out the type of uses as well as defs, if they're known to be different or not known to be the same. On the parsing side, we're a little more flexible: provided each register is given a type in at least one place it's mentioned (and all types are consistent) we accept the MIR. This doesn't introduce ambiguity but makes writing tests manually a bit less painful. llvm-svn: 281204
Diffstat (limited to 'llvm/lib/CodeGen/MachineRegisterInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineRegisterInfo.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
index a16211cfa2b..ca89a1ff7bc 100644
--- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp
+++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
@@ -126,8 +126,6 @@ void MachineRegisterInfo::setType(unsigned VReg, LLT Ty) {
unsigned
MachineRegisterInfo::createGenericVirtualRegister(LLT Ty) {
- assert(Ty.isValid() && "Cannot create empty virtual register");
-
// New virtual register number.
unsigned Reg = TargetRegisterInfo::index2VirtReg(getNumVirtRegs());
VRegInfo.grow(Reg);
OpenPOWER on IntegriCloud