Commit Graph

31 Commits

Author SHA1 Message Date
swift-ci
135a4286b5 Merge remote-tracking branch 'origin/master' into master-next 2017-09-25 10:29:30 -07:00
John McCall
ab3f77baf2 Make SILInstruction no longer a subclass of ValueBase and
introduce a common superclass, SILNode.

This is in preparation for allowing instructions to have multiple
results.  It is also a somewhat more elegant representation for
instructions that have zero results.  Instructions that are known
to have exactly one result inherit from a class, SingleValueInstruction,
that subclasses both ValueBase and SILInstruction.  Some care must be
taken when working with SILNode pointers and testing for equality;
please see the comment on SILNode for more information.

A number of SIL passes needed to be updated in order to handle this
new distinction between SIL values and SIL instructions.

Note that the SIL parser is now stricter about not trying to assign
a result value from an instruction (like 'return' or 'strong_retain')
that does not produce any.
2017-09-25 02:06:26 -04:00
Bob Wilson
0276b0f89d Merge remote-tracking branch 'origin/master' into master-next 2017-09-23 10:09:35 -07:00
Bob Wilson
acf22554f3 Declare DomTreeBuilder template instantiations in Dominance.h
This is a follow-up to https://github.com/apple/swift/pull/11075.
2017-09-07 16:08:48 -07:00
Bob Wilson
b06935eb3d [master-next] Reapply "Adapt to upstream dominator tree changes"
This reverts commit 9ea6be645d.
2017-08-03 17:11:24 -07:00
Bob Wilson
9ea6be645d Revert "Adapt to upstream dominator tree changes"
This reverts commit ff8f5fceb7.

That commit was applied to master-next for changes in swift-llvm's
upstream-with-swift branch that are not included in the swift-4.1-branch.
2017-08-03 14:12:37 -07:00
Arnold Schwaighofer
ff8f5fceb7 Adapt to upstream dominator tree changes 2017-07-31 11:19:09 -07:00
Bob Wilson
62c84a5461 [master-next] Update to work with recent dominator tree changes.
This patch started with a suggestion from Adrian Prantl to adapt to
LLVM r307953. The code has changed more since then so I modified it
to get it to build and I also fixed up StackPromotion to deal with related
changes. (I did not search back very far but it looks like the StackPromotion
change may have been a latent bug that did not matter much until recent
changes started using the function parameter.)
2017-07-19 22:52:21 -07:00
John McCall
4d3e44f98d Update SIL's dominance analysis for the template changes in LLVM.
StackPromotion is still busted.
2017-07-18 17:03:28 -04:00
Bob Wilson
b9f6e6b371 Remove llvm::DominatorBase templates to match LLVM r306713.
The content from DominatorBase has been merged into DominatorTreeBase,
and DominatorBase has been removed.
2017-07-05 11:56:00 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01: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
Erik Eckstein
26038055c2 StackPromotion: don’t move an alloc_ref above it’s operands.
fixes a SILVerifier crash: rdar://problem/29276015
2016-11-15 16:50:36 -08:00
Michael Gottesman
e25cd8860c Remove all uses of ilist_node::getNextNode() and ilist_node::getPrevNode() in favor of just using iterators.
This change is needed for the next update to ToT LLVM. It can be put
into place now without breaking anything so I am committing it now.

The churn upstream on ilist_node is neccessary to remove undefined
behavior. Rather than updating the different ilist_node patches for the
hacky change required to not use iterators, just use iterators and keep
everything as ilist_nodes. Upstream they want to eventually do this, so
it makes sense for us to just do it now.

Please do not introduce new invocations of
ilist_node::get{Next,Prev}Node() into the tree.
2016-01-19 14:44:58 -06:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
ken0nek
fcd8fcee91 Convert [Cc]an not -> [Cc]annot 2015-12-23 00:55:48 +09:00
practicalswift
baf583a5d0 Fix typo: immmediate → immediate 2015-12-14 00:11:52 +01:00
Leo Shimonaka
70e66973ee Fix spelling error in documentation / comments / method name 2015-12-05 00:28:08 -05:00
Michael Gottesman
9fb54bf4bf Fix for upstream ilist changes. 2015-11-11 16:07:41 -08:00
Michael Gottesman
eb6857aa88 Revert "Revert r29594 "Implement verification of dominance analysis.""
This reverts commit r29600.

Swift SVN r29602
2015-06-24 05:45:29 +00:00
Greg Parker
7088b2fe1b Revert r29594 "Implement verification of dominance analysis."
This broke some builders.


Swift SVN r29600
2015-06-24 05:05:46 +00:00
Michael Gottesman
0cc8706c1a Implement verification of dominance analysis.
Swift SVN r29594
2015-06-24 01:57:37 +00:00
Mark Lacey
71afc9e92d Fix typo.
Swift SVN r27315
2015-04-15 07:53:54 +00:00
Michael Gottesman
a12880aa8c [dominance] Implement PostDominanceInfo::properlyDominates(SILInstruction *, SILInstruction *)
I am going to use this for dead store elimination in multi-bb load store optimization.

rdar://17680758

Swift SVN r20002
2014-07-16 04:26:00 +00:00
Arnold Schwaighofer
4a5ba0ff87 DominanceInfo: Add a verification function
Swift SVN r19629
2014-07-07 21:05:20 +00:00
Chris Lattner
94d4de408b adjust to llvm mainline changes.
Swift SVN r12226
2014-01-13 15:13:08 +00:00
Nadav Rotem
f5a7d0ca55 Make sure we are not calculating dominance for an empty function.
Swift SVN r11273
2013-12-13 22:06:21 +00:00
Stephen Lin
99737edf19 Fix segfault crash bug in Verifier check and correct error message
Swift SVN r9162
2013-10-10 18:59:23 +00:00
Chris Lattner
a9e92a2b61 Expose basic post-dominance information.
Swift SVN r6421
2013-07-21 04:29:29 +00:00
John McCall
dd4f26c6dc It does seem to make non-generic assumptions about the node
type, though;  I had to define a WriteAsOperand function and
add a front() method to SILFunction to get this to work.
Rip out my dominators implementation and replace it with
LLVM's.  I'd forgotten that LLVM's was actually generic.

Swift SVN r4717
2013-04-12 21:24:27 +00:00
John McCall
3274de9c21 Add a simple dominance analysis based on Cooper, Harvey, and
Kennedy (2001).

This hasn't been tested yet.

Swift SVN r4712
2013-04-12 08:15:09 +00:00