[cfe-dev] limiting inlining
rdivacky at freebsd.org
Fri Sep 25 04:43:20 PDT 2009
On Fri, Sep 25, 2009 at 03:43:37AM -0700, Eli Friedman wrote:
> On Fri, Sep 25, 2009 at 12:52 AM, Roman Divacky <rdivacky at freebsd.org> wrote:
> > On Thu, Sep 24, 2009 at 02:31:10PM -0700, Mike Stump wrote:
> >> On Sep 24, 2009, at 2:10 PM, Roman Divacky wrote:
> >> >we need that for our bootloader... it needs to fit into a given size.
> >> Would -Os be better?
> > this is what we have currently:
> > clang -Os ?-fno-guess-branch-probability ?-fomit-frame-pointer ?-mno-align-long-strings ?-mrtd ?-mno-mmx
> > -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 ?-DUFS1_AND_UFS2 ?-DFLAGS=0x80 ?-DSIOPRT=0x3f8 ?-DSIOFMT=0x3
> > -DSIOSPD=9600 ?-I/usr/src/sys/boot/i386/boot2/../../common ?-I/usr/src/sys/boot/i386/boot2/../btx/lib -I. ?-Wall
> > -Waggregate-return -Wbad-function-cast -Wcast-align ?-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
> > -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings ?-Winline --param max-inline-insns-single=100 -mllvm
> > -inline-threshold=1000 -ffreestanding -mllvm -inline-threshold=1000 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
> > -mno-sse3 -m32 -march=i386 ?-S -o boot2.s.tmp /usr/src/sys/boot/i386/boot2/boot2.c
> > ie. -Os is already there. I wonder why ?the -inline-threshold has no effect.
> -inline-threshold=1000 is way more aggressive than even -O3 in LLVM.
> Try something more like -inline-threshold=0.
I tried many values... including 0, it had no effect at all
More information about the cfe-dev