[PATCH] Move arm assembler constant pools to ARMTargetStreamer class

David Peixotto dpeixott at codeaurora.org
Tue Jan 14 15:34:55 PST 2014


On 1/14/2014 1:59 AM, Kristof Beyls wrote:
> 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.

Thanks, I also still find it somewhat confusing so I thought I'd ask the 
list for an opinion.

> 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)?

Yes, that is definitely the goal. I believe this patch should make the 
two paths equivalent for ldr-pseudo.

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

I did not see another good place. I needed to find a place to hold the 
constant pools that would be survive through the entire assembly 
process. My first thought was to put it in the streamer, and when I saw 
the TargetStreamer that looked like a good fit.



More information about the llvm-commits mailing list