llvm.org GIT mirror llvm / 11fc646
Tidy up. Remove hard tab characters. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154532 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Grosbach 8 years ago
1 changed file(s) with 28 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
287287 Record *SingletonReg;
288288
289289 explicit AsmOperand(StringRef T) : Token(T), Class(0), SubOpIdx(-1),
290 SingletonReg(0) {}
290 SingletonReg(0) {}
291291 };
292292
293293 /// ResOperand - This represents a single operand in the result instruction
420420
421421 void Initialize(const AsmMatcherInfo &Info,
422422 SmallPtrSet &SingletonRegisters,
423 int AsmVariantNo, std::string &RegisterPrefix);
423 int AsmVariantNo, std::string &RegisterPrefix);
424424
425425 /// Validate - Return true if this matchable is a valid thing to match against
426426 /// and perform a bunch of validity checking.
817817 void MatchableInfo::
818818 extractSingletonRegisterForAsmOperand(unsigned OperandNo,
819819 const AsmMatcherInfo &Info,
820 std::string &RegisterPrefix) {
820 std::string &RegisterPrefix) {
821821 StringRef Tok = AsmOperands[OperandNo].Token;
822822 if (RegisterPrefix.empty()) {
823823 std::string LoweredTok = Tok.lower();
11851185 int AsmVariantNo = AsmVariant->getValueAsInt("Variant");
11861186
11871187 for (CodeGenTarget::inst_iterator I = Target.inst_begin(),
1188 E = Target.inst_end(); I != E; ++I) {
1188 E = Target.inst_end(); I != E; ++I) {
11891189 const CodeGenInstruction &CGI = **I;
11901190
11911191 // If the tblgen -match-prefix option is specified (for tblgen hackers),
11921192 // filter the set of instructions we consider.
11931193 if (!StringRef(CGI.TheDef->getName()).startswith(MatchPrefix))
1194 continue;
1194 continue;
11951195
11961196 // Ignore "codegen only" instructions.
11971197 if (CGI.TheDef->getValueAsBit("isCodeGenOnly"))
1198 continue;
1198 continue;
11991199
12001200 // Validate the operand list to ensure we can handle this instruction.
12011201 for (unsigned i = 0, e = CGI.Operands.size(); i != e; ++i) {
1202 const CGIOperandList::OperandInfo &OI = CGI.Operands[i];
1203
1204 // Validate tied operands.
1205 if (OI.getTiedRegister() != -1) {
1206 // If we have a tied operand that consists of multiple MCOperands,
1207 // reject it. We reject aliases and ignore instructions for now.
1208 if (OI.MINumOperands != 1) {
1209 // FIXME: Should reject these. The ARM backend hits this with $lane
1210 // in a bunch of instructions. It is unclear what the right answer is.
1211 DEBUG({
1212 errs() << "warning: '" << CGI.TheDef->getName() << "': "
1213 << "ignoring instruction with multi-operand tied operand '"
1214 << OI.Name << "'\n";
1215 });
1216 continue;
1217 }
1218 }
1202 const CGIOperandList::OperandInfo &OI = CGI.Operands[i];
1203
1204 // Validate tied operands.
1205 if (OI.getTiedRegister() != -1) {
1206 // If we have a tied operand that consists of multiple MCOperands,
1207 // reject it. We reject aliases and ignore instructions for now.
1208 if (OI.MINumOperands != 1) {
1209 // FIXME: Should reject these. The ARM backend hits this with $lane
1210 // in a bunch of instructions. It is unclear what the right answer is.
1211 DEBUG({
1212 errs() << "warning: '" << CGI.TheDef->getName() << "': "
1213 << "ignoring instruction with multi-operand tied operand '"
1214 << OI.Name << "'\n";
1215 });
1216 continue;
1217 }
1218 }
12191219 }
12201220
12211221 OwningPtr II(new MatchableInfo(CGI));
12251225 // Ignore instructions which shouldn't be matched and diagnose invalid
12261226 // instruction definitions with an error.
12271227 if (!II->Validate(CommentDelimiter, true))
1228 continue;
1228 continue;
12291229
12301230 // Ignore "Int_*" and "*_Int" instructions, which are internal aliases.
12311231 //
12321232 // FIXME: This is a total hack.
12331233 if (StringRef(II->TheDef->getName()).startswith("Int_") ||
1234 StringRef(II->TheDef->getName()).endswith("_Int"))
1235 continue;
1234 StringRef(II->TheDef->getName()).endswith("_Int"))
1235 continue;
12361236
12371237 Matchables.push_back(II.take());
12381238 }
12481248 // filter the set of instruction aliases we consider, based on the target
12491249 // instruction.
12501250 if (!StringRef(Alias->ResultInst->TheDef->getName()).startswith(
1251 MatchPrefix))
1252 continue;
1251 MatchPrefix))
1252 continue;
12531253
12541254 OwningPtr II(new MatchableInfo(Alias));
12551255