Chris Lattner
5404169327
emit aliases as the definitions fly by, don't bother deferring until
...
the end of the module.
llvm-svn: 67482
2009-03-22 21:47:11 +00:00
Chris Lattner
827a3552a4
make alias definition logic more similar to functions/globals.
...
llvm-svn: 67481
2009-03-22 21:39:12 +00:00
Chris Lattner
a5ae54acc4
fix PR3200 by making alias emission use the new infrastructure. Fold
...
some tests into the alias.c file.
llvm-svn: 67479
2009-03-22 21:21:57 +00:00
Chris Lattner
d480892445
pull "runtime globals" into the same framework as other functions/global variables.
...
No intended functionality change.
llvm-svn: 67478
2009-03-22 21:03:39 +00:00
Chris Lattner
75acb0c356
fix a fixme: non-proto struct returning function definitions should be compiled
...
to something like:
define void @bar(%struct.foo* noalias sret %agg.result) nounwind {
instead of:
define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind {
llvm-svn: 67475
2009-03-22 19:35:37 +00:00
Chris Lattner
4ff71de880
set function/global names with setName instead of passing the name into the
...
ctor function. This avoids creating a temporary std::string for the name,
speeding up the testcase in PR3810 by 3.8%
llvm-svn: 67457
2009-03-22 00:12:30 +00:00
Fariborz Jahanian
629aed9327
Issue error if variables are defined inside an objc class,
...
category or protocol.
llvm-svn: 67450
2009-03-21 18:06:45 +00:00
Chris Lattner
45470943a9
now that all the decl reference and creation stuff is going through two
...
very simple places, reimplement the deferred decl emission logic to not be O(N^2),
fixing PR3810.
llvm-svn: 67447
2009-03-21 09:44:56 +00:00
Chris Lattner
a85d68e5d8
fix a crash that could occur when a variable declaration became a
...
function definition.
llvm-svn: 67446
2009-03-21 09:25:43 +00:00
Chris Lattner
149927c9f8
simplify and cleanup global variable creation stuff to all go through one
...
code path.
llvm-svn: 67445
2009-03-21 09:16:30 +00:00
Chris Lattner
832323ea41
simplify management of llvm::Function creation to all go through
...
GetAddrOfFunction. This is simpler and more efficient.
llvm-svn: 67444
2009-03-21 08:53:37 +00:00
Chris Lattner
5eaee5692c
code cleanups, rename EmitForwardFunctionDefinition ->
...
CreateFunctionPrototypeIR, though my next patch will eliminate
it entirely.
llvm-svn: 67443
2009-03-21 08:38:50 +00:00
Chris Lattner
6574906818
fix several problems with asm renaming, by pulling it into the mangling code:
...
1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo")
2. multiple definitions were conflicting, they weren't getting merged.
3. the code was duplicated in several places.
llvm-svn: 67442
2009-03-21 08:24:40 +00:00
Chris Lattner
64c55933ed
add some fixmes
...
llvm-svn: 67441
2009-03-21 08:13:05 +00:00
Chris Lattner
a9cb6261bf
reduce redundant calls of getMangledName.
...
llvm-svn: 67440
2009-03-21 08:06:59 +00:00
Chris Lattner
3bfce1887f
simplify some more code.
...
llvm-svn: 67439
2009-03-21 08:03:33 +00:00
Chris Lattner
0c5e3132aa
simplify and comment some code better. Make BindRuntimeGlobals
...
more optimistic that it will work (optimizing for the common case).
llvm-svn: 67438
2009-03-21 07:48:31 +00:00
Chris Lattner
3637652ab3
random code cleanups.
...
llvm-svn: 67437
2009-03-21 07:12:05 +00:00
Chris Lattner
6098e62d56
remove obviously dead code: you can't bitcast a pointer to "Ty" (a function type).
...
llvm-svn: 67436
2009-03-21 06:58:21 +00:00
Chris Lattner
9e8120e067
avoid making constant folding logic eliminate obviously dead bitcasts, speeding up PR3810
...
by ~2%.
llvm-svn: 67434
2009-03-21 06:53:34 +00:00
Chris Lattner
725a26b818
Add a fast path to CodeGenModule::getMangledName for almost all C functions,
...
speeding up the testcase in PR3810 by 60%.
llvm-svn: 67431
2009-03-21 06:31:09 +00:00
Daniel Dunbar
4e004ed124
IRgen support for alias of global variable.
...
- PR3818.
llvm-svn: 67297
2009-03-19 08:27:24 +00:00
Fariborz Jahanian
3654e65adf
objc: Implemented variables declared in class interface
...
whose sema decl is at the translation unit.
llvm-svn: 67249
2009-03-18 22:33:24 +00:00
Duncan Sands
1918413137
Adjust for linkage name change.
...
llvm-svn: 66691
2009-03-11 20:15:27 +00:00
Duncan Sands
bdf086f7c0
Correct for change of this name in LLVM.
...
llvm-svn: 66652
2009-03-11 08:40:02 +00:00