Erik Eckstein
68f0d5c202
Reinstate "GenericSpecializer: When specializing a generic function, convert indirect parameters/result to direct parameters/result.""
...
This reinstates commit 4187959e66 .
It was reverted because of a bug in ValueLifetimeAnalysis which is now fixed.
2016-02-29 07:42:59 -08:00
Xin Tong
d0dc008fc1
Revert GenericSpecializer code.
...
This reverts commit
ed8126d050
ac0e7fd183
a11042eb05
b2d6e8ce6e
3a83cee006
0c2ca94ef7
First 4 commits are @practicalswift typo fixes which are implicated. Last 2 are
the culprits.
This causes an asan build crash.
2016-02-28 11:13:44 -08:00
Erik Eckstein
3a83cee006
Reinstate "GenericSpecializer: When specializing a generic function, convert indirect parameters/result to direct parameters/result.""
...
This reinstates commit 4187959e66 .
The exposed crash in the ClosureSpecializer is fixed.
2016-02-26 14:05:48 -08:00
Erik Eckstein
f70b53b015
Revert "Reinstate "GenericSpecializer: When specializing a generic function, convert indirect parameters/result to direct parameters/result."""
...
This reverts commit c556d5cd39 .
Hitting a new assert.
2016-02-25 09:50:11 -08:00
Erik Eckstein
c556d5cd39
Reinstate "GenericSpecializer: When specializing a generic function, convert indirect parameters/result to direct parameters/result.""
...
This reinstates commit 4187959e66 .
After Xin's recent fix in ARC (6a9a430f68 ) the crash on i386 should be resolved.
2016-02-25 08:48:15 -08:00
Erik Eckstein
5b4c73ed3b
Revert "GenericSpecializer: When specializing a generic function, convert indirect parameters/result to direct parameters/result."
...
This reverts commit 4187959e66 .
There is a crash in StdlibUnittests on i386 (Release-Assert build)
2016-02-23 08:29:41 -08:00
Erik Eckstein
4187959e66
GenericSpecializer: When specializing a generic function, convert indirect parameters/result to direct parameters/result.
...
With this re-abstraction a specialized function has the same calling convention as if it would have been written with the specialized types in the first place.
In general this results in less alloc_stacks and load/stores.
It also can eliminate some re-abstraction thunks, e.g. if a generic closure is used in a non-generic context.
It some (hopefully rare) cases it may require to add re-abstraction thunks.
In case a function has multiple indirect results, only the first is converted to a direct result. This is an open TODO.
2016-02-22 13:58:10 -08:00
practicalswift
33312eac6b
[gardening] Remove unreachable/unused/redundant code
...
* Make parameter naming in forward declaration match definition
* Remove unused argument to function persistAsync(…)
* Remove unused enum ShouldHalt
* Remove unused enum class IsProtocol
* Remove unused function dumpTypeSubstitutionMap()
* Remove unused function template getFirstPairElt(…)
* Remove unused method addConstantWordInWords(…)
* Remove unused method asExistentialTI()
* Remove unused method currentTrackedState()
* Remove unused method getNumBodyParameters()
* Remove unused method getSuccIndex()
* Remove unused method getTypeOfDeclReference(…)
* Remove unused method hasStructWithAtMostOneNonTrivialField(…)
* Remove unused method initForDirectValues()
* Remove unused method nextIfNot(…)
* Remove unused method overwriteLoweredValue(…)
* Remove unused method removeColumn(…)
* Remove unused methods HasSingleDecl() and GetFirstDecl()
* Remove unused methods overwriteLoweredExplosion(…) and setLoweredSingleValue(…)
* Remove unused methods requireRetainablePointerValue(…), getMethodSelfInstanceType(…) and isSelfArchetype(…)
* Remove unused methods setAsEmptyDirect(), setAsSingleDirectUnmanagedFragileValue(…), setAsIndirectAddress(…) and getDirectValues()
* Remove unused struct CachedMemberInfo
* Remove unused struct CallEdit
* Remove unused struct ErrorImportInfo
* Remove unused synonym ConformancePair
* Remove unused variable SemaInfo
* Remove unused variable localDeclNameNode
* Remove unused variables kindToken and kindLoc
2016-01-22 09:43:24 +01:00
practicalswift
1339b5403b
Consistent use of header comment format.
...
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Michael Gottesman
389238e801
Add support for multiple @_semantics attributes at the SIL level.
...
This is something that we have wanted for a long time and will enable us to
remove some hacks from the compiler (i.e. how we determine in the ARC optimizer
that we have "fatalError" like function) and also express new things like
"noarc".
2016-01-02 04:17:07 -06:00
Zach Panzarino
e3a4147ac9
Update copyright date
2015-12-31 23:28:40 +00:00
Andrew Trick
739b0e9c56
Reorganize SILOptimizer directories for better discoverability.
...
(libraries now)
It has been generally agreed that we need to do this reorg, and now
seems like the perfect time. Some major pass reorganization is in the
works.
This does not have to be the final word on the matter. The consensus
among those working on the code is that it's much better than what we
had and a better starting point for future bike shedding.
Note that the previous organization was designed to allow separate
analysis and optimization libraries. It turns out this is an
artificial distinction and not an important goal.
2015-12-11 15:14:23 -08:00