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