[PATCH] Move arm assembler constant pools to ARMTargetStreamer class

Kristof Beyls kristof.beyls at arm.com
Tue Jan 14 01:59:16 PST 2014


Hi David,

Thanks for working on this.

I'm afraid I'm not enough of an expert on the TargetStreamer hierarchy to
asses where the right place is to put the code to implement
assembler-generated constant pools.

However, it's clear that something must be done to make sure that assembler-
generated constant pools are not dumped out immediately after each fragment
of inline assembly code, but rather after the current code section finishes.
I would have thought that the goal should be that using inline assembly
with the integrated assembler produces the same results as when doing a
2-step approach (first producing assembly, then assembling the result:
clang -S -o t.s; clang -c t.s)?

I guess there isn't really any obvious alternative on where to put the
assembler-generated constant pools functionality?

Thanks,

Kristof

> -----Original Message-----
> From: David Peixotto [mailto:dpeixott at codeaurora.org]
> Sent: 13 January 2014 18:35
> To: llvm-commits at cs.uiuc.edu
> Cc: rafael.espindola at gmail.com; Jim Grosbach; Kristof Beyls
> Subject: RE: [PATCH] Move arm assembler constant pools to
ARMTargetStreamer
> class
> 
> Ping. Any feedback on the patch/approach? What do people think about
storing
> the constant pools in the ARMTargetStreamer class?
> 
> 
> > -----Original Message-----
> > From: David Peixotto [mailto:dpeixott at codeaurora.org]
> > Sent: Wednesday, January 08, 2014 11:51 AM
> > To: llvm-commits at cs.uiuc.edu
> > Subject: [PATCH] Move arm assembler constant pools to ARMTargetStreamer
> > class
> >
> > Attached is a patch to fix http://llvm.org/bugs/show_bug.cgi?id=18354.
The
> > ldr-pseudo produces incorrect code when used in inline assembly. In this
> > patch I moved the constant pools to the ARMTargetStreamer class because
> > that looked like a logical location for them. I'm open to other
> > suggestions or approaches.
> >
> >
> > This patch fixes the ldr-pseudo implementation to work when used in
inline
> > assembly. Previously we kept the assembler generated constant pools in
the
> > ARMAsmParser object. This does not work for inline assembly because a
new
> > parser object is created for each blob of inline assembly. This patch
> > moves the constant pools to the ARMTargetStreamer class so that the
> > constant pool will remain alive for the entire code generation process.
> >
> > This patch also adds the ARMTargetMachOStreamer class. There was no
> > existing definition of the ARMTargetMachOStreamer class because the
target
> > streamer was not previously needed when generating MachO objects. We now
> > require the ARMTargetStreamer class to exist because it is used to hold
> > the assembler constant pools.
> >
> > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> > hosted by The Linux Foundation
> >
> >
> 
> 







More information about the llvm-commits mailing list