• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/llvmCore-3425.0.34/utils/TableGen/

Lines Matching defs:OS

40   void run(raw_ostream &OS);
43 void emitEnums(raw_ostream &OS);
50 raw_ostream &OS);
53 void EmitOperandInfo(raw_ostream &OS, OperandInfoMapTy &OperandInfoIDs);
59 unsigned Num, raw_ostream &OS) {
60 OS << "static const uint16_t ImplicitList" << Num << "[] = { ";
62 OS << getQualifiedName(Uses[i]) << ", ";
63 OS << "0 };\n";
155 void InstrInfoEmitter::EmitOperandInfo(raw_ostream &OS,
161 OS << "\n";
170 OS << "static const MCOperandInfo OperandInfo" << N << "[] = { ";
172 OS << "{ " << OperandInfo[i] << " }, ";
173 OS << "};\n";
182 void InstrInfoEmitter::run(raw_ostream &OS) {
183 emitSourceFileHeader("Target Instruction Enum Values", OS);
184 emitEnums(OS);
186 emitSourceFileHeader("Target Instruction Descriptors", OS);
188 OS << "\n#ifdef GET_INSTRINFO_MC_DESC\n";
189 OS << "#undef GET_INSTRINFO_MC_DESC\n";
191 OS << "namespace llvm {\n\n";
208 if (!IL) PrintDefList(Uses, IL = ++ListNumber, OS);
213 if (!IL) PrintDefList(Defs, IL = ++ListNumber, OS);
220 EmitOperandInfo(OS, OperandInfoIDs);
224 OS << "\nextern const MCInstrDesc " << TargetName << "Insts[] = {\n";
230 OperandInfoIDs, OS);
231 OS << "};\n\n";
241 OS << "extern const char " << TargetName << "InstrNameData[] = {\n";
242 InstrNames.emit(OS, printChar);
243 OS << "};\n\n";
245 OS << "extern const unsigned " << TargetName <<"InstrNameIndices[] = {";
248 OS << "\n ";
250 OS << InstrNames.get(Instr->TheDef->getName()) << "U, ";
253 OS << "\n};\n\n";
256 OS << "static inline void Init" << TargetName
258 OS << " II->InitMCInstrInfo(" << TargetName << "Insts, "
262 OS << "} // End llvm namespace \n";
264 OS << "#endif // GET_INSTRINFO_MC_DESC\n\n";
267 OS << "\n#ifdef GET_INSTRINFO_HEADER\n";
268 OS << "#undef GET_INSTRINFO_HEADER\n";
271 OS << "namespace llvm {\n";
272 OS << "struct " << ClassName << " : public TargetInstrInfoImpl {\n"
275 OS << "} // End llvm namespace \n";
277 OS << "#endif // GET_INSTRINFO_HEADER\n\n";
279 OS << "\n#ifdef GET_INSTRINFO_CTOR\n";
280 OS << "#undef GET_INSTRINFO_CTOR\n";
282 OS << "namespace llvm {\n";
283 OS << "extern const MCInstrDesc " << TargetName << "Insts[];\n";
284 OS << "extern const unsigned " << TargetName << "InstrNameIndices[];\n";
285 OS << "extern const char " << TargetName << "InstrNameData[];\n";
286 OS << ClassName << "::" << ClassName << "(int SO, int DO)\n"
291 OS << "} // End llvm namespace \n";
293 OS << "#endif // GET_INSTRINFO_CTOR\n\n";
300 raw_ostream &OS) {
307 OS << " { ";
308 OS << Num << ",\t" << MinOperands << ",\t"
314 if (Inst.isPseudo) OS << "|(1<<MCID::Pseudo)";
315 if (Inst.isReturn) OS << "|(1<<MCID::Return)";
316 if (Inst.isBranch) OS << "|(1<<MCID::Branch)";
317 if (Inst.isIndirectBranch) OS << "|(1<<MCID::IndirectBranch)";
318 if (Inst.isCompare) OS << "|(1<<MCID::Compare)";
319 if (Inst.isMoveImm) OS << "|(1<<MCID::MoveImm)";
320 if (Inst.isBitcast) OS << "|(1<<MCID::Bitcast)";
321 if (Inst.isSelect) OS << "|(1<<MCID::Select)";
322 if (Inst.isBarrier) OS << "|(1<<MCID::Barrier)";
323 if (Inst.hasDelaySlot) OS << "|(1<<MCID::DelaySlot)";
324 if (Inst.isCall) OS << "|(1<<MCID::Call)";
325 if (Inst.canFoldAsLoad) OS << "|(1<<MCID::FoldableAsLoad)";
326 if (Inst.mayLoad) OS << "|(1<<MCID::MayLoad)";
327 if (Inst.mayStore) OS << "|(1<<MCID::MayStore)";
328 if (Inst.isPredicable) OS << "|(1<<MCID::Predicable)";
329 if (Inst.isConvertibleToThreeAddress) OS << "|(1<<MCID::ConvertibleTo3Addr)";
330 if (Inst.isCommutable) OS << "|(1<<MCID::Commutable)";
331 if (Inst.isTerminator) OS << "|(1<<MCID::Terminator)";
332 if (Inst.isReMaterializable) OS << "|(1<<MCID::Rematerializable)";
333 if (Inst.isNotDuplicable) OS << "|(1<<MCID::NotDuplicable)";
334 if (Inst.Operands.hasOptionalDef) OS << "|(1<<MCID::HasOptionalDef)";
335 if (Inst.usesCustomInserter) OS << "|(1<<MCID::UsesCustomInserter)";
336 if (Inst.hasPostISelHook) OS << "|(1<<MCID::HasPostISelHook)";
337 if (Inst.Operands.isVariadic)OS << "|(1<<MCID::Variadic)";
338 if (Inst.hasSideEffects) OS << "|(1<<MCID::UnmodeledSideEffects)";
339 if (Inst.isAsCheapAsAMove) OS << "|(1<<MCID::CheapAsAMove)";
340 if (Inst.hasExtraSrcRegAllocReq) OS << "|(1<<MCID::ExtraSrcRegAllocReq)";
341 if (Inst.hasExtraDefRegAllocReq) OS << "|(1<<MCID::ExtraDefRegAllocReq)";
353 OS << ", 0x";
354 OS.write_hex(Value);
355 OS << "ULL, ";
360 OS << "NULL, ";
362 OS << "ImplicitList" << EmittedLists[UseList] << ", ";
366 OS << "NULL, ";
368 OS << "ImplicitList" << EmittedLists[DefList] << ", ";
373 OS << "0";
375 OS << "OperandInfo" << OpInfo.find(OperandInfo)->second;
377 OS << " }, // Inst #" << Num << " = " << Inst.TheDef->getName() << "\n";
381 void InstrInfoEmitter::emitEnums(raw_ostream &OS) {
383 OS << "\n#ifdef GET_INSTRINFO_ENUM\n";
384 OS << "#undef GET_INSTRINFO_ENUM\n";
386 OS << "namespace llvm {\n\n";
401 OS << "namespace " << Namespace << " {\n";
402 OS << " enum {\n";
404 OS << " " << NumberedInstructions[i]->TheDef->getName()
407 OS << " INSTRUCTION_LIST_END = " << NumberedInstructions.size() << "\n";
408 OS << " };\n}\n";
409 OS << "} // End llvm namespace \n";
411 OS << "#endif // GET_INSTRINFO_ENUM\n\n";
416 void EmitInstrInfo(RecordKeeper &RK, raw_ostream &OS) {
417 InstrInfoEmitter(RK).run(OS);