inlined maxval

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Oct 28 13:59:00 GMT 2009


On Wed, Oct 28, 2009 at 12:40:28PM -0000, Paul Keir wrote:
> Thanks, I see how it works now; I just tried -fdump-tree-original as you
> suggested.
> 
> I'm calling the fortran functions from C++. I take it there's
> no way I can obtain the generated inline expansion for those simpler
> versions
> of maxval from there. I guess not, but as I use g++, I can imagine an
> compiler
> intrinsic could trigger g++ to invoke gfortran's inliner somehow?
> 

You're joking, right?

Briefly, gfortran's front-end (FE) parses source code into
its own black-red tree structures.  These b-r trees are then
converted into the tree-ssa form used by GCC's middle-end.
The inlining you seek to exploit is done during the FE's
b-r tree to tree-ssa conversion.  So, you would have to
convince g++'s FE to either directly produce gfortran's
b-r trees or convert g++'s tree-ssa trees into gfortran's
b-r trees so it can then convert back to tree-ssa form.
I doubt that the g++ developers would be thrilled with
such a hack.

-- 
Steve



More information about the Fortran mailing list