[LLVMdev] module level assembly optimization

Eric Christopher echristo at gmail.com
Tue Oct 15 11:05:35 PDT 2013


On Mon, Oct 14, 2013 at 6:56 PM, reed kotler <rkotler at mips.com> wrote:
> I would like to do constant pools over an entire module instead of just on a
> per function basis as constant islands does it now.
>
> It seems there are two options for this:
>
> 1) collect the machine functions with their machine instructions for the
> whole module, edit them as needed and then
> call asmprinter for them one at a time.
>
> 2) collect all the instruction streams and store them in lists, one per
> section and put them all out at the end.
>
> There are possibly other kinds of module level optimizations that could
> benefit from this.
>
> Some of this might be better done by moving this functionality into target
> independent code but I think I could do it all
> without such changes.
>
> Any thoughts?
>

Two questions:

a) what do you think you'll gain over per-function,
b) how are you going to handle constants out of range on a module level?

-eric



More information about the llvm-dev mailing list