[llvm-commits] [llvm] r59617 - in /llvm/trunk/lib/Target/PIC16: PIC16.h PIC16.td PIC16AsmPrinter.cpp PIC16CallingConv.td PIC16ConstantPoolValue.cpp PIC16ConstantPoolValue.h PIC16ISelDAGToDAG.cpp PIC16ISelDAGToDAG.h PIC16ISelLowering.cpp PIC16ISelLowering.h PIC16InstrFormats.td PIC16InstrInfo.cpp PIC16InstrInfo.h PIC16InstrInfo.td PIC16RegisterInfo.cpp PIC16RegisterInfo.h PIC16RegisterInfo.td PIC16Subtarget.cpp PIC16Subtarget.h PIC16TargetAsmInfo.cpp PIC16TargetAsmInfo.h PIC16TargetMachine.cpp PIC16TargetMachine.h

sanjiv gupta sanjiv.gupta at microchip.com
Fri Nov 21 00:10:09 PST 2008


On Wed, 2008-11-19 at 18:51 +0300, Anton Korobeynikov wrote:
> Hello, Sanjiv
> 
> > +  SwitchToTextSection (codeSection.c_str(),F);
> This really looks like a step back.... And I think we even talked about
> the issue. In fact SwitchTo{Text,Data}Section routines are obsolete and
> will be removed, when I will have time to work on asmprinters again. And
> PIC backend is the only backend, which uses them currently...
> 
> In practice we don't have pure 'data' or 'text' sections, we usually
> tend to separate different flavours of code and data and use different
> sections for them. It's really inefficient to have separate printing
> routine for each new kind of section, even more - when the difference
> between them is only 1 suffix.
> 
> There are at least two pretty straightforward ways to handle PIC section
> printing problem:
> 1. Handle suffixes as section flags. Look, how ELFTagetAsmInfo handles
> this stuff.
> 2. Make a step upper and introduce a generic "section printing"
> function, which will know how to print sections of different kinds for
> specific target and use this as a fallback solution for PIC.
> 

Anton,
we will rework this as you suggested.

Thanks,
Sanjiv



More information about the llvm-commits mailing list