llvm.org GIT mirror llvm / 11d53c1
rearrange MCContext ownership. Before LLVMTargetMachine created it and passing off ownership to AsmPrinter. Now MachineModuleInfo creates it and owns it by value. This allows us to use MCSymbols more consistently throughout the rest of the code generator, and simplifies a bit of code. This also allows MachineFunction to keep an MCContext reference handy, and cleans up the TargetRegistry interfaces for AsmPrinters. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98450 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
24 changed file(s) with 117 addition(s) and 117 deletion(s). Raw diff Collapse all Expand all
142142
143143 protected:
144144 explicit AsmPrinter(formatted_raw_ostream &o, TargetMachine &TM,
145 MCContext &Ctx, MCStreamer &Streamer,
146 const MCAsmInfo *T);
145 MCStreamer &Streamer);
147146
148147 public:
149148 virtual ~AsmPrinter();
7070 class MachineFunction {
7171 Function *Fn;
7272 const TargetMachine &Target;
73 MCContext &Ctx;
7374
7475 // RegInfo - Information about each register in use in the function.
7576 MachineRegisterInfo *RegInfo;
120121 // The alignment of the function.
121122 unsigned Alignment;
122123
123 MachineFunction(const MachineFunction &); // intentionally unimplemented
124 void operator=(const MachineFunction&); // intentionally unimplemented
124 MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT
125 void operator=(const MachineFunction&); // DO NOT IMPLEMENT
125126
126127 public:
127 MachineFunction(Function *Fn, const TargetMachine &TM, unsigned FunctionNum);
128 MachineFunction(Function *Fn, const TargetMachine &TM, unsigned FunctionNum,
129 MCContext &Ctx);
128130 ~MachineFunction();
129131
132 MCContext &getContext() const { return Ctx; }
133
130134 /// getFunction - Return the LLVM function that this machine code represents
131135 ///
132136 Function *getFunction() const { return Fn; }
3030 #ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H
3131 #define LLVM_CODEGEN_MACHINEMODULEINFO_H
3232
33 #include "llvm/Pass.h"
3334 #include "llvm/GlobalValue.h"
34 #include "llvm/Pass.h"
3535 #include "llvm/Metadata.h"
36 #include "llvm/CodeGen/MachineLocation.h"
37 #include "llvm/MC/MCContext.h"
38 #include "llvm/Support/Dwarf.h"
39 #include "llvm/Support/ValueHandle.h"
40 #include "llvm/System/DataTypes.h"
3641 #include "llvm/ADT/DenseMap.h"
3742 #include "llvm/ADT/PointerIntPair.h"
3843 #include "llvm/ADT/SmallPtrSet.h"
39 #include "llvm/ADT/SmallSet.h"
4044 #include "llvm/ADT/SmallVector.h"
41 #include "llvm/ADT/StringMap.h"
42 #include "llvm/ADT/UniqueVector.h"
43 #include "llvm/CodeGen/MachineLocation.h"
44 #include "llvm/Support/Dwarf.h"
45 #include "llvm/Support/ValueHandle.h"
46 #include "llvm/System/DataTypes.h"
4745
4846 namespace llvm {
4947
5149 // Forward declarations.
5250 class Constant;
5351 class GlobalVariable;
54 class MCSymbol;
5552 class MDNode;
5653 class MachineBasicBlock;
5754 class MachineFunction;
9996 /// schemes and reformated for specific use.
10097 ///
10198 class MachineModuleInfo : public ImmutablePass {
99 /// Context - This is the MCContext used for the entire code generator.
100 MCContext Context;
101
102102 /// ObjFileMMI - This is the object-file-format-specific implementation of
103103 /// MachineModuleInfoImpl, which lets targets accumulate whatever info they
104104 /// want.
162162 VariableDbgInfoMapTy;
163163 VariableDbgInfoMapTy VariableDbgInfo;
164164
165 MachineModuleInfo();
165 MachineModuleInfo(); // DUMMY CONSTRUCTOR, DO NOT CALL.
166 MachineModuleInfo(const MCAsmInfo &MAI); // Real constructor.
166167 ~MachineModuleInfo();
167168
168169 bool doInitialization();
171172 /// EndFunction - Discard function meta information.
172173 ///
173174 void EndFunction();
175
176 const MCContext &getContext() const { return Context; }
177 MCContext &getContext() { return Context; }
174178
175179 /// getInfo - Keep track of various per-function pieces of information for
176180 /// backends that would like to do so.
2929 class TargetLowering;
3030 class TargetFrameInfo;
3131 class JITCodeEmitter;
32 class MCContext;
3233 class TargetRegisterInfo;
3334 class PassManagerBase;
3435 class PassManager;
228229 protected: // Can only create subclasses.
229230 LLVMTargetMachine(const Target &T, const std::string &TargetTriple);
230231
232 private:
231233 /// addCommonCodeGenPasses - Add standard LLVM codegen passes used for
232234 /// both emitting to assembly files or machine code output.
233235 ///
234236 bool addCommonCodeGenPasses(PassManagerBase &, CodeGenOpt::Level,
235 bool DisableVerify);
236
237 private:
237 bool DisableVerify, MCContext *&OutCtx);
238
238239 virtual void setCodeModelForJIT();
239240 virtual void setCodeModelForStatic();
240241
6161 const std::string &Features);
6262 typedef AsmPrinter *(*AsmPrinterCtorTy)(formatted_raw_ostream &OS,
6363 TargetMachine &TM,
64 MCContext &Ctx,
65 MCStreamer &Streamer,
66 const MCAsmInfo *MAI);
64 MCStreamer &Streamer);
6765 typedef TargetAsmBackend *(*AsmBackendCtorTy)(const Target &T,
6866 const std::string &TT);
6967 typedef TargetAsmLexer *(*AsmLexerCtorTy)(const Target &T,
234232 }
235233
236234 /// createAsmPrinter - Create a target specific assembly printer pass. This
237 /// takes ownership of the MCContext and MCStreamer objects but not the MAI.
235 /// takes ownership of the MCStreamer object.
238236 AsmPrinter *createAsmPrinter(formatted_raw_ostream &OS, TargetMachine &TM,
239 MCContext &Ctx, MCStreamer &Streamer,
240 const MCAsmInfo *MAI) const {
237 MCStreamer &Streamer) const {
241238 if (!AsmPrinterCtorFn)
242239 return 0;
243 return AsmPrinterCtorFn(OS, TM, Ctx, Streamer, MAI);
240 return AsmPrinterCtorFn(OS, TM, Streamer);
244241 }
245242
246243 const MCDisassembler *createMCDisassembler() const {
649646
650647 private:
651648 static AsmPrinter *Allocator(formatted_raw_ostream &OS, TargetMachine &TM,
652 MCContext &Ctx, MCStreamer &Streamer,
653 const MCAsmInfo *MAI) {
654 return new AsmPrinterImpl(OS, TM, Ctx, Streamer, MAI);
649 MCStreamer &Streamer) {
650 return new AsmPrinterImpl(OS, TM, Streamer);
655651 }
656652 };
657653
5454 STATISTIC(EmittedInsts, "Number of machine instrs printed");
5555
5656 char AsmPrinter::ID = 0;
57
5758 AsmPrinter::AsmPrinter(formatted_raw_ostream &o, TargetMachine &tm,
58 MCContext &Ctx, MCStreamer &Streamer,
59 const MCAsmInfo *T)
59 MCStreamer &Streamer)
6060 : MachineFunctionPass(&ID), O(o),
61 TM(tm), MAI(T), TRI(tm.getRegisterInfo()),
62 OutContext(Ctx), OutStreamer(Streamer),
61 TM(tm), MAI(tm.getMCAsmInfo()), TRI(tm.getRegisterInfo()),
62 OutContext(Streamer.getContext()),
63 OutStreamer(Streamer),
6364 LastMI(0), LastFn(0), Counter(~0U), SetCounter(0), PrevDLT(NULL) {
6465 DW = 0; MMI = 0;
6566 VerboseAsm = Streamer.isVerboseAsm();
7172 delete I->second;
7273
7374 delete &OutStreamer;
74 delete &OutContext;
7575 }
7676
7777 /// getFunctionNumber - Return a unique ID for the current function.
9393 void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
9494 AU.setPreservesAll();
9595 MachineFunctionPass::getAnalysisUsage(AU);
96 AU.addRequired();
9697 AU.addRequired();
9798 if (VerboseAsm)
9899 AU.addRequired();
99100 }
100101
101102 bool AsmPrinter::doInitialization(Module &M) {
103 MMI = getAnalysisIfAvailable();
104 MMI->AnalyzeModule(M);
105
102106 // Initialize TargetLoweringObjectFile.
103107 const_cast(getObjFileLowering())
104108 .Initialize(OutContext, TM);
127131 << '\n' << MAI->getCommentString()
128132 << " End of file scope inline assembly\n";
129133
130 MMI = getAnalysisIfAvailable();
131 if (MMI)
132 MMI->AnalyzeModule(M);
133134 DW = getAnalysisIfAvailable();
134135 if (DW)
135136 DW->BeginModule(&M, MMI, O, this, MAI);
1212
1313 #include "llvm/Target/TargetMachine.h"
1414 #include "llvm/PassManager.h"
15 #include "llvm/Pass.h"
1615 #include "llvm/Analysis/Verifier.h"
1716 #include "llvm/Assembly/PrintModulePass.h"
1817 #include "llvm/CodeGen/AsmPrinter.h"
18 #include "llvm/CodeGen/MachineFunctionAnalysis.h"
19 #include "llvm/CodeGen/MachineModuleInfo.h"
20 #include "llvm/CodeGen/GCStrategy.h"
1921 #include "llvm/CodeGen/Passes.h"
20 #include "llvm/CodeGen/GCStrategy.h"
21 #include "llvm/CodeGen/MachineFunctionAnalysis.h"
2222 #include "llvm/Target/TargetOptions.h"
2323 #include "llvm/MC/MCAsmInfo.h"
24 #include "llvm/MC/MCContext.h"
2524 #include "llvm/MC/MCStreamer.h"
2625 #include "llvm/Target/TargetData.h"
2726 #include "llvm/Target/TargetRegistry.h"
115114 CodeGenOpt::Level OptLevel,
116115 bool DisableVerify) {
117116 // Add common CodeGen passes.
118 if (addCommonCodeGenPasses(PM, OptLevel, DisableVerify))
117 MCContext *Context = 0;
118 if (addCommonCodeGenPasses(PM, OptLevel, DisableVerify, Context))
119119 return true;
120 assert(Context != 0 && "Failed to get MCContext");
120121
121122 const MCAsmInfo &MAI = *getMCAsmInfo();
122 OwningPtr Context(new MCContext(MAI));
123123 OwningPtr AsmStreamer;
124124
125125 formatted_raw_ostream *LegacyOutput;
165165 break;
166166 }
167167
168 // Create the AsmPrinter, which takes ownership of Context and AsmStreamer
169 // if successful.
168 // Create the AsmPrinter, which takes ownership of AsmStreamer if successful.
170169 FunctionPass *Printer =
171 getTarget().createAsmPrinter(*LegacyOutput, *this, *Context, *AsmStreamer,
172 getMCAsmInfo());
170 getTarget().createAsmPrinter(*LegacyOutput, *this, *AsmStreamer);
173171 if (Printer == 0)
174172 return true;
175173
176 // If successful, createAsmPrinter took ownership of AsmStreamer and Context.
177 Context.take(); AsmStreamer.take();
174 // If successful, createAsmPrinter took ownership of AsmStreamer.
175 AsmStreamer.take();
178176
179177 PM.add(Printer);
180178
198196 setCodeModelForJIT();
199197
200198 // Add common CodeGen passes.
201 if (addCommonCodeGenPasses(PM, OptLevel, DisableVerify))
199 MCContext *Ctx = 0;
200 if (addCommonCodeGenPasses(PM, OptLevel, DisableVerify, Ctx))
202201 return true;
203202
204203 addCodeEmitter(PM, OptLevel, JCE);
207206 return false; // success!
208207 }
209208
210 static void printNoVerify(PassManagerBase &PM,
211 const char *Banner) {
209 static void printNoVerify(PassManagerBase &PM, const char *Banner) {
212210 if (PrintMachineCode)
213211 PM.add(createMachineFunctionPrinterPass(dbgs(), Banner));
214212 }
228226 ///
229227 bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
230228 CodeGenOpt::Level OptLevel,
231 bool DisableVerify) {
229 bool DisableVerify,
230 MCContext *&OutContext) {
232231 // Standard LLVM-Level Passes.
233232
234233 // Before running any passes, run the verifier to determine if the input
251250
252251 // Turn exception handling constructs into something the code generators can
253252 // handle.
254 switch (getMCAsmInfo()->getExceptionHandlingType())
255 {
253 switch (getMCAsmInfo()->getExceptionHandlingType()) {
256254 case ExceptionHandling::SjLj:
257255 // SjLj piggy-backs on dwarf for this bit. The cleanups done apply to both
258256 // Dwarf EH prepare needs to be run after SjLj prepare. Otherwise,
292290 PM.add(createVerifierPass());
293291
294292 // Standard Lower-Level Passes.
293
294 // Install a MachineModuleInfo class, which is an immutable pass that holds
295 // all the per-module stuff we're generating, including MCContext.
296 MachineModuleInfo *MMI = new MachineModuleInfo(*getMCAsmInfo());
297 PM.add(MMI);
298 OutContext = &MMI->getContext(); // Return the MCContext specifically by-ref.
299
295300
296301 // Set up a MachineFunction for the rest of CodeGen to work on.
297302 PM.add(new MachineFunctionAnalysis(*this, OptLevel));
8484 }
8585
8686 MachineFunction::MachineFunction(Function *F, const TargetMachine &TM,
87 unsigned FunctionNum)
88 : Fn(F), Target(TM) {
87 unsigned FunctionNum, MCContext &ctx)
88 : Fn(F), Target(TM), Ctx(ctx) {
8989 if (TM.getRegisterInfo())
9090 RegInfo = new (Allocator.Allocate())
9191 MachineRegisterInfo(*TM.getRegisterInfo());
1212
1313 #include "llvm/CodeGen/MachineFunctionAnalysis.h"
1414 #include "llvm/CodeGen/MachineFunction.h"
15 #include "llvm/CodeGen/MachineModuleInfo.h"
1516 using namespace llvm;
1617
1718 // Register this pass with PassInfo directly to avoid having to define
3536
3637 bool MachineFunctionAnalysis::runOnFunction(Function &F) {
3738 assert(!MF && "MachineFunctionAnalysis already initialized!");
38 MF = new MachineFunction(&F, TM, NextFnNum++);
39 MF = new MachineFunction(&F, TM, NextFnNum++,
40 getAnalysis().getContext());
3941 return false;
4042 }
4143
4648
4749 void MachineFunctionAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
4850 AU.setPreservesAll();
51 AU.addRequired();
4952 }
2828
2929 // Handle the Pass registration stuff necessary to use TargetData's.
3030 static RegisterPass
31 X("machinemoduleinfo", "Module Information");
31 X("machinemoduleinfo", "Machine Module Information");
3232 char MachineModuleInfo::ID = 0;
3333
3434 // Out of line virtual method.
3636
3737 //===----------------------------------------------------------------------===//
3838
39 MachineModuleInfo::MachineModuleInfo()
40 : ImmutablePass(&ID)
41 , ObjFileMMI(0)
42 , CurCallSite(0)
43 , CallsEHReturn(0)
44 , CallsUnwindInit(0)
45 , DbgInfoAvailable(false) {
39 MachineModuleInfo::MachineModuleInfo(const MCAsmInfo &MAI)
40 : ImmutablePass(&ID), Context(MAI),
41 ObjFileMMI(0), CurCallSite(0), CallsEHReturn(0), CallsUnwindInit(0),
42 DbgInfoAvailable(false) {
4643 // Always emit some info, by default "no personality" info.
4744 Personalities.push_back(NULL);
45 }
46
47 MachineModuleInfo::MachineModuleInfo()
48 : ImmutablePass(&ID), Context(*(MCAsmInfo*)0) {
49 assert(0 && "This MachineModuleInfo constructor should never be called, MMI "
50 "should always be explicitly constructed by LLVMTargetMachine");
51 abort();
4852 }
4953
5054 MachineModuleInfo::~MachineModuleInfo() {
7474
7575 public:
7676 explicit ARMAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
77 MCContext &Ctx, MCStreamer &Streamer,
78 const MCAsmInfo *T)
79 : AsmPrinter(O, TM, Ctx, Streamer, T), AFI(NULL), MCP(NULL) {
77 MCStreamer &Streamer)
78 : AsmPrinter(O, TM, Streamer), AFI(NULL), MCP(NULL) {
8079 Subtarget = &TM.getSubtarget();
8180 }
8281
3737 ///
3838
3939 explicit AlphaAsmPrinter(formatted_raw_ostream &o, TargetMachine &tm,
40 MCContext &Ctx, MCStreamer &Streamer,
41 const MCAsmInfo *T)
42 : AsmPrinter(o, tm, Ctx, Streamer, T) {}
40 MCStreamer &Streamer)
41 : AsmPrinter(o, tm, Streamer) {}
4342
4443 virtual const char *getPassName() const {
4544 return "Alpha Assembly Printer";
3939 class BlackfinAsmPrinter : public AsmPrinter {
4040 public:
4141 BlackfinAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
42 MCContext &Ctx, MCStreamer &Streamer,
43 const MCAsmInfo *MAI)
44 : AsmPrinter(O, TM, Ctx, Streamer, MAI) {}
42 MCStreamer &Streamer)
43 : AsmPrinter(O, TM, Streamer) {}
4544
4645 virtual const char *getPassName() const {
4746 return "Blackfin Assembly Printer";
3838 class SPUAsmPrinter : public AsmPrinter {
3939 public:
4040 explicit SPUAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
41 MCContext &Ctx, MCStreamer &Streamer,
42 const MCAsmInfo *T) :
43 AsmPrinter(O, TM, Ctx, Streamer, T) {}
41 MCStreamer &Streamer) :
42 AsmPrinter(O, TM, Streamer) {}
4443
4544 virtual const char *getPassName() const {
4645 return "STI CBEA SPU Assembly Printer";
5252 const MBlazeSubtarget *Subtarget;
5353 public:
5454 explicit MBlazeAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
55 MCContext &Ctx, MCStreamer &Streamer,
56 const MCAsmInfo *T )
57 : AsmPrinter(O, TM, Ctx, Streamer, T) {
55 MCStreamer &Streamer)
56 : AsmPrinter(O, TM, Streamer) {
5857 Subtarget = &TM.getSubtarget();
5958 }
6059
4242 class MSP430AsmPrinter : public AsmPrinter {
4343 public:
4444 MSP430AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
45 MCContext &Ctx, MCStreamer &Streamer,
46 const MCAsmInfo *MAI)
47 : AsmPrinter(O, TM, Ctx, Streamer, MAI) {}
45 MCStreamer &Streamer)
46 : AsmPrinter(O, TM, Streamer) {}
4847
4948 virtual const char *getPassName() const {
5049 return "MSP430 Assembly Printer";
5050 const MipsSubtarget *Subtarget;
5151 public:
5252 explicit MipsAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
53 MCContext &Ctx, MCStreamer &Streamer,
54 const MCAsmInfo *T)
55 : AsmPrinter(O, TM, Ctx, Streamer, T) {
53 MCStreamer &Streamer)
54 : AsmPrinter(O, TM, Streamer) {
5655 Subtarget = &TM.getSubtarget();
5756 }
5857
3535 #include "PIC16GenAsmWriter.inc"
3636
3737 PIC16AsmPrinter::PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
38 MCContext &Ctx, MCStreamer &Streamer,
39 const MCAsmInfo *T)
40 : AsmPrinter(O, TM, Ctx, Streamer, T), DbgInfo(O, T) {
38 MCStreamer &Streamer)
39 : AsmPrinter(O, TM, Streamer), DbgInfo(O, TM.getMCAsmInfo()) {
4140 PTLI = static_cast(TM.getTargetLowering());
42 PMAI = static_cast(T);
41 PMAI = static_cast(TM.getMCAsmInfo());
4342 PTOF = (PIC16TargetObjectFile *)&PTLI->getObjFileLowering();
4443 }
4544
3030 class VISIBILITY_HIDDEN PIC16AsmPrinter : public AsmPrinter {
3131 public:
3232 explicit PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
33 MCContext &Ctx, MCStreamer &Streamer,
34 const MCAsmInfo *T);
33 MCStreamer &Streamer);
3534 private:
3635 virtual const char *getPassName() const {
3736 return "PIC16 Assembly Printer";
6060 uint64_t LabelID;
6161 public:
6262 explicit PPCAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
63 MCContext &Ctx, MCStreamer &Streamer,
64 const MCAsmInfo *T)
65 : AsmPrinter(O, TM, Ctx, Streamer, T),
63 MCStreamer &Streamer)
64 : AsmPrinter(O, TM, Streamer),
6665 Subtarget(TM.getSubtarget()), LabelID(0) {}
6766
6867 virtual const char *getPassName() const {
323322 class PPCLinuxAsmPrinter : public PPCAsmPrinter {
324323 public:
325324 explicit PPCLinuxAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
326 MCContext &Ctx, MCStreamer &Streamer,
327 const MCAsmInfo *T)
328 : PPCAsmPrinter(O, TM, Ctx, Streamer, T) {}
325 MCStreamer &Streamer)
326 : PPCAsmPrinter(O, TM, Streamer) {}
329327
330328 virtual const char *getPassName() const {
331329 return "Linux PPC Assembly Printer";
349347 formatted_raw_ostream &OS;
350348 public:
351349 explicit PPCDarwinAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
352 MCContext &Ctx, MCStreamer &Streamer,
353 const MCAsmInfo *T)
354 : PPCAsmPrinter(O, TM, Ctx, Streamer, T), OS(O) {}
350 MCStreamer &Streamer)
351 : PPCAsmPrinter(O, TM, Streamer), OS(O) {}
355352
356353 virtual const char *getPassName() const {
357354 return "Darwin PPC Assembly Printer";
857854 ///
858855 static AsmPrinter *createPPCAsmPrinterPass(formatted_raw_ostream &o,
859856 TargetMachine &tm,
860 MCContext &Ctx, MCStreamer &Streamer,
861 const MCAsmInfo *tai) {
857 MCStreamer &Streamer) {
862858 const PPCSubtarget *Subtarget = &tm.getSubtarget();
863859
864860 if (Subtarget->isDarwin())
865 return new PPCDarwinAsmPrinter(o, tm, Ctx, Streamer, tai);
866 return new PPCLinuxAsmPrinter(o, tm, Ctx, Streamer, tai);
861 return new PPCDarwinAsmPrinter(o, tm, Streamer);
862 return new PPCLinuxAsmPrinter(o, tm, Streamer);
867863 }
868864
869865 // Force static initialization.
3030 class SparcAsmPrinter : public AsmPrinter {
3131 public:
3232 explicit SparcAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
33 MCContext &Ctx, MCStreamer &Streamer,
34 const MCAsmInfo *T)
35 : AsmPrinter(O, TM, Ctx, Streamer, T) {}
33 MCStreamer &Streamer)
34 : AsmPrinter(O, TM, Streamer) {}
3635
3736 virtual const char *getPassName() const {
3837 return "Sparc Assembly Printer";
4040 class SystemZAsmPrinter : public AsmPrinter {
4141 public:
4242 SystemZAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
43 MCContext &Ctx, MCStreamer &Streamer,
44 const MCAsmInfo *MAI)
45 : AsmPrinter(O, TM, Ctx, Streamer, MAI) {}
43 MCStreamer &Streamer)
44 : AsmPrinter(O, TM, Streamer) {}
4645
4746 virtual const char *getPassName() const {
4847 return "SystemZ Assembly Printer";
3535 const X86Subtarget *Subtarget;
3636 public:
3737 explicit X86AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
38 MCContext &Ctx, MCStreamer &Streamer,
39 const MCAsmInfo *T)
40 : AsmPrinter(O, TM, Ctx, Streamer, T) {
38 MCStreamer &Streamer)
39 : AsmPrinter(O, TM, Streamer) {
4140 Subtarget = &TM.getSubtarget();
4241 }
4342
5353 const XCoreSubtarget &Subtarget;
5454 public:
5555 explicit XCoreAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
56 MCContext &Ctx, MCStreamer &Streamer,
57 const MCAsmInfo *T)
58 : AsmPrinter(O, TM, Ctx, Streamer, T),
56 MCStreamer &Streamer)
57 : AsmPrinter(O, TM, Streamer),
5958 Subtarget(TM.getSubtarget()) {}
6059
6160 virtual const char *getPassName() const {