Lines Matching refs:OS

102     void printManglingSuffix(raw_ostream &OS, ImmPredicateSet &ImmPredicates,  in printManglingSuffix()  argument
105 OS << 'r'; in printManglingSuffix()
107 OS << 'f'; in printManglingSuffix()
109 OS << 'i'; in printManglingSuffix()
112 OS << "_" << ImmPredicates.getPredicate(Code-1).getFnName(); in printManglingSuffix()
148 void emitImmediatePredicate(raw_ostream &OS, ImmPredicateSet &ImmPredicates) { in emitImmediatePredicate()
157 OS << " &&\n "; in emitImmediatePredicate()
162 OS << "VT == " in emitImmediatePredicate()
167 OS << PredFn.getFnName() << "(imm" << i <<')'; in emitImmediatePredicate()
285 void PrintParameters(raw_ostream &OS) const { in PrintParameters()
288 OS << "unsigned Op" << i << ", bool Op" << i << "IsKill"; in PrintParameters()
290 OS << "uint64_t imm" << i; in PrintParameters()
292 OS << "const ConstantFP *f" << i; in PrintParameters()
297 OS << ", "; in PrintParameters()
301 void PrintArguments(raw_ostream &OS, in PrintArguments()
311 OS << ", "; in PrintArguments()
313 OS << "Op" << i << ", Op" << i << "IsKill"; in PrintArguments()
316 OS << "imm" << i; in PrintArguments()
319 OS << "f" << i; in PrintArguments()
327 void PrintArguments(raw_ostream &OS) const { in PrintArguments()
330 OS << "Op" << i << ", Op" << i << "IsKill"; in PrintArguments()
332 OS << "imm" << i; in PrintArguments()
334 OS << "f" << i; in PrintArguments()
339 OS << ", "; in PrintArguments()
344 void PrintManglingSuffix(raw_ostream &OS, const std::vector<std::string> &PR, in PrintManglingSuffix()
355 Operands[i].printManglingSuffix(OS, ImmPredicates, StripImmCodes); in PrintManglingSuffix()
359 void PrintManglingSuffix(raw_ostream &OS, ImmPredicateSet &ImmPredicates, in PrintManglingSuffix()
362 Operands[i].printManglingSuffix(OS, ImmPredicates, StripImmCodes); in PrintManglingSuffix()
399 void printImmediatePredicates(raw_ostream &OS);
400 void printFunctionDefinitions(raw_ostream &OS);
402 void emitInstructionCode(raw_ostream &OS,
611 void FastISelMap::printImmediatePredicates(raw_ostream &OS) { in printImmediatePredicates() argument
615 OS << "\n// FastEmit Immediate Predicate functions.\n"; in printImmediatePredicates()
618 OS << "static bool " << I->getFnName() << "(int64_t Imm) {\n"; in printImmediatePredicates()
619 OS << I->getImmediatePredicateCode() << "\n}\n"; in printImmediatePredicates()
622 OS << "\n\n"; in printImmediatePredicates()
625 void FastISelMap::emitInstructionCode(raw_ostream &OS, in emitInstructionCode() argument
653 OS << " if (" + PredicateCheck + ") {\n"; in emitInstructionCode()
654 OS << " "; in emitInstructionCode()
659 OS << " BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, " in emitInstructionCode()
664 OS << " return fastEmitInst_"; in emitInstructionCode()
666 Operands.PrintManglingSuffix(OS, *Memo.PhysRegs, in emitInstructionCode()
668 OS << "(" << InstNS << Memo.Name << ", "; in emitInstructionCode()
669 OS << "&" << InstNS << Memo.RC->getName() << "RegClass"; in emitInstructionCode()
671 OS << ", "; in emitInstructionCode()
672 Operands.PrintArguments(OS, *Memo.PhysRegs); in emitInstructionCode()
673 OS << ");\n"; in emitInstructionCode()
675 OS << "extractsubreg(" << RetVTName in emitInstructionCode()
680 OS << " }\n"; in emitInstructionCode()
686 OS << " return 0;\n"; in emitInstructionCode()
687 OS << "}\n"; in emitInstructionCode()
688 OS << "\n"; in emitInstructionCode()
692 void FastISelMap::printFunctionDefinitions(raw_ostream &OS) { in printFunctionDefinitions() argument
704 OS << "// FastEmit functions for " << Opcode << ".\n"; in printFunctionDefinitions()
705 OS << "\n"; in printFunctionDefinitions()
718 OS << "unsigned fastEmit_" in printFunctionDefinitions()
722 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
723 OS << "("; in printFunctionDefinitions()
724 Operands.PrintParameters(OS); in printFunctionDefinitions()
725 OS << ") {\n"; in printFunctionDefinitions()
727 emitInstructionCode(OS, Operands, PM, getName(RetVT)); in printFunctionDefinitions()
731 OS << "unsigned fastEmit_" in printFunctionDefinitions()
734 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
735 OS << "(MVT RetVT"; in printFunctionDefinitions()
737 OS << ", "; in printFunctionDefinitions()
738 Operands.PrintParameters(OS); in printFunctionDefinitions()
739 OS << ") {\nswitch (RetVT.SimpleTy) {\n"; in printFunctionDefinitions()
743 OS << " case " << getName(RetVT) << ": return fastEmit_" in printFunctionDefinitions()
746 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
747 OS << "("; in printFunctionDefinitions()
748 Operands.PrintArguments(OS); in printFunctionDefinitions()
749 OS << ");\n"; in printFunctionDefinitions()
751 OS << " default: return 0;\n}\n}\n\n"; in printFunctionDefinitions()
755 OS << "unsigned fastEmit_" in printFunctionDefinitions()
758 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
759 OS << "(MVT RetVT"; in printFunctionDefinitions()
761 OS << ", "; in printFunctionDefinitions()
762 Operands.PrintParameters(OS); in printFunctionDefinitions()
763 OS << ") {\n"; in printFunctionDefinitions()
765 OS << " if (RetVT.SimpleTy != " << getName(RM.begin()->first) in printFunctionDefinitions()
770 emitInstructionCode(OS, Operands, PM, "RetVT"); in printFunctionDefinitions()
775 OS << "unsigned fastEmit_" in printFunctionDefinitions()
777 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
778 OS << "(MVT VT, MVT RetVT"; in printFunctionDefinitions()
780 OS << ", "; in printFunctionDefinitions()
781 Operands.PrintParameters(OS); in printFunctionDefinitions()
782 OS << ") {\n"; in printFunctionDefinitions()
783 OS << " switch (VT.SimpleTy) {\n"; in printFunctionDefinitions()
788 OS << " case " << TypeName << ": return fastEmit_" in printFunctionDefinitions()
790 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
791 OS << "(RetVT"; in printFunctionDefinitions()
793 OS << ", "; in printFunctionDefinitions()
794 Operands.PrintArguments(OS); in printFunctionDefinitions()
795 OS << ");\n"; in printFunctionDefinitions()
797 OS << " default: return 0;\n"; in printFunctionDefinitions()
798 OS << " }\n"; in printFunctionDefinitions()
799 OS << "}\n"; in printFunctionDefinitions()
800 OS << "\n"; in printFunctionDefinitions()
803 OS << "// Top-level FastEmit function.\n"; in printFunctionDefinitions()
804 OS << "\n"; in printFunctionDefinitions()
808 OS << "unsigned fastEmit_"; in printFunctionDefinitions()
809 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
810 OS << "(MVT VT, MVT RetVT, unsigned Opcode"; in printFunctionDefinitions()
812 OS << ", "; in printFunctionDefinitions()
813 Operands.PrintParameters(OS); in printFunctionDefinitions()
814 OS << ") "; in printFunctionDefinitions()
816 OS << "override "; in printFunctionDefinitions()
817 OS << "{\n"; in printFunctionDefinitions()
835 OS << " if ("; in printFunctionDefinitions()
836 MI->second[i].emitImmediatePredicate(OS, ImmediatePredicates); in printFunctionDefinitions()
837 OS << ")\n if (unsigned Reg = fastEmit_"; in printFunctionDefinitions()
838 MI->second[i].PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
839 OS << "(VT, RetVT, Opcode"; in printFunctionDefinitions()
841 OS << ", "; in printFunctionDefinitions()
842 MI->second[i].PrintArguments(OS); in printFunctionDefinitions()
843 OS << "))\n return Reg;\n\n"; in printFunctionDefinitions()
850 OS << " switch (Opcode) {\n"; in printFunctionDefinitions()
855 OS << " case " << Opcode << ": return fastEmit_" in printFunctionDefinitions()
857 Operands.PrintManglingSuffix(OS, ImmediatePredicates); in printFunctionDefinitions()
858 OS << "(VT, RetVT"; in printFunctionDefinitions()
860 OS << ", "; in printFunctionDefinitions()
861 Operands.PrintArguments(OS); in printFunctionDefinitions()
862 OS << ");\n"; in printFunctionDefinitions()
864 OS << " default: return 0;\n"; in printFunctionDefinitions()
865 OS << " }\n"; in printFunctionDefinitions()
866 OS << "}\n"; in printFunctionDefinitions()
867 OS << "\n"; in printFunctionDefinitions()
875 void EmitFastISel(RecordKeeper &RK, raw_ostream &OS) { in EmitFastISel() argument
879 Target.getName() + " target", OS); in EmitFastISel()
887 F.printImmediatePredicates(OS); in EmitFastISel()
888 F.printFunctionDefinitions(OS); in EmitFastISel()