[LLVMdev] flag_unit_at_a_time and pass scheduling in llvm-gcc

Chris Lattner sabre at nondot.org
Thu Apr 17 10:48:14 PDT 2008

On Thu, 17 Apr 2008, Duncan Sands wrote:
>>> I thought I understood why but it seems that I don't :)
>> IMO, we should avoid using flag_unit_at_a_time here.
> given DannyB's explanation that this flag exists in gcc so that glibc
> works properly in spite of abusing ASM, perhaps this logic in llvm-backend
> also exists to ensure that glibc works?

I think it would be reasonable to turn off some of the more aggressive IPO 
xforms when -fno-unit-at-a-time is set.  That flag basically indicates 
that the code is doing something fishy, and it isn't in wide use, so I 
don't see a big problem with that.

Note that currently we can't support the glibc bug.  The issue is that we 
don't keep track of the relative positions of module-level inline asm and 
functions.  Instead, we aggregate all module-level asm together and emit 
it as a single blob.



More information about the llvm-dev mailing list