-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Description
| Bugzilla Link | 277 |
| Resolution | WONTFIX |
| Resolved on | Feb 22, 2010 12:45 |
| Version | 1.0 |
| OS | All |
Extended Description
The C front-end is currently much too aggressive about emitting declarations
that it doesn't need. The most obvious example of this is how it outputs
declarations for all of the silly builtin functions that GCC supports, most of
which are never used.
I believe the reason for this problem is that calling llvm_make_decl_llvm causes
the created LLVM function or global to be added to the current program, which,
in turns, causes it to be emitted by the CFE. This is due to its reliance on
llvm_assemble_external to generate the label.
It looks like llvm_assemble_external should be split into two parts: the part
that creates the global and the part that inserts it into the program. Globals
can then be created, but only lazily inserted into the program as they are used.
This more closely matches what the CFE is doing with its native code expander.
This change will speed up the C/C++ front-end substantially, but it probably
shouldn't happen before 1.2, because it will probably be destabilizing...
-Chris