summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-29 21:10:12 +0000
committerChris Lattner <sabre@nondot.org>2009-07-29 21:10:12 +0000
commitf3239532cc909b61ed069346cf524a46f1ce9f2f (patch)
tree9abf506ec60e5dc1a8a4c9b9f24bd7f8cdc4327e /llvm/lib/CodeGen/MachineVerifier.cpp
parent426bc7c0ae1d03841d7de80ef71de189b115afe3 (diff)
downloadbcm5719-llvm-f3239532cc909b61ed069346cf524a46f1ce9f2f.tar.gz
bcm5719-llvm-f3239532cc909b61ed069346cf524a46f1ce9f2f.zip
1. Introduce a new TargetOperandInfo::getRegClass() helper method
and convert code to using it, instead of having lots of things poke the isLookupPtrRegClass() method directly. 2. Make PointerLikeRegClass contain a 'kind' int, and store it in the existing regclass field of TargetOperandInfo when the isLookupPtrRegClass() predicate is set. Make getRegClass pass this into TargetRegisterInfo::getPointerRegClass(), allowing targets to have multiple ptr_rc things. llvm-svn: 77504
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index e4a26bcdc19..d9c37de2622 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -408,8 +408,7 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum)
}
sr = s;
}
- if (TOI.RegClass) {
- const TargetRegisterClass *DRC = TRI->getRegClass(TOI.RegClass);
+ if (const TargetRegisterClass *DRC = TOI.getRegClass(TRI)) {
if (!DRC->contains(sr)) {
report("Illegal physical register for instruction", MO, MONum);
*OS << TRI->getName(sr) << " is not a "
@@ -426,8 +425,7 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum)
}
RC = *(RC->subregclasses_begin()+SubIdx);
}
- if (TOI.RegClass) {
- const TargetRegisterClass *DRC = TRI->getRegClass(TOI.RegClass);
+ if (const TargetRegisterClass *DRC = TOI.getRegClass(TRI)) {
if (RC != DRC && !RC->hasSuperClass(DRC)) {
report("Illegal virtual register for instruction", MO, MONum);
*OS << "Expected a " << DRC->getName() << " register, but got a "
OpenPOWER on IntegriCloud