summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenInstruction.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-06-15 04:50:36 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-06-15 04:50:36 +0000
commitae1920b1efa72c1789d562df4746110d0c2e10bd (patch)
tree22d7d8690b9997d57f32d4a0fd850b3d99dd0846 /utils/TableGen/CodeGenInstruction.cpp
parent393c4047c05b6d7b5851d339e51bb2cc35f630c2 (diff)
downloadllvm-ae1920b1efa72c1789d562df4746110d0c2e10bd.tar.gz
llvm-ae1920b1efa72c1789d562df4746110d0c2e10bd.tar.bz2
llvm-ae1920b1efa72c1789d562df4746110d0c2e10bd.tar.xz
Give CodeGenRegisterClass a real sorted member set.
Make the Elements vector private and expose an ArrayRef through getOrder() instead. getOrder will eventually provide multiple user-specified allocation orders. Use the sorted member set for member and subclass tests. Clean up a lot of ad hoc searches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r--utils/TableGen/CodeGenInstruction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp
index 5b0aedfbc8..73fe916258 100644
--- a/utils/TableGen/CodeGenInstruction.cpp
+++ b/utils/TableGen/CodeGenInstruction.cpp
@@ -417,7 +417,8 @@ bool CodeGenInstAlias::tryAliasOpMatch(DagInit *Result, unsigned AliasOpNo,
if (!InstOpRec->isSubClassOf("RegisterClass"))
return false;
- if (!T.getRegisterClass(InstOpRec).containsRegister(ADI->getDef()))
+ if (!T.getRegisterClass(InstOpRec)
+ .contains(T.getRegBank().getReg(ADI->getDef())))
throw TGError(Loc, "fixed register " +ADI->getDef()->getName()
+ " is not a member of the " + InstOpRec->getName() +
" register class!");