Commit Graph

268 Commits

Author SHA1 Message Date
Michael Gottesman
24bd1e3974 Remove variable that is written to but never read. Found by the clang static analyzer. 2016-01-08 19:28:43 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Aaron Raimist
b196e79b88 SimplifyCFG: Fix typo, Fist to First 2015-12-28 23:04:24 -06:00
practicalswift
85e2e6eb9a Fix a vs. an 2015-12-26 14:40:16 +01:00
practicalswift
db13bcb22e Fix typos. 2015-12-26 14:11:42 +01:00
practicalswift
22e10737e2 Fix typos 2015-12-26 01:19:40 +01:00
practicalswift
4ff12be924 Fix typos. 2015-12-24 14:26:57 +01:00
practicalswift
81e7439a9a Fix typos. 2015-12-23 11:16:34 +01:00
Michael Gottesman
976d39fa08 Add 3 cases that I missed to make a switch truly exhaustive. 2015-12-21 19:06:25 -06:00
Michael Gottesman
3eca15623b Change 6 non-exhaustive switches on ValueKind to be exhaustive switches on TermKind. NFC.
This exposed the first interesting bug found by using TermKind, in DCE we were
not properly handling switch_enum_addr and checked_cast_addr_br.

SR-335
rdar://23980060
2015-12-21 17:12:06 -06:00
practicalswift
36d7072013 Remove immediately adjacent repeated words ("the the", "for for", "an an", etc.). 2015-12-21 22:16:04 +01:00
Erik Eckstein
b3691c83a6 SimplifyCFG: fix crash if a branch argument is replaced with a SILValue with result number != 0
Fixes https://bugs.swift.org/browse/SR-329
rdar://problem/23969954
2015-12-21 10:08:36 -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
Erik Eckstein
11c8da8f21 SimplifyCFG: add an additional safety check before we try to convert parameters of ABI compatible functions.
This check should not trigger, at least with the current definition of what a convert_function may do.
But still it's a good idea to make the check to be on the safe side.
2015-12-16 14:18:58 -08:00
practicalswift
8ab8847684 Fix typos. 2015-12-16 22:09:32 +01: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
practicalswift
2c98764fdb Fix typo: invertion → inversion 2015-12-14 00:12:00 +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