The instruction that we want to sink is the last instruction in a block that does not dominate anything. In other words, the only possible user is the terminator.
Swift SVN r13110
In some cases the duplicated code in the predecessors is a strong_release
and sinking it allows Box2Stack to promote it. This accelerates two of
the string benchmarks by 20%.
Swift SVN r13093
SIL instruction. Implement IR-gen support for same. Fix
the parsing of SIL string literals to properly unescape them.
SIL-gen still emits UTF8 literals unconditionally.
Swift SVN r11904
The specific case of interest I ran into was:
sil-extract(struct(string_literal[2]))
which using the old logic would fail since we would be trying to replace all
sil-extract arguments with string_literal arguments. The different result arity
would then hit an assertion.
Swift SVN r11607
I originally threw this in to see if we could get anything good from it. When I
looked in the stdlib it was not having a large effect so I am removing it.
Swift SVN r10854
Maybe this is too conservative, but I feel that changing the semantics of types
might be too much. If people later feel that this is too conservative, feel free
to loosen it.
Swift SVN r10843
This patch contains an initial implementation of CSE for SIL ported from LLVM's
earlycse pass. It follows the overall general structure using
ScopedHashTables/DominatorTrees to perform the computation.
Currently it only handles integer literals to ease with the initial review. Once
this gets in I will be spending some time extending the pass to handle other
instructions.
Even with just handling integers this reduces the size of the stdlib in SIL by
~300 lines.
Swift SVN r10794