Commit Graph

84 Commits

Author SHA1 Message Date
Doug Gregor
b4ca0f1fef Rename llvm::AttrListPtr -> llvm::AttributeSet to sync with LLVM mainline.
Swift SVN r3430
2012-12-10 23:21:19 +00:00
Chris Lattner
f5e4474c76 fix build with mainline llvm.
Swift SVN r3246
2012-11-26 20:44:27 +00:00
Chris Lattner
e475986dbc adapt to mainline llvm API changes.
Swift SVN r3006
2012-10-16 17:54:16 +00:00
Chris Lattner
acde227dc6 Now that CFGNodes.def is straightened out, add a BBArgument class to represent
basic block arguments.  Nothing generates them yet though.


Swift SVN r3000
2012-10-12 22:32:56 +00:00
Chris Lattner
4135441203 update to build with mainline API changes.
Swift SVN r2968
2012-10-10 22:22:06 +00:00
John McCall
ee012c0903 Make IR-gen use canonical types as the basic type currency.
This is kindof a pain in a few places where the type system
doesn't propagate canonicality.  Also, member initializations
are always direct-initializations and so are allowed to use
explicit constructors, which is a hole in our canonicality
tracking.  But overall I like the idea of always working
with canonical types.

Swift SVN r2893
2012-09-21 07:53:08 +00:00
John McCall
24a84132ca More CC-related changes.
Swift SVN r2150
2012-06-05 04:51:04 +00:00
Chris Lattner
4f4636db31 adjust to mainline API change, and implement rdar://11542870 - @swift_release should be marked nocapture
Swift SVN r2031
2012-05-28 01:52:47 +00:00
John McCall
40d1591f89 Some minor tweaks to make our use of the allocation entrypoints
match the actual entrypoints vended by the runtime:
1) there is no swift_slowRawAlloc
2) swift_deallocObject takes two arguments
Also, make all calls to swift_allocObject go through a common
function so that we can easily use optimized entrypoints if the
runtime provides them.

Swift SVN r1993
2012-05-25 17:34:59 +00:00
John McCall
4b562e6b62 Use the actual raw-allocation APIs, including the optimized
allocation entrypoints.

Swift SVN r1976
2012-05-24 19:16:09 +00:00
John McCall
f3c30b7386 'noalias' needs to go on the return value, not on the function
operand.  While I'm at it, test all the side-allocation value witnesses.

Swift SVN r1974
2012-05-24 17:55:03 +00:00
John McCall
d461d72e85 Implement ErasureExpr in IR-gen, at least as far as generating
value witnesses goes.

There are three major remaining things to do to support protocols:
  - laying out the actual protocol members
  - emitting witnesse for the actual protocol members
  - detecting uses of the actual protocol members and funnelling
    them through the witnesses as appropriate
All this work was just to let us treat protocol types as
first-class values.

Swift SVN r1899
2012-05-18 10:02:01 +00:00
John McCall
6b392f8479 Turn initializeWithCopy into a generic operation on TypeInfos
so we can optimize sub-operations properly.

Swift SVN r1894
2012-05-18 10:01:42 +00:00
Eli Friedman
ae08edf5bb Do a bit of naming cleanup in IRGen. Make sure closure IRgen doesn't get confused when we capture something other than a variable.
Swift SVN r1644
2012-04-25 23:47: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
82ca0e7720 Basic infrastructure for cleanup emission and branches. Totally untested!
Swift SVN r1332
2012-04-05 20:36:19 +00:00
Eli Friedman
29f3fca950 First iteration of CaptureAnalysis.
Swift SVN r1284
2012-03-29 00:24:03 +00:00
Eli Friedman
99b75ce728 Further progress on captures in closures.
Swift SVN r1279
2012-03-28 01:32:46 +00:00
John McCall
df7ebcd9e8 Introduce the concept of an 'owned address', i.e. an address with
an owner attached.  Use this to implement [byref(heap)].  Force
locals to the heap if they've been referenced in a way that requires
this.

Swift SVN r1265
2012-03-26 03:26:21 +00:00
Eli Friedman
ea17adc3ec Completely switch over IRGen for closures to use the standard prologue/epilogue emission.
Swift SVN r1250
2012-03-22 01:04:05 +00:00
John McCall
b85ddcb34a IR generation for curried functions. For now, parameters
are stored in a malloc'ed buffer that gets leaked.



Swift SVN r1092
2012-01-19 23:29:49 +00:00
John McCall
9c63d1e7e6 Fix a bug with curried function emission and teach the mangler
to differentiate uncurried and curried function types.



Swift SVN r1059
2012-01-17 08:08:47 +00:00
John McCall
6bb1b947d8 Emit initializers of global variables as global constructors.
This isn't the actor model for globals, but is certainly still a
valid model.



Swift SVN r975
2011-12-22 23:35:41 +00:00
John McCall
9b7fb0c227 New l-value representation.
Swift SVN r956
2011-12-22 05:28:33 +00:00
John McCall
6c559b2ce1 More missing tuple functionality.
Swift SVN r877
2011-11-17 10:12:21 +00:00
Chris Lattner
60afdf4842 switch irgen to new diags
Swift SVN r769
2011-10-20 21:29:50 +00:00
Chris Lattner
a7c7d64fa0 Switch swift to use SourceLoc instead of SMLoc.
Also use the new getAdvancedLoc() method instead of hacking
on SMLoc directly.

Also fix the warning/note/error methods to forward through ASTContext
instead of being replicated everywhere.



Swift SVN r750
2011-10-18 01:22:29 +00:00
John McCall
ca0c671726 IR generation for tuple literals.
Swift SVN r619
2011-08-25 09:50:26 +00:00
John McCall
156c029718 Implement return statements; add some related infrastructure,
including a new file for control flow code.



Swift SVN r617
2011-08-25 09:09:58 +00:00
John McCall
64c72579b4 Flesh out more unimplemented stuff.
Swift SVN r612
2011-08-25 08:30:41 +00:00
John McCall
b2bbab90f4 Build function emission around emitting a FuncExpr instead of a FuncDecl.
Swift SVN r610
2011-08-25 07:55:02 +00:00
John McCall
b60d4807b8 Initial prologue/epilogue emission code. This breaks func.swift because
of the unimplemented load/store methods.



Swift SVN r604
2011-08-25 02:45:18 +00:00
John McCall
3e65b21a68 Provide r-value schemas for various implemented types. Use these to
implement function signature lowering.  Basic setup for IR generation
of functions.  Test that we can properly declare a simple function.



Swift SVN r595
2011-08-24 18:55:54 +00:00
John McCall
97c6ccadfb More IR-generation infrastructure.
Swift SVN r576
2011-08-20 05:55:02 +00:00