Commit Graph

76 Commits

Author SHA1 Message Date
Johan K. Jensen
fa76656c82 Remove instances of duplicated words 2015-12-03 20:00:29 +01:00
Michael Gottesman
9fb54bf4bf Fix for upstream ilist changes. 2015-11-11 16:07:41 -08:00
Dmitri Hrybenko
2fc1cbe8c1 Adjust to the new IRBuilder APIs
Swift SVN r29692
2015-06-25 22:01:24 +00:00
John McCall
1f80de3d71 Restore the original intent of our IRBuilder to not provide
functions to create load/store instructions without alignment.

Fix a couple of places that were unnecessarily using this.
This includes patching up some very suspicious code for generating
"shadow copies" of explosions for debug info that's not using
the existing TypeInfo-based load/store facilities for some
reason; I left the existing pattern in place for now, but it's
probably bogus.

Swift SVN r29459
2015-06-17 21:34:03 +00:00
Joe Groff
cac5807ae2 SILGen: Emit "main" as a SIL function.
Eliminate the intermediate top_level_code function. Now that SIL is expressive enough to express a "main" function, there's no reason for it, and this eliminates a bunch of mystery code in IRGen to thunk from main to top_level_code by reaching for hardcoded symbol names. Demystify the special code for setting up C_ARGC and C_ARGV by having SILGen look for a transparent "_didEnterMain" hook in the stdlib and emit a call to it.

Swift SVN r22525
2014-10-05 04:13:24 +00:00
John McCall
9ee64a8dd9 Add an Address-aware CreateMemCpy overload to our IRBuilder.
Swift SVN r16875
2014-04-26 07:00:53 +00:00
Chris Lattner
19baff9169 remove some code now that Cleanups are never "used".
Swift SVN r4837
2013-04-21 04:33:00 +00:00
Chris Lattner
1c3dc82449 Now that Joe moved ObjC cleanup emission up to SILGen, start zapping cleanups.
First step is some of the emission deatils.


Swift SVN r4836
2013-04-21 04:18:54 +00:00
Dave Abrahams
1c06a920fb Poke the (argc, argv) parameters to Swift's generated main() into the stdlib's (C_ARGC, C_ARGV) variables
Swift SVN r4637
2013-04-08 20:26:45 +00:00
Chris Lattner
47dbc4051c update for mainline LLVM header file moves.
Swift SVN r3634
2013-01-02 14:38:42 +00:00
John McCall
ce7ddef710 Change value witnesses to take the metatype as 'self'.
The motivations here are that (1) the parametric types
that actually need the 'self' argument don't necessarily
all want to do what tuples do and put the VWT relative
to the metatype at some definable offset and (2)
recovering type parameters from the metatype is much
better defined than also hopping some relationship back.
Plus this allows VWTs to be shared across instances of
generic types.  Also, I'm going to need to add a VW
that takes a metatype, and consistency seems right here.

If keeping two values live is actually punishing, I
might have to reconsider this.  But the VWT is at least
always recoverable from the metatype, so....

I ended up abstracting the thing that GenHeap was doing
in order to save archetypes for arrays, because I
needed it to save metatypes instead of VWTs and because
it really needed abstractin'.

Swift SVN r3096
2012-10-31 08:09:33 +00:00
John McCall
8e735aec52 Bind generic parameter witnesses when emitting a generic
class destructor.

Swift SVN r2672
2012-08-17 07:45:09 +00:00
Ted Kremenek
219b7bd430 Move LLVM.h to libBasic.
Swift SVN r2550
2012-08-03 23:54:29 +00:00
Eli Friedman
c9cb594eb3 IRGen for destructors. (This code is likely to change a lot once we design classes properly, but it should be a decent start.)
Swift SVN r2365
2012-07-17 22:41:23 +00:00
Doug Gregor
6083420a0c IRBuilder.h has moved in top-of-tree LLVM. Update our includes appropriately.
Swift SVN r2283
2012-07-02 21:04:14 +00:00
John McCall
450a722215 Add an IRBuilder::CreateBitCast variant which maps addresses.
Swift SVN r1898
2012-05-18 10:01:57 +00:00
John McCall
5ad3782b01 Rework the IR-generation of initialization and teach the
compiler to enter properly-scoped cleanups to destroy local
variables.

Swift SVN r1385
2012-04-11 03:00:08 +00:00
John McCall
f3e27d90ff Change IR-generation so that it emits metadata objects for the
heap allocations it makes, and switch swift_alloc over to pass
that pointer in as well as the alignment.  Also, compute
whether a type is POD during its generation and cache that in
the object, and introduce a method on TypeInfo to destroy an
object in memory.

Swift SVN r1356
2012-04-10 06:28:22 +00:00
John McCall
44677bc117 Fixes and embellishments, and actually make IR-gen properly
emit release cleanups.  And they work!

Swift SVN r1334
2012-04-05 20:36:20 +00:00
John McCall
82da3ca63b Permit StableIP to be initialized as invalid.
Swift SVN r1333
2012-04-05 20:36:20 +00:00
John McCall
8196f40c4c Add APIs to IRBuilder to capture a stable insertion point (which
stays in the same place in a function even when the current IP is
at the end of a block) and to temporarily shift the insertion point.

Swift SVN r1331
2012-04-05 20:36:18 +00:00
John McCall
4b5fe8fb9b Make Swift's IRBuilder::CreateLoad allow a name to be assigned,
and add a CreateStructGEP for Address.

Swift SVN r1219
2012-03-16 19:02:24 +00:00
John McCall
3b5a5509a7 Revisit the Condition logic, which turns out to be subtly wrong in
an extremely simple test case that happens to come up in swift.swift.



Swift SVN r971
2011-12-22 09:05:29 +00:00
John McCall
9b7fb0c227 New l-value representation.
Swift SVN r956
2011-12-22 05:28:33 +00:00
John McCall
2cd676bf99 IR generation for 'if' statements. Adjust the standard library
to use global functions for the relational operators, just to get
prettier IR.



Swift SVN r679
2011-09-02 19:02:36 +00:00
John McCall
02c0dd6a18 Provide an IRBuilder customization point that, among other things,
consumes our alignment type.



Swift SVN r592
2011-08-24 18:51:51 +00:00