Commit Graph

2777 Commits

Author SHA1 Message Date
practicalswift
36d7072013 Remove immediately adjacent repeated words ("the the", "for for", "an an", etc.). 2015-12-21 22:16:04 +01:00
Max Moiseev
2f7b64e475 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-21 12:02:13 -08:00
practicalswift
cd7d8dfaff Fix alignment as requested by @gribozavr in #692 2015-12-21 08:54:24 +01:00
practicalswift
176f487d76 Fix incorrect filenames in headers. 2015-12-20 23:59:05 +01:00
Doug Gregor
a97ab6dd14 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-18 10:15:47 -08:00
Dmitri Gribenko
6a66b3cff8 Merge pull request #561 from practicalswift/typos-again
[Typo] Replace PR#514-525 with one large PR
2015-12-18 03:37:02 -08:00
Michael Gottesman
b235064c3f [loop-canonicalization] Change pre-header insertion so that it always occurs.
Previously, if a header had multiple predecessors or if the predecessor was not
a cond_br, we would not insert a pre-header. Now we always insert pre-headers.

This is important in terms of ensuring that ARC Sequence Opts is correct when it
inserts retains before loops.

Reviewed by Andy Trick.

rdar://23853221
SR-102
2015-12-17 19:18:45 -06:00
Xin Tong
aa9b052363 Fix an iterator invalidation bug in SSAupdater
I failed to create a test, but will check in a test in the context of
redundant load elimination, which will use the SSAupdater.
2015-12-17 15:50:20 -08:00
practicalswift
8ab8847684 Fix typos. 2015-12-16 22:09:32 +01:00
Max Moiseev
2021dd5a4d Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-15 12:49:22 -08:00
Michael Gottesman
f3c8c5a774 Create SILBasicBlock::getSuccessorBlocks().
This just runs a transform range on getSuccessor()'s ArrayRef<SILSuccessor> so
one does not need to always call Successor.getBB() when iterating over successor
blocks. Instead the transform range does that call for you.

I also updated some loops to use this new SILBasicBlock method to make sure that
the code is tested out by tests that are already in tree. All these places
should be functionally the same albeit a bit cleaner.
2015-12-15 00:36:56 -06:00
Max Moiseev
806be29941 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-14 12:05:35 -08:00
Roman Levenstein
e6442dc9b2 [sil-devirtualizer] Improve devirtualization of class_method instructions
Use ClassHierarchyAnalysis to check if a given method is effectively final, i.e. cannot be overridden.
This replaces the old approach based on using  isKnownFinal, which was weaker because it didn't use the ClassHierarchyAnalysis.
2015-12-14 10:11:47 -08:00
Roman Levenstein
ed38ce409c [sil-devirtualizer] Add a helper function to compute all subclasses of a given class.
The new function uses the ClassHierarchyAnalysis to do its job.
2015-12-14 10:11:47 -08:00
Roman Levenstein
fd0b383570 [sil-devirtualizer] Handle devirtualization of generic classes 2015-12-14 10:11:47 -08:00
Roman Levenstein
c909ff4cf2 [sil-devirtualizer] Improve getInstanceWithExactDynamicType
It is now able to cover some new cases where the instance is a parameter of a function. If it can be proven that the static type of instance cannot be derived, then it's static type is also a dynamic type of the instance.

The new functionality is not directly triggered in the current setup, because isKnownFinalMethod is currently invoked before it and subsumes this cases. But getInstanceWithExactDynamicType got this functionality anyways to be self-contained, so that it can be used in other contexts, where it is not invoked after isKnownFinalMethod.
2015-12-14 10:11:47 -08:00
Roman Levenstein
e05a72a1cb [sil-devirtualizer] Add a ClassHierarchyAnalysis parameter to tryDevirtualizeApply.
Not functionality changes yet. Subsequent patches will make use of this parameter.
2015-12-14 10:11:47 -08:00
Roman Levenstein
cbcd008ac4 [sil-devirtualizer] Rename isClassWithUnboundGenericParameters and extend it to work with any nominal types 2015-12-14 10:11:46 -08:00
Roman Levenstein
d6bb64a84c [sil-devirtualizer] Only check accessibility if it is available. 2015-12-14 10:11:46 -08:00
Dmitri Gribenko
126a018c4e Merge pull request #509 from practicalswift/fix-typos-13
Fix typos (13 of 30)
2015-12-14 01:06:53 -08:00
Dmitri Gribenko
ac57add3a2 Merge pull request #504 from practicalswift/fix-typos-8
Fix typos (8 of 30)
2015-12-13 20:11:40 -08:00
Michael Gottesman
d94fa0a515 Merge pull request #501 from practicalswift/fix-typos-5
Fix typos (5 of 30)
2015-12-13 18:55:20 -06:00
practicalswift
ab9514f02f Fix typo: existental → existential 2015-12-14 00:11:45 +01:00
practicalswift
e2183135de Fix typo: decement → decrement 2015-12-14 00:11:33 +01:00
practicalswift
2add3c9033 Fix typo: capabable → capable 2015-12-14 00:11:21 +01:00
practicalswift
611763c3ef Fix typo: birdgeable → bridgeable 2015-12-14 00:11:18 +01: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