summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-05-22 11:56:09 +0000
committerTim Northover <tnorthover@apple.com>2014-05-22 11:56:09 +0000
commitc350acfda59336e54a5dd4e139dd5c650e6a1968 (patch)
tree9d24215b1acda35d902d7113a1fe44c4ddc6d9f4 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp
parent18b68e16af01f9493b25b12d654ac08794818eea (diff)
downloadbcm5719-llvm-c350acfda59336e54a5dd4e139dd5c650e6a1968.tar.gz
bcm5719-llvm-c350acfda59336e54a5dd4e139dd5c650e6a1968.zip
ARM64: separate load/store operands to simplify assembler
This changes ARM64 to use separate operands for each component of an address, and look for separate '[', '$Rn, ..., ']' tokens when parsing. This allows us to do away with quite a bit of special C++ code to handle monolithic "addressing modes" in the MC components. The more incremental matching of the assembler operands also allows for better diagnostics when LLVM is presented with invalid input. Most of the complexity here is with the register-offset instructions, which were extremely dodgy beforehand: even when the instruction used wM, LLVM's model had xM as an operand. We papered over this discrepancy before, but that approach doesn't work now so I split them into separate X and W variants. llvm-svn: 209425
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 1636fb42339..00bc9a5bbb9 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -1718,9 +1718,9 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
DagInit *MIOpInfo = OperandNode->getValueAsDag("MIOperandInfo");
if (unsigned NumArgs = MIOpInfo->getNumArgs()) {
// But don't do that if the whole operand is being provided by
- // a single ComplexPattern.
- const ComplexPattern *AM = Child->getComplexPatternInfo(CDP);
- if (!AM || AM->getNumOperands() < NumArgs) {
+ // a single ComplexPattern-related Operand.
+
+ if (Child->getNumMIResults(CDP) < NumArgs) {
// Match first sub-operand against the child we already have.
Record *SubRec = cast<DefInit>(MIOpInfo->getArg(0))->getDef();
MadeChange |=
OpenPOWER on IntegriCloud