The main entry point for the TableGen backend.
| 723 | |
| 724 | /// The main entry point for the TableGen backend. |
| 725 | static bool generateBytecode(const RecordKeeper &records, raw_ostream &os) { |
| 726 | os << "//===-- Begin Writer Implementations --===//\n"; |
| 727 | os << "#ifdef GEN_OP_WRITERS\n\n"; |
| 728 | generateOpWriterImplementations(records, os); |
| 729 | os << "#undef GEN_OP_WRITERS\n"; |
| 730 | os << "#endif // GEN_OP_WRITERS\n"; |
| 731 | os << "//===-- End Writer Implementations --===//\n\n"; |
| 732 | |
| 733 | os << "//===-- Begin Dispatch Switch --===//\n"; |
| 734 | os << "#ifdef GEN_OP_WRITER_DISPATCH\n\n"; |
| 735 | generateDispatchSwitch(records, os); |
| 736 | os << "#undef GEN_OP_WRITER_DISPATCH\n"; |
| 737 | os << "#endif // GEN_OP_WRITER_DISPATCH\n"; |
| 738 | os << "//===-- End Dispatch Switch --===//\n\n"; |
| 739 | |
| 740 | return false; |
| 741 | } |
| 742 | |
| 743 | /// Generate version constants based on actual opcode assignments |
| 744 | static void generateVersionConstants(const RecordKeeper &records, |
no test coverage detected