[llvm-commits] [llvm] r121949 - in /llvm/trunk: include/llvm/MC/MCStreamer.h include/llvm/Target/TargetRegistry.h lib/CodeGen/LLVMTargetMachine.cpp lib/MC/MCAsmStreamer.cpp lib/Target/PTX/PTXMCAsmStreamer.cpp lib/Target/PTX/PTXTargetMachine.cpp t

Jason Kim jasonwkim at google.com
Fri Dec 17 08:47:15 PST 2010


On Fri, Dec 17, 2010 at 6:38 AM, Jan Sjodin <jan_sjodin at yahoo.com> wrote:
> Could I please get a copy of pact agreement and transcripts of the discussions
> leading up to it?

Me too.
Thanks!
-jason

>
> - Jan
>
>
>
> ----- Original Message ----
>> From: Jim Grosbach <grosbach at apple.com>
>> To: Daniel Dunbar <daniel at zuster.org>
>> Cc: llvm-commits at cs.uiuc.edu
>> Sent: Thu, December 16, 2010 11:00:42 AM
>> Subject: Re: [llvm-commits] [llvm] r121949 - in /llvm/trunk:
>>include/llvm/MC/MCStreamer.h include/llvm/Target/TargetRegistry.h
>>lib/CodeGen/LLVMTargetMachine.cpp lib/MC/MCAsmStreamer.cpp
>>lib/Target/PTX/PTXMCAsmStreamer.cpp lib/Target/PTX/PTXTargetMachine.cpp
>>tools/llvm-mc/llvm-mc.cpp
>>
>> True, but the non-aggression pact achieved was the best alternative. Now if we
>>can only get TargetMachine to the bargaining table...
>> -j
>> On Dec 15, 2010,  at 7:05 PM, Daniel Dunbar wrote:
>>
>> > Author: ddunbar
>> > Date: Wed  Dec 15 21:05:59 2010
>> > New Revision: 121949
>> >
>> > URL:  http://llvm.org/viewvc/llvm-project?rev=121949&view=rev
>> > Log:
>> > MC:  Make TargetAsmBackend available to the AsmStreamer.
>> > - Treaty talks on  the non-proliferation of MC objects broke down.
>> >
>> >  Modified:
>> >     llvm/trunk/include/llvm/MC/MCStreamer.h
>> >     llvm/trunk/include/llvm/Target/TargetRegistry.h
>> >     llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
>> >     llvm/trunk/lib/MC/MCAsmStreamer.cpp
>> >     llvm/trunk/lib/Target/PTX/PTXMCAsmStreamer.cpp
>> >     llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp
>> >     llvm/trunk/tools/llvm-mc/llvm-mc.cpp
>> >
>> > Modified:  llvm/trunk/include/llvm/MC/MCStreamer.h
>> > URL:
>>http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=121949&r1=121948&r2=121949&view=diff
>>
>> >
>>==============================================================================
>> > ; --- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
>> > +++  llvm/trunk/include/llvm/MC/MCStreamer.h Wed Dec 15 21:05:59 2010
>> > @@  -426,6 +426,10 @@
>> >   /// \param CE - If given, a code emitter to use  to show the instruction
>> >   /// encoding inline with the assembly.  This method takes ownership of \arg
>>CE.
>> >   ///
>> > +  ///  \param TAB - If given, a target asm backend to use to show the fixup
>> >  +  /// information in conjunction with encoding information. This method
>>takes
>> > +  /// ownership of \arg TAB.
>> > +   ///
>> >   /// \param ShowInst - Whether to show the MCInst  representation inline
>>with
>> >   /// the assembly.
>> >    MCStreamer *createAsmStreamer(MCContext &Ctx, formatted_raw_ostream  &OS,
>> > @@ -433,6 +437,7 @@
>> >                                   bool useLoc,
>> >                                  MCInstPrinter  *InstPrint = 0,
>> >                                  MCCodeEmitter *CE =  0,
>> > +                                 TargetAsmBackend *TAB =  0,
>> >                                  bool ShowInst = false);
>> >
>> >   /// createMachOStreamer - Create a machine code streamer which  will
>>generate
>> >
>> > Modified:  llvm/trunk/include/llvm/Target/TargetRegistry.h
>> > URL:
>>http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegistry.h?rev=121949&r1=121948&r2=121949&view=diff
>>
>> >
>>==============================================================================
>> > ; --- llvm/trunk/include/llvm/Target/TargetRegistry.h (original)
>> > +++  llvm/trunk/include/llvm/Target/TargetRegistry.h Wed Dec 15 21:05:59
> 2010
>> >  @@ -46,6 +46,7 @@
>> >                                  bool  useLoc,
>> >                                  MCInstPrinter  *InstPrint,
>> >                                  MCCodeEmitter  *CE,
>> > +                                 TargetAsmBackend  *TAB,
>> >                                  bool ShowInst);
>> >
>> >   /// Target - Wrapper for Target specific information.
>> > @@  -95,6 +96,7 @@
>> >                                                bool useLoc,
>> >                                                MCInstPrinter  *InstPrint,
>> >                                                MCCodeEmitter *CE,
>> > +                                               TargetAsmBackend  *TAB,
>> >                                                bool ShowInst);
>> >
>> >   private:
>> > @@  -323,10 +325,11 @@
>> >                                    bool  useLoc,
>> >                                    MCInstPrinter  *InstPrint,
>> >                                    MCCodeEmitter  *CE,
>> > +                                   TargetAsmBackend  *TAB,
>> >                                    bool ShowInst) const  {
>> >       // AsmStreamerCtorFn is default to  llvm::createAsmStreamer
>> >       return  AsmStreamerCtorFn(Ctx, OS, isVerboseAsm, useLoc,
>> > -                                 InstPrint, CE, ShowInst);
>> > +                                 InstPrint, CE, TAB, ShowInst);
>> >     }
>> >
>> >      /// @}
>> >
>> > Modified:  llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
>> > URL:
>>http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=121949&r1=121948&r2=121949&view=diff
>>
>> >
>>==============================================================================
>> > ; --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
>> > +++  llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Wed Dec 15 21:05:59 2010
>> > @@  -143,14 +143,17 @@
>> >
>> >     // Create a code emitter if  asked to show the encoding.
>> >     MCCodeEmitter *MCE =  0;
>> > -    if (ShowMCEncoding)
>> > +     TargetAsmBackend *TAB = 0;
>> > +    if (ShowMCEncoding)  {
>> >       MCE = getTarget().createCodeEmitter(*this,  *Context);
>> > +      TAB =  getTarget().createAsmBackend(TargetTriple);
>> > +    }
>> >
>> >     MCStreamer *S = getTarget().createAsmStreamer(*Context,  Out,
>> >                                                     getVerboseAsm(),
>> >                                                      hasMCUseLoc(),
>> >                                                     InstPrinter,
>> > -                                                     MCE,
>> > +                                                    MCE, TAB,
>> >                                                      ShowMCInst);
>> >     AsmStreamer.reset(S);
>> >      break;
>> >
>> > Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
>> >  URL:
>>http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=121949&r1=121948&r2=121949&view=diff
>>
>> >
>>==============================================================================
>> > ; --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
>> > +++  llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed Dec 15 21:05:59 2010
>> > @@ -23,8  +23,9 @@
>> > #include "llvm/Support/MathExtras.h"
>> > #include  "llvm/Support/Format.h"
>> > #include  "llvm/Support/FormattedStream.h"
>> > -#include  "llvm/Target/TargetLoweringObjectFile.h"
>> > +#include  "llvm/Target/TargetAsmBackend.h"
>> > #include  "llvm/Target/TargetAsmInfo.h"
>> > +#include  "llvm/Target/TargetLoweringObjectFile.h"
>> > using namespace llvm;
>> >
>> > namespace {
>> > @@ -34,6 +35,7 @@
>> >   const MCAsmInfo  &MAI;
>> >   OwningPtr<MCInstPrinter>  InstPrinter;
>> >   OwningPtr<MCCodeEmitter> Emitter;
>> >  +  OwningPtr<TargetAsmBackend> AsmBackend;
>> >
>> >    SmallString<128> CommentToEmit;
>> >   raw_svector_ostream  CommentStream;
>> > @@ -48,10 +50,12 @@
>> >    MCAsmStreamer(MCContext &Context, formatted_raw_ostream  &os,
>> >                 bool  isVerboseAsm,
>> >                  bool useLoc,
>> > -                 MCInstPrinter *printer, MCCodeEmitter *emitter, bool
>>showInst)
>> > +                 MCInstPrinter *printer,  MCCodeEmitter *emitter,
>> > +                 TargetAsmBackend *asmbackend,
>> > +                 bool showInst)
>> >     :  MCStreamer(Context), OS(os), MAI(Context.getAsmInfo()),
>> > -       InstPrinter(printer), Emitter(emitter),
>>CommentStream(CommentToEmit),
>> > -       IsVerboseAsm(isVerboseAsm),
>> > +      InstPrinter(printer),  Emitter(emitter), AsmBackend(asmbackend),
>> > +       CommentStream(CommentToEmit), IsVerboseAsm(isVerboseAsm),
>> >        ShowInst(showInst), UseLoc(useLoc) {
>> >     if  (InstPrinter && IsVerboseAsm)
>> >        InstPrinter->setCommentStream(CommentStream);
>> > @@ -893,8 +897,8  @@
>> > MCStreamer *llvm::createAsmStreamer(MCContext  &Context,
>> >                                       formatted_raw_ostream &OS,
>> >                                       bool isVerboseAsm, bool useLoc,
>> > -                                      MCInstPrinter *IP,
>> > -                                      MCCodeEmitter *CE, bool ShowInst) {
>> > +                                      MCInstPrinter *IP, MCCodeEmitter *CE,
>> >  +                                     TargetAsmBackend *TAB, bool  ShowInst)
>>{
>> >   return new MCAsmStreamer(Context, OS, isVerboseAsm,  useLoc,
>> > -                            IP, CE, ShowInst);
>> > +                            IP, CE,  TAB, ShowInst);
>> > }
>> >
>> > Modified:  llvm/trunk/lib/Target/PTX/PTXMCAsmStreamer.cpp
>> > URL:
>>http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXMCAsmStreamer.cpp?rev=121949&r1=121948&r2=121949&view=diff
>>
>> >
>>==============================================================================
>> > ; --- llvm/trunk/lib/Target/PTX/PTXMCAsmStreamer.cpp (original)
>> > +++  llvm/trunk/lib/Target/PTX/PTXMCAsmStreamer.cpp Wed Dec 15 21:05:59 2010
>> >  @@ -540,7 +540,8 @@
>> >                                      formatted_raw_ostream &OS,
>> >                                      bool isVerboseAsm, bool useLoc,
>> >                                      MCInstPrinter *IP,
>> > -                                     MCCodeEmitter *CE, bool ShowInst) {
>> > +                                     MCCodeEmitter *CE, TargetAsmBackend
>>*TAB,
>> > +                                     bool ShowInst) {
>> >     return new  PTXMCAsmStreamer(Context, OS, isVerboseAsm, useLoc,
>> >                                   IP, CE, ShowInst);
>> >   }
>> >
>> > Modified:  llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp
>> > URL:
>>http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp?rev=121949&r1=121948&r2=121949&view=diff
>>
>> >
>>==============================================================================
>> > ; --- llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp (original)
>> > +++  llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp Wed Dec 15 21:05:59 2010
>> >  @@ -24,6 +24,7 @@
>> >                                     bool  isVerboseAsm, bool useLoc,
>> >                                      MCInstPrinter *InstPrint,
>> >                                      MCCodeEmitter *CE,
>> > +                                     TargetAsmBackend *TAB,
>> >                                      bool ShowInst);
>> > }
>> >
>> >
>> > Modified:  llvm/trunk/tools/llvm-mc/llvm-mc.cpp
>> > URL:
>>http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=121949&r1=121948&r2=121949&view=diff
>>
>> >
>>==============================================================================
>> > ; --- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original)
>> > +++  llvm/trunk/tools/llvm-mc/llvm-mc.cpp Wed Dec 15 21:05:59 2010
>> > @@ -340,10  +340,14 @@
>> >     MCInstPrinter *IP =
>> >        TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI);
>> >      MCCodeEmitter *CE = 0;
>> > -    if (ShowEncoding)
>> > +     TargetAsmBackend *TAB = 0;
>> > +    if (ShowEncoding)  {
>> >       CE = TheTarget->createCodeEmitter(*TM,  Ctx);
>> > +      TAB =  TheTarget->createAsmBackend(TripleName);
>> > +     }
>> >     Str.reset(TheTarget->createAsmStreamer(Ctx, FOS,  /*asmverbose*/true,
>> > -                                             /*useLoc*/ true, IP, CE,
>>ShowInst));
>> > +                                             /*useLoc*/ true,  IP, CE, TAB,
>> > +                                             ShowInst));
>> >   } else if (FileType == OFT_Null)  {
>> >     Str.reset(createNullStreamer(Ctx));
>> >   }  else {
>> >
>> >
>> >  _______________________________________________
>> > llvm-commits mailing  list
>> > llvm-commits at cs.uiuc.edu
>> >  http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>> _______________________________________________
>> llvm-commits  mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list