Lines Matching refs:OS
100 void printManglingSuffix(raw_ostream &OS, ImmPredicateSet &ImmPredicates, in printManglingSuffix() argument
103 OS << 'r'; in printManglingSuffix()
105 OS << 'f'; in printManglingSuffix()
107 OS << 'i'; in printManglingSuffix()
110 OS << "_" << ImmPredicates.getPredicate(Code-1).getFnName(); in printManglingSuffix()
146 void emitImmediatePredicate(raw_ostream &OS, ImmPredicateSet &ImmPredicates) { in emitImmediatePredicate()
155 OS << " &&\n "; in emitImmediatePredicate()
160 OS << "VT == " in emitImmediatePredicate()
165 OS << PredFn.getFnName() << "(imm" << i <<')'; in emitImmediatePredicate()
283 void PrintParameters(raw_ostream &OS) const { in PrintParameters()
286 OS << "unsigned Op" << i << ", bool Op" << i << "IsKill"; in PrintParameters()
288 OS << "uint64_t imm" << i; in PrintParameters()
290 OS << "const ConstantFP *f" << i; in PrintParameters()
295 OS << ", "; in PrintParameters()
299 void PrintArguments(raw_ostream &OS, in PrintArguments()
309 OS << ", "; in PrintArguments()
311 OS << "Op" << i << ", Op" << i << "IsKill"; in PrintArguments()
314 OS << "imm" << i; in PrintArguments()
317 OS << "f" << i; in PrintArguments()
325 void PrintArguments(raw_ostream &OS) const { in PrintArguments()
328 OS << "Op" << i << ", Op" << i << "IsKill"; in PrintArguments()
330 OS << "imm" << i; in PrintArguments()
332 OS << "f" << i; in PrintArguments()
337 OS << ", "; in PrintArguments()
342 void PrintManglingSuffix(raw_ostream &OS, const std::vector<std::string> &PR, in PrintManglingSuffix()
353 Operands[i].printManglingSuffix(OS, ImmPredicates, StripImmCodes); in PrintManglingSuffix()
357 void PrintManglingSuffix(raw_ostream &OS, ImmPredicateSet &ImmPredicates, in PrintManglingSuffix()
360 Operands[i].printManglingSuffix(OS, ImmPredicates, StripImmCodes); in PrintManglingSuffix()
385 void printImmediatePredicates(raw_ostream &OS);
386 void printFunctionDefinitions(raw_ostream &OS);
571 void FastISelMap::printImmediatePredicates(raw_ostream &OS) { in printImmediatePredicates() argument
575 OS << "\n// FastEmit Immediate Predicate functions.\n"; in printImmediatePredicates()
578 OS << "static bool " << I->getFnName() << "(int64_t Imm) {\n"; in printImmediatePredicates()
579 OS << I->getImmediatePredicateCode() << "\n}\n"; in printImmediatePredicates()
582 OS << "\n\n"; in printImmediatePredicates()
586 void FastISelMap::printFunctionDefinitions(raw_ostream &OS) { in printFunctionDefinitions() argument
598 OS << "// FastEmit functions for " << Opcode << ".\n"; in printFunctionDefinitions()
599 OS << "\n"; in printFunctionDefinitions()
613 OS << "unsigned FastEmit_" in printFunctionDefinitions()
617 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
618 OS << "("; in printFunctionDefinitions()
619 Operands.PrintParameters(OS); in printFunctionDefinitions()
620 OS << ") {\n"; in printFunctionDefinitions()
634 OS << " if (" + PredicateCheck + ") {\n"; in printFunctionDefinitions()
635 OS << " "; in printFunctionDefinitions()
641 OS << " BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, " in printFunctionDefinitions()
646 OS << " return FastEmitInst_"; in printFunctionDefinitions()
648 Operands.PrintManglingSuffix(OS, *Memo.PhysRegs, in printFunctionDefinitions()
650 OS << "(" << InstNS << Memo.Name << ", "; in printFunctionDefinitions()
651 OS << "&" << InstNS << Memo.RC->getName() << "RegClass"; in printFunctionDefinitions()
653 OS << ", "; in printFunctionDefinitions()
654 Operands.PrintArguments(OS, *Memo.PhysRegs); in printFunctionDefinitions()
655 OS << ");\n"; in printFunctionDefinitions()
657 OS << "extractsubreg(" << getName(RetVT); in printFunctionDefinitions()
658 OS << ", Op0, Op0IsKill, " << Memo.SubRegNo << ");\n"; in printFunctionDefinitions()
662 OS << " }\n"; in printFunctionDefinitions()
667 OS << " return 0;\n"; in printFunctionDefinitions()
668 OS << "}\n"; in printFunctionDefinitions()
669 OS << "\n"; in printFunctionDefinitions()
673 OS << "unsigned FastEmit_" in printFunctionDefinitions()
676 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
677 OS << "(MVT RetVT"; in printFunctionDefinitions()
679 OS << ", "; in printFunctionDefinitions()
680 Operands.PrintParameters(OS); in printFunctionDefinitions()
681 OS << ") {\nswitch (RetVT.SimpleTy) {\n"; in printFunctionDefinitions()
685 OS << " case " << getName(RetVT) << ": return FastEmit_" in printFunctionDefinitions()
688 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
689 OS << "("; in printFunctionDefinitions()
690 Operands.PrintArguments(OS); in printFunctionDefinitions()
691 OS << ");\n"; in printFunctionDefinitions()
693 OS << " default: return 0;\n}\n}\n\n"; in printFunctionDefinitions()
697 OS << "unsigned FastEmit_" in printFunctionDefinitions()
700 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
701 OS << "(MVT RetVT"; in printFunctionDefinitions()
703 OS << ", "; in printFunctionDefinitions()
704 Operands.PrintParameters(OS); in printFunctionDefinitions()
705 OS << ") {\n"; in printFunctionDefinitions()
707 OS << " if (RetVT.SimpleTy != " << getName(RM.begin()->first) in printFunctionDefinitions()
725 OS << " if (" + PredicateCheck + ") {\n"; in printFunctionDefinitions()
726 OS << " "; in printFunctionDefinitions()
732 OS << " BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, " in printFunctionDefinitions()
737 OS << " return FastEmitInst_"; in printFunctionDefinitions()
740 Operands.PrintManglingSuffix(OS, *Memo.PhysRegs, in printFunctionDefinitions()
742 OS << "(" << InstNS << Memo.Name << ", "; in printFunctionDefinitions()
743 OS << "&" << InstNS << Memo.RC->getName() << "RegClass"; in printFunctionDefinitions()
745 OS << ", "; in printFunctionDefinitions()
746 Operands.PrintArguments(OS, *Memo.PhysRegs); in printFunctionDefinitions()
747 OS << ");\n"; in printFunctionDefinitions()
749 OS << "extractsubreg(RetVT, Op0, Op0IsKill, "; in printFunctionDefinitions()
750 OS << Memo.SubRegNo; in printFunctionDefinitions()
751 OS << ");\n"; in printFunctionDefinitions()
755 OS << " }\n"; in printFunctionDefinitions()
760 OS << " return 0;\n"; in printFunctionDefinitions()
761 OS << "}\n"; in printFunctionDefinitions()
762 OS << "\n"; in printFunctionDefinitions()
767 OS << "unsigned FastEmit_" in printFunctionDefinitions()
769 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
770 OS << "(MVT VT, MVT RetVT"; in printFunctionDefinitions()
772 OS << ", "; in printFunctionDefinitions()
773 Operands.PrintParameters(OS); in printFunctionDefinitions()
774 OS << ") {\n"; in printFunctionDefinitions()
775 OS << " switch (VT.SimpleTy) {\n"; in printFunctionDefinitions()
780 OS << " case " << TypeName << ": return FastEmit_" in printFunctionDefinitions()
782 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
783 OS << "(RetVT"; in printFunctionDefinitions()
785 OS << ", "; in printFunctionDefinitions()
786 Operands.PrintArguments(OS); in printFunctionDefinitions()
787 OS << ");\n"; in printFunctionDefinitions()
789 OS << " default: return 0;\n"; in printFunctionDefinitions()
790 OS << " }\n"; in printFunctionDefinitions()
791 OS << "}\n"; in printFunctionDefinitions()
792 OS << "\n"; in printFunctionDefinitions()
795 OS << "// Top-level FastEmit function.\n"; in printFunctionDefinitions()
796 OS << "\n"; in printFunctionDefinitions()
800 OS << "unsigned FastEmit_"; in printFunctionDefinitions()
801 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
802 OS << "(MVT VT, MVT RetVT, unsigned Opcode"; in printFunctionDefinitions()
804 OS << ", "; in printFunctionDefinitions()
805 Operands.PrintParameters(OS); in printFunctionDefinitions()
806 OS << ") {\n"; in printFunctionDefinitions()
824 OS << " if ("; in printFunctionDefinitions()
825 MI->second[i].emitImmediatePredicate(OS, ImmediatePredicates); in printFunctionDefinitions()
826 OS << ")\n if (unsigned Reg = FastEmit_"; in printFunctionDefinitions()
827 MI->second[i].PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
828 OS << "(VT, RetVT, Opcode"; in printFunctionDefinitions()
830 OS << ", "; in printFunctionDefinitions()
831 MI->second[i].PrintArguments(OS); in printFunctionDefinitions()
832 OS << "))\n return Reg;\n\n"; in printFunctionDefinitions()
839 OS << " switch (Opcode) {\n"; in printFunctionDefinitions()
844 OS << " case " << Opcode << ": return FastEmit_" in printFunctionDefinitions()
846 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
847 OS << "(VT, RetVT"; in printFunctionDefinitions()
849 OS << ", "; in printFunctionDefinitions()
850 Operands.PrintArguments(OS); in printFunctionDefinitions()
851 OS << ");\n"; in printFunctionDefinitions()
853 OS << " default: return 0;\n"; in printFunctionDefinitions()
854 OS << " }\n"; in printFunctionDefinitions()
855 OS << "}\n"; in printFunctionDefinitions()
856 OS << "\n"; in printFunctionDefinitions()
864 void EmitFastISel(RecordKeeper &RK, raw_ostream &OS) { in EmitFastISel() argument
868 Target.getName() + " target", OS); in EmitFastISel()
876 F.printImmediatePredicates(OS); in EmitFastISel()
877 F.printFunctionDefinitions(OS); in EmitFastISel()