summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2016-07-28 16:58:27 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2016-07-28 16:58:27 +0000
commit46c05fc861c49b82e049aefd9799bc39edb2b768 (patch)
tree70cebf0c6a616f5ed41118e1f9a7e388bf32d2ea /llvm/lib/CodeGen/MachineInstr.cpp
parent07994ec39b5242be73c420b5edc581536ad150cd (diff)
downloadbcm5719-llvm-46c05fc861c49b82e049aefd9799bc39edb2b768.tar.gz
bcm5719-llvm-46c05fc861c49b82e049aefd9799bc39edb2b768.zip
[GlobalISel] Remove types on selected insts instead of using LLT().
LLT() has a particular meaning: it's one invalid type. But we really want selected instructions to have no type whatsoever. Also verify that types don't linger after ISel, and enable the verifier on the AArch64 select test. llvm-svn: 277001
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index ac5ce811f3a..ca3799db1ed 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -716,6 +716,8 @@ void MachineInstr::setType(LLT Ty, unsigned Idx) {}
LLT MachineInstr::getType(unsigned Idx) const { return LLT{}; }
+void MachineInstr::removeTypes() {}
+
#else
unsigned MachineInstr::getNumTypes() const { return Tys.size(); }
@@ -728,6 +730,10 @@ void MachineInstr::setType(LLT Ty, unsigned Idx) {
}
LLT MachineInstr::getType(unsigned Idx) const { return Tys[Idx]; }
+
+void MachineInstr::removeTypes() {
+ Tys.clear();
+}
#endif // LLVM_BUILD_GLOBAL_ISEL
/// RemoveRegOperandsFromUseLists - Unlink all of the register operands in
OpenPOWER on IntegriCloud