b6631c848e0d9a9085da1baced8153df8ebc6571
[oota-llvm.git] / utils / TableGen / FastISelEmitter.cpp
1 //===- FastISelEmitter.cpp - Generate an instruction selector -------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This tablegen backend emits code for use by the "fast" instruction
11 // selection algorithm. See the comments at the top of
12 // lib/CodeGen/SelectionDAG/FastISel.cpp for background.
13 //
14 // This file scans through the target's tablegen instruction-info files
15 // and extracts instructions with obvious-looking patterns, and it emits
16 // code to look up these instructions by type and operator.
17 //
18 //===----------------------------------------------------------------------===//
19
20 #include "FastISelEmitter.h"
21 #include "Record.h"
22 #include "llvm/Support/Debug.h"
23 #include "llvm/ADT/SmallString.h"
24 #include "llvm/ADT/VectorExtras.h"
25 using namespace llvm;
26
27 namespace {
28
29 /// InstructionMemo - This class holds additional information about an
30 /// instruction needed to emit code for it.
31 ///
32 struct InstructionMemo {
33   std::string Name;
34   const CodeGenRegisterClass *RC;
35   std::string SubRegNo;
36   std::vector<std::string>* PhysRegs;
37 };
38
39 /// OperandsSignature - This class holds a description of a list of operand
40 /// types. It has utility methods for emitting text based on the operands.
41 ///
42 struct OperandsSignature {
43   std::vector<std::string> Operands;
44
45   bool operator<(const OperandsSignature &O) const {
46     return Operands < O.Operands;
47   }
48
49   bool empty() const { return Operands.empty(); }
50
51   /// initialize - Examine the given pattern and initialize the contents
52   /// of the Operands array accordingly. Return true if all the operands
53   /// are supported, false otherwise.
54   ///
55   bool initialize(TreePatternNode *InstPatNode, const CodeGenTarget &Target,
56                   MVT::SimpleValueType VT) {
57
58     if (!InstPatNode->isLeaf()) {
59       if (InstPatNode->getOperator()->getName() == "imm") {
60         Operands.push_back("i");
61         return true;
62       }
63       if (InstPatNode->getOperator()->getName() == "fpimm") {
64         Operands.push_back("f");
65         return true;
66       }
67     }
68
69     const CodeGenRegisterClass *DstRC = 0;
70
71     for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) {
72       TreePatternNode *Op = InstPatNode->getChild(i);
73
74       // For now, filter out any operand with a predicate.
75       // For now, filter out any operand with multiple values.
76       if (!Op->getPredicateFns().empty() || Op->getNumTypes() != 1)
77         return false;
78
79       if (!Op->isLeaf()) {
80         if (Op->getOperator()->getName() == "imm") {
81           Operands.push_back("i");
82           continue;
83         }
84         if (Op->getOperator()->getName() == "fpimm") {
85           Operands.push_back("f");
86           continue;
87         }
88         // For now, ignore other non-leaf nodes.
89         return false;
90       }
91       
92       assert(Op->hasTypeSet(0) && "Type infererence not done?");
93
94       // For now, all the operands must have the same type (if they aren't
95       // immediates).  Note that this causes us to reject variable sized shifts
96       // on X86.
97       if (Op->getType(0) != VT)
98         return false;
99
100       DefInit *OpDI = dynamic_cast<DefInit*>(Op->getLeafValue());
101       if (!OpDI)
102         return false;
103       Record *OpLeafRec = OpDI->getDef();
104       // For now, the only other thing we accept is register operands.
105
106       const CodeGenRegisterClass *RC = 0;
107       if (OpLeafRec->isSubClassOf("RegisterClass"))
108         RC = &Target.getRegisterClass(OpLeafRec);
109       else if (OpLeafRec->isSubClassOf("Register"))
110         RC = Target.getRegisterClassForRegister(OpLeafRec);
111       else
112         return false;
113
114       // For now, this needs to be a register class of some sort.
115       if (!RC)
116         return false;
117
118       // For now, all the operands must have the same register class or be
119       // a strict subclass of the destination.
120       if (DstRC) {
121         if (DstRC != RC && !DstRC->hasSubClass(RC))
122           return false;
123       } else
124         DstRC = RC;
125       Operands.push_back("r");
126     }
127     return true;
128   }
129
130   void PrintParameters(raw_ostream &OS) const {
131     for (unsigned i = 0, e = Operands.size(); i != e; ++i) {
132       if (Operands[i] == "r") {
133         OS << "unsigned Op" << i << ", bool Op" << i << "IsKill";
134       } else if (Operands[i] == "i") {
135         OS << "uint64_t imm" << i;
136       } else if (Operands[i] == "f") {
137         OS << "ConstantFP *f" << i;
138       } else {
139         assert("Unknown operand kind!");
140         abort();
141       }
142       if (i + 1 != e)
143         OS << ", ";
144     }
145   }
146
147   void PrintArguments(raw_ostream &OS,
148                       const std::vector<std::string>& PR) const {
149     assert(PR.size() == Operands.size());
150     bool PrintedArg = false;
151     for (unsigned i = 0, e = Operands.size(); i != e; ++i) {
152       if (PR[i] != "")
153         // Implicit physical register operand.
154         continue;
155
156       if (PrintedArg)
157         OS << ", ";
158       if (Operands[i] == "r") {
159         OS << "Op" << i << ", Op" << i << "IsKill";
160         PrintedArg = true;
161       } else if (Operands[i] == "i") {
162         OS << "imm" << i;
163         PrintedArg = true;
164       } else if (Operands[i] == "f") {
165         OS << "f" << i;
166         PrintedArg = true;
167       } else {
168         assert("Unknown operand kind!");
169         abort();
170       }
171     }
172   }
173
174   void PrintArguments(raw_ostream &OS) const {
175     for (unsigned i = 0, e = Operands.size(); i != e; ++i) {
176       if (Operands[i] == "r") {
177         OS << "Op" << i << ", Op" << i << "IsKill";
178       } else if (Operands[i] == "i") {
179         OS << "imm" << i;
180       } else if (Operands[i] == "f") {
181         OS << "f" << i;
182       } else {
183         assert("Unknown operand kind!");
184         abort();
185       }
186       if (i + 1 != e)
187         OS << ", ";
188     }
189   }
190
191
192   void PrintManglingSuffix(raw_ostream &OS,
193                            const std::vector<std::string>& PR) const {
194     for (unsigned i = 0, e = Operands.size(); i != e; ++i) {
195       if (PR[i] != "")
196         // Implicit physical register operand. e.g. Instruction::Mul expect to
197         // select to a binary op. On x86, mul may take a single operand with
198         // the other operand being implicit. We must emit something that looks
199         // like a binary instruction except for the very inner FastEmitInst_*
200         // call.
201         continue;
202       OS << Operands[i];
203     }
204   }
205
206   void PrintManglingSuffix(raw_ostream &OS) const {
207     for (unsigned i = 0, e = Operands.size(); i != e; ++i) {
208       OS << Operands[i];
209     }
210   }
211 };
212
213 class FastISelMap {
214   typedef std::map<std::string, InstructionMemo> PredMap;
215   typedef std::map<MVT::SimpleValueType, PredMap> RetPredMap;
216   typedef std::map<MVT::SimpleValueType, RetPredMap> TypeRetPredMap;
217   typedef std::map<std::string, TypeRetPredMap> OpcodeTypeRetPredMap;
218   typedef std::map<OperandsSignature, OpcodeTypeRetPredMap>
219             OperandsOpcodeTypeRetPredMap;
220
221   OperandsOpcodeTypeRetPredMap SimplePatterns;
222
223   std::string InstNS;
224
225 public:
226   explicit FastISelMap(std::string InstNS);
227
228   void CollectPatterns(CodeGenDAGPatterns &CGP);
229   void PrintFunctionDefinitions(raw_ostream &OS);
230 };
231
232 }
233
234 static std::string getOpcodeName(Record *Op, CodeGenDAGPatterns &CGP) {
235   return CGP.getSDNodeInfo(Op).getEnumName();
236 }
237
238 static std::string getLegalCName(std::string OpName) {
239   std::string::size_type pos = OpName.find("::");
240   if (pos != std::string::npos)
241     OpName.replace(pos, 2, "_");
242   return OpName;
243 }
244
245 FastISelMap::FastISelMap(std::string instns)
246   : InstNS(instns) {
247 }
248
249 void FastISelMap::CollectPatterns(CodeGenDAGPatterns &CGP) {
250   const CodeGenTarget &Target = CGP.getTargetInfo();
251
252   // Determine the target's namespace name.
253   InstNS = Target.getInstNamespace() + "::";
254   assert(InstNS.size() > 2 && "Can't determine target-specific namespace!");
255
256   // Scan through all the patterns and record the simple ones.
257   for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(),
258        E = CGP.ptm_end(); I != E; ++I) {
259     const PatternToMatch &Pattern = *I;
260
261     // For now, just look at Instructions, so that we don't have to worry
262     // about emitting multiple instructions for a pattern.
263     TreePatternNode *Dst = Pattern.getDstPattern();
264     if (Dst->isLeaf()) continue;
265     Record *Op = Dst->getOperator();
266     if (!Op->isSubClassOf("Instruction"))
267       continue;
268     CodeGenInstruction &II = CGP.getTargetInfo().getInstruction(Op);
269     if (II.Operands.size() == 0)
270       continue;
271
272     // For now, ignore multi-instruction patterns.
273     bool MultiInsts = false;
274     for (unsigned i = 0, e = Dst->getNumChildren(); i != e; ++i) {
275       TreePatternNode *ChildOp = Dst->getChild(i);
276       if (ChildOp->isLeaf())
277         continue;
278       if (ChildOp->getOperator()->isSubClassOf("Instruction")) {
279         MultiInsts = true;
280         break;
281       }
282     }
283     if (MultiInsts)
284       continue;
285
286     // For now, ignore instructions where the first operand is not an
287     // output register.
288     const CodeGenRegisterClass *DstRC = 0;
289     std::string SubRegNo;
290     if (Op->getName() != "EXTRACT_SUBREG") {
291       Record *Op0Rec = II.Operands[0].Rec;
292       if (!Op0Rec->isSubClassOf("RegisterClass"))
293         continue;
294       DstRC = &Target.getRegisterClass(Op0Rec);
295       if (!DstRC)
296         continue;
297     } else {
298       // If this isn't a leaf, then continue since the register classes are
299       // a bit too complicated for now.
300       if (!Dst->getChild(1)->isLeaf()) continue;
301
302       DefInit *SR = dynamic_cast<DefInit*>(Dst->getChild(1)->getLeafValue());
303       if (SR)
304         SubRegNo = getQualifiedName(SR->getDef());
305       else
306         SubRegNo = Dst->getChild(1)->getLeafValue()->getAsString();
307     }
308
309     // Inspect the pattern.
310     TreePatternNode *InstPatNode = Pattern.getSrcPattern();
311     if (!InstPatNode) continue;
312     if (InstPatNode->isLeaf()) continue;
313
314     // Ignore multiple result nodes for now.
315     if (InstPatNode->getNumTypes() > 1) continue;
316
317     Record *InstPatOp = InstPatNode->getOperator();
318     std::string OpcodeName = getOpcodeName(InstPatOp, CGP);
319     MVT::SimpleValueType RetVT = MVT::isVoid;
320     if (InstPatNode->getNumTypes()) RetVT = InstPatNode->getType(0);
321     MVT::SimpleValueType VT = RetVT;
322     if (InstPatNode->getNumChildren()) {
323       assert(InstPatNode->getChild(0)->getNumTypes() == 1);
324       VT = InstPatNode->getChild(0)->getType(0);
325     }
326     
327     if (InstPatOp->getName() =="shl") {
328       InstPatNode->dump();
329     }
330     
331
332     // For now, filter out instructions which just set a register to
333     // an Operand or an immediate, like MOV32ri.
334     if (InstPatOp->isSubClassOf("Operand"))
335       continue;
336
337     // For now, filter out any instructions with predicates.
338     if (!InstPatNode->getPredicateFns().empty())
339       continue;
340
341     // Check all the operands.
342     OperandsSignature Operands;
343     if (!Operands.initialize(InstPatNode, Target, VT))
344       continue;
345
346     std::vector<std::string>* PhysRegInputs = new std::vector<std::string>();
347     if (!InstPatNode->isLeaf() &&
348         (InstPatNode->getOperator()->getName() == "imm" ||
349          InstPatNode->getOperator()->getName() == "fpimmm"))
350       PhysRegInputs->push_back("");
351     else if (!InstPatNode->isLeaf()) {
352       for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) {
353         TreePatternNode *Op = InstPatNode->getChild(i);
354         if (!Op->isLeaf()) {
355           PhysRegInputs->push_back("");
356           continue;
357         }
358
359         DefInit *OpDI = dynamic_cast<DefInit*>(Op->getLeafValue());
360         Record *OpLeafRec = OpDI->getDef();
361         std::string PhysReg;
362         if (OpLeafRec->isSubClassOf("Register")) {
363           PhysReg += static_cast<StringInit*>(OpLeafRec->getValue( \
364                      "Namespace")->getValue())->getValue();
365           PhysReg += "::";
366
367           std::vector<CodeGenRegister> Regs = Target.getRegisters();
368           for (unsigned i = 0; i < Regs.size(); ++i) {
369             if (Regs[i].TheDef == OpLeafRec) {
370               PhysReg += Regs[i].getName();
371               break;
372             }
373           }
374         }
375
376         PhysRegInputs->push_back(PhysReg);
377       }
378     } else
379       PhysRegInputs->push_back("");
380
381     // Get the predicate that guards this pattern.
382     std::string PredicateCheck = Pattern.getPredicateCheck();
383
384     // Ok, we found a pattern that we can handle. Remember it.
385     InstructionMemo Memo = {
386       Pattern.getDstPattern()->getOperator()->getName(),
387       DstRC,
388       SubRegNo,
389       PhysRegInputs
390     };
391     if (SimplePatterns[Operands][OpcodeName][VT][RetVT]
392             .count(PredicateCheck))
393       throw TGError(Pattern.getSrcRecord()->getLoc(), "Duplicate record!");
394
395     SimplePatterns[Operands][OpcodeName][VT][RetVT][PredicateCheck] = Memo;
396   }
397 }
398
399 void FastISelMap::PrintFunctionDefinitions(raw_ostream &OS) {
400   // Now emit code for all the patterns that we collected.
401   for (OperandsOpcodeTypeRetPredMap::const_iterator OI = SimplePatterns.begin(),
402        OE = SimplePatterns.end(); OI != OE; ++OI) {
403     const OperandsSignature &Operands = OI->first;
404     const OpcodeTypeRetPredMap &OTM = OI->second;
405
406     for (OpcodeTypeRetPredMap::const_iterator I = OTM.begin(), E = OTM.end();
407          I != E; ++I) {
408       const std::string &Opcode = I->first;
409       const TypeRetPredMap &TM = I->second;
410
411       OS << "// FastEmit functions for " << Opcode << ".\n";
412       OS << "\n";
413
414       // Emit one function for each opcode,type pair.
415       for (TypeRetPredMap::const_iterator TI = TM.begin(), TE = TM.end();
416            TI != TE; ++TI) {
417         MVT::SimpleValueType VT = TI->first;
418         const RetPredMap &RM = TI->second;
419         if (RM.size() != 1) {
420           for (RetPredMap::const_iterator RI = RM.begin(), RE = RM.end();
421                RI != RE; ++RI) {
422             MVT::SimpleValueType RetVT = RI->first;
423             const PredMap &PM = RI->second;
424             bool HasPred = false;
425
426             OS << "unsigned FastEmit_"
427                << getLegalCName(Opcode)
428                << "_" << getLegalCName(getName(VT))
429                << "_" << getLegalCName(getName(RetVT)) << "_";
430             Operands.PrintManglingSuffix(OS);
431             OS << "(";
432             Operands.PrintParameters(OS);
433             OS << ") {\n";
434
435             // Emit code for each possible instruction. There may be
436             // multiple if there are subtarget concerns.
437             for (PredMap::const_iterator PI = PM.begin(), PE = PM.end();
438                  PI != PE; ++PI) {
439               std::string PredicateCheck = PI->first;
440               const InstructionMemo &Memo = PI->second;
441
442               if (PredicateCheck.empty()) {
443                 assert(!HasPred &&
444                        "Multiple instructions match, at least one has "
445                        "a predicate and at least one doesn't!");
446               } else {
447                 OS << "  if (" + PredicateCheck + ") {\n";
448                 OS << "  ";
449                 HasPred = true;
450               }
451
452               for (unsigned i = 0; i < Memo.PhysRegs->size(); ++i) {
453                 if ((*Memo.PhysRegs)[i] != "")
454                   OS << "  BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, "
455                      << "TII.get(TargetOpcode::COPY), "
456                      << (*Memo.PhysRegs)[i] << ").addReg(Op" << i << ");\n";
457               }
458
459               OS << "  return FastEmitInst_";
460               if (Memo.SubRegNo.empty()) {
461                 Operands.PrintManglingSuffix(OS, *Memo.PhysRegs);
462                 OS << "(" << InstNS << Memo.Name << ", ";
463                 OS << InstNS << Memo.RC->getName() << "RegisterClass";
464                 if (!Operands.empty())
465                   OS << ", ";
466                 Operands.PrintArguments(OS, *Memo.PhysRegs);
467                 OS << ");\n";
468               } else {
469                 OS << "extractsubreg(" << getName(RetVT);
470                 OS << ", Op0, Op0IsKill, ";
471                 OS << Memo.SubRegNo;
472                 OS << ");\n";
473               }
474
475               if (HasPred)
476                 OS << "  }\n";
477
478             }
479             // Return 0 if none of the predicates were satisfied.
480             if (HasPred)
481               OS << "  return 0;\n";
482             OS << "}\n";
483             OS << "\n";
484           }
485
486           // Emit one function for the type that demultiplexes on return type.
487           OS << "unsigned FastEmit_"
488              << getLegalCName(Opcode) << "_"
489              << getLegalCName(getName(VT)) << "_";
490           Operands.PrintManglingSuffix(OS);
491           OS << "(MVT RetVT";
492           if (!Operands.empty())
493             OS << ", ";
494           Operands.PrintParameters(OS);
495           OS << ") {\nswitch (RetVT.SimpleTy) {\n";
496           for (RetPredMap::const_iterator RI = RM.begin(), RE = RM.end();
497                RI != RE; ++RI) {
498             MVT::SimpleValueType RetVT = RI->first;
499             OS << "  case " << getName(RetVT) << ": return FastEmit_"
500                << getLegalCName(Opcode) << "_" << getLegalCName(getName(VT))
501                << "_" << getLegalCName(getName(RetVT)) << "_";
502             Operands.PrintManglingSuffix(OS);
503             OS << "(";
504             Operands.PrintArguments(OS);
505             OS << ");\n";
506           }
507           OS << "  default: return 0;\n}\n}\n\n";
508
509         } else {
510           // Non-variadic return type.
511           OS << "unsigned FastEmit_"
512              << getLegalCName(Opcode) << "_"
513              << getLegalCName(getName(VT)) << "_";
514           Operands.PrintManglingSuffix(OS);
515           OS << "(MVT RetVT";
516           if (!Operands.empty())
517             OS << ", ";
518           Operands.PrintParameters(OS);
519           OS << ") {\n";
520
521           OS << "  if (RetVT.SimpleTy != " << getName(RM.begin()->first)
522              << ")\n    return 0;\n";
523
524           const PredMap &PM = RM.begin()->second;
525           bool HasPred = false;
526
527           // Emit code for each possible instruction. There may be
528           // multiple if there are subtarget concerns.
529           for (PredMap::const_iterator PI = PM.begin(), PE = PM.end(); PI != PE;
530                ++PI) {
531             std::string PredicateCheck = PI->first;
532             const InstructionMemo &Memo = PI->second;
533
534             if (PredicateCheck.empty()) {
535               assert(!HasPred &&
536                      "Multiple instructions match, at least one has "
537                      "a predicate and at least one doesn't!");
538             } else {
539               OS << "  if (" + PredicateCheck + ") {\n";
540               OS << "  ";
541               HasPred = true;
542             }
543
544             for (unsigned i = 0; i < Memo.PhysRegs->size(); ++i) {
545               if ((*Memo.PhysRegs)[i] != "")
546                 OS << "  BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, "
547                    << "TII.get(TargetOpcode::COPY), "
548                    << (*Memo.PhysRegs)[i] << ").addReg(Op" << i << ");\n";
549             }
550
551             OS << "  return FastEmitInst_";
552
553             if (Memo.SubRegNo.empty()) {
554               Operands.PrintManglingSuffix(OS, *Memo.PhysRegs);
555               OS << "(" << InstNS << Memo.Name << ", ";
556               OS << InstNS << Memo.RC->getName() << "RegisterClass";
557               if (!Operands.empty())
558                 OS << ", ";
559               Operands.PrintArguments(OS, *Memo.PhysRegs);
560               OS << ");\n";
561             } else {
562               OS << "extractsubreg(RetVT, Op0, Op0IsKill, ";
563               OS << Memo.SubRegNo;
564               OS << ");\n";
565             }
566
567              if (HasPred)
568                OS << "  }\n";
569           }
570
571           // Return 0 if none of the predicates were satisfied.
572           if (HasPred)
573             OS << "  return 0;\n";
574           OS << "}\n";
575           OS << "\n";
576         }
577       }
578
579       // Emit one function for the opcode that demultiplexes based on the type.
580       OS << "unsigned FastEmit_"
581          << getLegalCName(Opcode) << "_";
582       Operands.PrintManglingSuffix(OS);
583       OS << "(MVT VT, MVT RetVT";
584       if (!Operands.empty())
585         OS << ", ";
586       Operands.PrintParameters(OS);
587       OS << ") {\n";
588       OS << "  switch (VT.SimpleTy) {\n";
589       for (TypeRetPredMap::const_iterator TI = TM.begin(), TE = TM.end();
590            TI != TE; ++TI) {
591         MVT::SimpleValueType VT = TI->first;
592         std::string TypeName = getName(VT);
593         OS << "  case " << TypeName << ": return FastEmit_"
594            << getLegalCName(Opcode) << "_" << getLegalCName(TypeName) << "_";
595         Operands.PrintManglingSuffix(OS);
596         OS << "(RetVT";
597         if (!Operands.empty())
598           OS << ", ";
599         Operands.PrintArguments(OS);
600         OS << ");\n";
601       }
602       OS << "  default: return 0;\n";
603       OS << "  }\n";
604       OS << "}\n";
605       OS << "\n";
606     }
607
608     OS << "// Top-level FastEmit function.\n";
609     OS << "\n";
610
611     // Emit one function for the operand signature that demultiplexes based
612     // on opcode and type.
613     OS << "unsigned FastEmit_";
614     Operands.PrintManglingSuffix(OS);
615     OS << "(MVT VT, MVT RetVT, unsigned Opcode";
616     if (!Operands.empty())
617       OS << ", ";
618     Operands.PrintParameters(OS);
619     OS << ") {\n";
620     OS << "  switch (Opcode) {\n";
621     for (OpcodeTypeRetPredMap::const_iterator I = OTM.begin(), E = OTM.end();
622          I != E; ++I) {
623       const std::string &Opcode = I->first;
624
625       OS << "  case " << Opcode << ": return FastEmit_"
626          << getLegalCName(Opcode) << "_";
627       Operands.PrintManglingSuffix(OS);
628       OS << "(VT, RetVT";
629       if (!Operands.empty())
630         OS << ", ";
631       Operands.PrintArguments(OS);
632       OS << ");\n";
633     }
634     OS << "  default: return 0;\n";
635     OS << "  }\n";
636     OS << "}\n";
637     OS << "\n";
638   }
639 }
640
641 void FastISelEmitter::run(raw_ostream &OS) {
642   const CodeGenTarget &Target = CGP.getTargetInfo();
643
644   // Determine the target's namespace name.
645   std::string InstNS = Target.getInstNamespace() + "::";
646   assert(InstNS.size() > 2 && "Can't determine target-specific namespace!");
647
648   EmitSourceFileHeader("\"Fast\" Instruction Selector for the " +
649                        Target.getName() + " target", OS);
650
651   FastISelMap F(InstNS);
652   F.CollectPatterns(CGP);
653   F.PrintFunctionDefinitions(OS);
654 }
655
656 FastISelEmitter::FastISelEmitter(RecordKeeper &R)
657   : Records(R),
658     CGP(R) {
659 }
660