comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: Announcement: GNAT ported to LLVM
Date: Thu, 27 Mar 2008 13:43:42 +0100
Date: 2008-03-27T13:43:42+01:00	[thread overview]
Message-ID: <651j49F2eaafuU1@mid.individual.net> (raw)
In-Reply-To: e56b77a8-eb38-432f-abbe-895100206bed@s50g2000hsb.googlegroups.com

baldrick wrote:

> Hi Gene,
> 
>> I assume that due to the link-time optimization capability that
>> inlining among packages will be handled naturally.
> 
> that's correct: you can compile each package to bitcode, then at
> link-time they will all be mutually optimized, including inlining
> into each other.  You can also compile the entire runtime to bitcode
> and have that be mutually optimized with your code too.  I didn't
> turn this on by default because currently link-time-optimization is
> not transparent: you have to explicitly call some LLVM tools at link
> time.  There's a plan to teach llvm-gcc to do this automagically when
> you use it to do linking.
> 
>> GNAT-gcc can't do that, right?
> 
> It can to some extent: if you use -O2 -gnatn then it will peek inside
> the bodies of packages you are using to try to inline functions.  That
> functionality becomes a lot less useful now though.
> 
>> This alone ought to be a big deal as accessor/setter
>> conventions are leading to programs filled with tiny procedures and
>> functions.
> 
> Very true, and I guess that's why ACT implemented -gnatn.

I thought that -gnatN was even more aggressive than -gnatn. That said, in my
experience, while -gnatn rarely causes bugs to arise, -gnatN causes lots of
spurious errors to be reported, forcing to turn it off for many files. Worse
still, failure may be triggered by some spec, but is the file with-ing it that
must be disabled...

In practice I've settled into -O3 -gnatn for optimized builds.



  reply	other threads:[~2008-03-27 12:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-23 22:05 Announcement: GNAT ported to LLVM baldrick
2008-03-24  9:25 ` Samuel Tardieu
2008-03-24 18:09   ` baldrick
2008-03-27  0:41     ` Gene
2008-03-27  8:27       ` baldrick
2008-03-27 12:43         ` Alex R. Mosteo [this message]
2008-03-27 15:22           ` baldrick
2008-03-27 17:25             ` Alex R. Mosteo
2008-04-11 13:37 ` baldrick
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox