These bits are orthogonal to each other, so combine them into one, and diagnose attempts to produce a type that's both. Spot-fix a bunch of places this revealed by inspection that we would have crashed in SILGen or IRGen if blocks were be handled.
Swift SVN r16088
retain_value instructions, just like we do for strong_retain/release.
This wraps up rdar://15889208, which is admittedly more of a moral
victory than a practical one.
Swift SVN r15804
The 'metatype' instruction can produce either a thick or Objective-C
metatype value for a class. Sometimes SILGen picks the "wrong" one,
and ends up converting the value directly, which is sub-optimal. Clean
this up in SILBuilder.
I didn't add a corresponding SILCombine optimization, nor did I add
this for class_metatype, because it seems unlikely that those will
occur in practice.
Swift SVN r14183
There are some straggling references to the context generic param list, but nothing uses the non-interface param or result types anymore!
Swift SVN r13725
Lower types for SILDeclRefs from the interface types of their referents, dragging the old type along for the ride so we can still offer the context to clients that haven't been weaned off of it. Make SILFunctionType's interface types and generic signature independent arguments of its Derive the context types of SILFunctionType from the interface types, instead of the other way around. Do a bunch of annoying inseparable work in the AST and IRGen to accommodate the switchover.
Swift SVN r12536
In nongeneric contexts, or contexts where we only care about the indirectness of parameters or have already substituted the generic parameters for a function, the interface types are interchangeable, so just switch over.
Swift SVN r12044
cannot decrement a retain count when they are initializations or of trivial
types. This allows us to zap some retain/releases being emitted by silgen,
particularly when accessing self ivars.
Swift SVN r11019
tag things known from SILGen to be initializers (e.g., copyaddrs with
the bit set) and when we analyze the DI properties for an assign, we
can move it to this classification. This allows stuff that wants to
reason about the difference (e.g. the conditional destroy logic) to
do so precisely.
Swift SVN r10658
- Enhance SILBuilder::emitStrongRelease to be smarter.
- Start using emitStrongRelease in type lowering, SILGen,
CapturePromotion (replacing its implementation of the
same logic), and MandatoryInlining (one more place)
- Rename the primitive createStrongRetain/ReleaseInst
instructions to lose their suffix.
- Now that createStrongRetain/ReleaseInst are not special
cases from the naming perspective, remove some special cases
from DeserializeSIL and ParseSIL.
Swift SVN r10449
scanning up the local block to see if it immediately cancels a retain
operation.
Use this in mandatory inlining to zap more retains and release. Before
this patch, the result LogicValue allocation blocked this optimization,
preventing the partial_apply from being deleted from the case in
rdar://15328833.
Swift SVN r10447
preceding copy_addr instruction when totally trivial. Adopt this in SILGen, eliminating
a couple dozen destroy_addr instructions from the stdlib and producing more canonical SIL.
Swift SVN r8968
Also, change the location of "looping back to head" branch to point to the closing brace of the body, which is a more natural source location than the beginning of the enclosing loop statement.
Swift SVN r7989
inserting a diamond into the middle of an existing block. This fixes a
problem that manifests in memory promotion when lowering an assign.
Swift SVN r7917
Add a convenience SILModule::getTypeLoweringInfo forwarder, and move the emitRetainRValue and emitReleaseRValue helpers from SILGenFunction to SILBuilder so they're more readily available to non-SILGen passes. Add an emitDestroyAddress helper that emits nothing, destroy_addr, or load + release based on the value semantics of the referenced type.
Swift SVN r6431