Evidently this has been silently not testing anything for a while. Luckily, the
functionality seems not to be broken, just the test. Also IRGen is emitting the
correct function name as well.
Swift uses rt_swift_* functions to call the Swift runtime without using dyld's stubs. These functions are renamed to swift_rt_* to reduce namespace pollution.
rdar://28706212
This prevents the linker from trying to emit relative relocations to locally-defined public symbols into dynamic libraries, which gives ld.so heartache.
Now that one can not use analysis groups anymore on LLVM, we were given two
choices. Reinsert that dynamicism so we could via opt -load add in analyses /or/
just create our own version of opt. I decided to go with the later since it
enables us to simulate how IRGen sets up the LLVM pass pipeline exactly,
something we were unable to do before.
This also sets us up for whenever we need to respond to the new pass manager.
Swift SVN r32808
This reverts commit r32132. It broke tests:
Swift :: 1_stdlib/FloatingPoint.swift.gyb
Swift :: 1_stdlib/NSStringAPI.swift
Swift :: 1_stdlib/Runtime.swift
Swift :: Interpreter/SDK/CoreGraphics_CGFloat.swift
Swift SVN r32142
some of the ARC entry points. rdar://22724641. After this commit,
swift_retain_noresult will be completely replaced by swift_retain.
LLVMARCOpts pass is modified NOT to rewrite swift_retain to
swift_retain_noresult which forward no reference.
Swift SVN r32082
After this commit, swift_retain will return no reference and LLVMARCContract pass is modified NOT to rewrite
swift_retain_noresult to old swift_retain which forwarded the reference.
Swift SVN r32075
I asked that the patches were split up so I could do post commit review.
This reverts commit r32059.
This reverts commit r32058.
This reverts commit r32056.
This reverts commit r32055.
Swift SVN r32060
to remove reference forwarding for some of the ARC entry points. rdar://22724641. After this
commit, swift_retain_noresult will be completely replaced by swift_retain and LLVMARCOpts.cpp
will no longer canonicalize swift_retain to swift_retain_noresult as now swift_retain returns no
reference.
Swift SVN r32058
to remove reference forwarding for some of the ARC entry points. rdar://22724641. After this
commit, swift_retain will be the same as swift_retain_noresult, returning no reference.
LLVMARCContract pass is also modified NOT to rewrite swift_retain_noresult to the
old swift_retain which forwards the reference.
Swift SVN r32055
If we have an unknown call, we need to create any retainN calls we
have seen. The reason why is that we do not want to move retains,
releases over isUniquelyReferenced calls. Specifically imagine this:
retain(x); unknown(x); release(x); isUniquelyReferenced(x); retain(x);
In this case we would with this optimization merge the last retain
with the first. This would then create an additional copy. The
release side of this is:
retain(x); unknown(x); release(x); isUniquelyReferenced(x); release(x);
Again in such a case by merging the first release with the second
release, we would be introducing an additional copy.
Thus if we see an unknown call we merge together all retains and
releases before to get some optimization without any loss of
correctness. This could be made more aggressive through appropriate
alias analysis and usage of LLVM's function attributes to determine that
a function does not touch globals.
Swift SVN r30394
We are taking advantage of the fact that we can always safely move a retain
earlier in the program and a release later in the program. Given this
information, in every BB, we merge together all retains into the first retain
(creating a retain_n) and all releases into the last release in that BB
(creating a release_n).
rdar://21803771
Swift SVN r30261
This pass does things similar to LLVMARCContract so it makes sense to use the
same naming schema.
Also I am going to be implementing some contracting optimziations here later
today.
Swift SVN r30203