Commit Graph

11 Commits

Author SHA1 Message Date
Bob Wilson
37e7d1c627 Merge remote-tracking branch 'origin/master' into master-next 2017-01-08 17:07:46 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Bob Wilson
13da3fa8b1 Merge remote-tracking branch 'origin/master' into master-next 2016-12-04 18:16:09 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Bob Wilson
88d896429b LoopInfo::verify needs the dominator tree (as of llvm r280280)
Since the dominator tree is passed to the LoopInfo constructor, just save
a pointer to it for use in the verify function. If this is not sufficiently
flexible, we could alternatively change to pass the dominator tree as an
argument to the verify function, but let's try the simpler approach first.
2016-10-15 11:02:19 -07:00
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
practicalswift
f91525a10f Consistent placement of "-*- [language] -*-===//" in header. 2016-01-04 09:46:20 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Arnold Schwaighofer
6bac8ab9e6 Add canDuplicate() to LoopInfo
To determine whether it is safe to duplicate the instruction by duplicating the
loop body. Will be used in loop versioning for array and loop unrolling.
2015-12-14 12:03:41 -08:00
Michael Gottesman
baab544d7c [loop-arc] Add in a new analysis called LoopRegion.
This analysis provides the following functionality:

1. An abstraction over all loops and basic blocks called a 'region'. For
a given loop this abstraction is used to represent all immediate child
basic blocks (1) and immediate subloops (2) called child regions.

2. Detection of back edges that were not found by SILLoopInfo. The
heads/tails of such back edges are marked as being areas where unhandled
control flow occurs. This enables irreducible control flow to be handled
by users as appropriate.

3. For each loop in the loop tree an RPO/PO ordering of the loop's
subregions. This enables one to run dataflow on the loop tree using loop
abstractions in a structured, clean manner by processing regions and
depending on whether or not the region was a loop/BB handle it
appropriately.

Some notes:

1. Functions are represented as a top level loop.
2. The analysis is setup to conservatively handle loops with the
following properties:
  a. Irreducible Control Flow.
  b. Multiple Backedges
In these cases, we use the unknown control flow facility to allow for
users of the analysis to handle the behavior appropriately.

We assume 2.b. since I am going to implement canonicalization of
multiple backedge loops into nested loops.

Also two passes are provided for working with this analysis:

1. LoopRegionViewText - Dump loop regions in a textual format. This is
intended for usage with FileCheck tests.

2. LoopRegionViewCFG - Dump loop regions into a CFG pdf. The dumped CFG
includes the loops, functions, and BBs. It represents
successors/predecessors in the loop region by black arrows and
hierarchical relations in between regions/subregions by red dashed
arrows. It also prints out the contents of BBs and whether or not
unknown control flow occurs.

(1) BBs for which this loop is the inner most parent loop.
(2) Loops for which this loop is the inner most parent loop.

Thanks to Arnold review!

rdar://22238531

Swift SVN r32104
2015-09-20 22:41:15 +00:00
Michael Gottesman
24c138f29c Move SILLoopInfo into swiftSIL from swiftSILAnalysis so that we match the separation in between analysis and IR entities.
This follows the model of dominance info and allows me to create reachability
methods on SILBasicBlock without creating dependencies from swiftSIL to
swiftSILAnalysis.

Swift SVN r21866
2014-09-11 03:03:06 +00:00