This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Enabling a function based on Language


Thanks Tobias,

I am wanting to call this function right before we hit the gimplify_function_tree (), so I guess I am right before the middle-end.......

-Balaji V. Iyer.

-----Original Message-----
From: Tobias Burnus [mailto:burnus@net-b.de] 
Sent: Tuesday, May 22, 2012 3:25 AM
Cc: Iyer@google.com; Iyer, Balaji V; 'gcc@gcc.gnu.org'
Subject: Re: Enabling a function based on Language

Ian Lance Taylor wrote:
> "Iyer, Balaji V"<balaji.v.iyer@intel.com>  writes:
>
>> 	Is there a #define in GCC that will turn on only for certain languages? I am trying to use build_array_ref but it is giving me a undefined reference for f951. This code that I am trying to use will ONLY execute  if we have a C/C++ code.  Is it possible for me to enclose this inside some #defines (or a combination of them)?
>
> By definition, no, there isn't.  The middle-end is compiled once, into 
> a library.  Then each frontend is linked against that library.
>
> Calling a frontend function like build_array_ref from the middle-end 
> is always a mistake.  In the middle-end you should probably be making 
> a POINTER_PLUS_EXPR node or something along those lines.

Unless, of course, one goes the route which Richard once suggested: 
Adding array and scalarizer support to the middle end, http://gcc.gnu.org/wiki/GCCGathering2011Fortran#Scalarizer

(See all three links; mistakes in the Wiki are mine, made when I tried to summarize/understand Richard's draft patches. The project got stalled as there was not enough developer time on the Fortran side and as the current approach works relatively well. ME support would be beneficial as it would allow for certain optimizations which are not possible in the front end.)

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]