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]

[RFC] Creating builtin functions on demand


I am looking at finishing up the PowerPC support for functions compiled with
target specific options, and the PowerPC will have the same problem that the
x86 has, namely in order to support target functions, you need to have all of
the machine specific builtins created, even if the user did not say -m<foo>,
because they might use the appropriate pragma or attribute to compile code for
a different machine.

As far as I could tell with a quick search:
    x86 has  818 machine specific builtins
    ppc has  958 machine specific builtins
    arm has   90 machine specific builtins
    mips has 262 machine specific builtins

Ideally, these should all be created on the first usage.  Not only is the space
wasted for the tree decl itself, but there is the space for representing the
argument list.  We should put some infrastructure into GCC 4.7 that helps
automate this process.

I'm wondering what the various maintainers feel we need in terms of
infrastructure for these create on demand functions?  Should we put the
majority of non-machine dependent builtins into create on demand as well?

Do we want to have the ability to make the enum's for MD builtin functions to
be in the same space as the non-MD builtins.  I have had to track down several
bugs where code was not checking if the builtin class was BUILT_IN_NORMAL
before indexing into the built_in_decl arrays.

Obviously, we need to look at built_in_decl and implicit_built_in_decl uses.  I
would probably make new macros to replace those two arrays (with GET and SET
versions), and poison the old usage.

-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com	fax +1 (978) 399-6899


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