Commit Graph

11 Commits

Author SHA1 Message Date
Michael Gottesman
4c4d1b3fb4 [g-arc-opts] Change all boolean LatticeState queries to use covered switches. NFC.
Swift SVN r27015
2015-04-05 05:20:24 +00:00
Michael Gottesman
9d32a15d39 [g-arc-opts] Teach ARC that alloc_box introduces a +1 ref count on its container.
rdar://20368790

Swift SVN r27013
2015-04-05 04:57:48 +00:00
Michael Gottesman
ac55558ba6 [g-arc-opts] Teach ARC how to recognize insts that *must* (notice not
may) use a value and that we will not remove implying that the use will
keep the value alive.

rdar://20368790

Swift SVN r27010
2015-04-05 04:31:41 +00:00
Michael Gottesman
cc038fcca5 [g-arc-opts] Move any non-trivial non-templated code from RefCountState.h => RefCountState.cpp. NFC.
Swift SVN r27005
2015-04-05 03:24:55 +00:00
Michael Gottesman
1974e3ba96 [g-arc-opts] Teach ARC how to recognize when processing bottom up that even though we have paired a retain, release implies we should propagate known safe bottom up since the use of the retain will not be removed.
<rdar://problem/20368790>

Swift SVN r27001
2015-04-05 02:55:21 +00:00
Michael Gottesman
898f11f48f [g-arc-opts] Teach ARC how to recognize StrongEntrance of RC caused by @owned return values.
<rdar://problem/20368790>

Swift SVN r26999
2015-04-05 02:39:45 +00:00
Michael Gottesman
0ff07e9f29 Add a quick comment. NFC.
Swift SVN r26611
2015-03-26 23:05:34 +00:00
Michael Gottesman
84a444d542 [arc] Move duplicated code that uses ARCStateTransitions from {TopDown,BottomUp}RefCountState into RefCountState. NFC.
Swift SVN r26610
2015-03-26 23:02:44 +00:00
Michael Gottesman
9816e25dd1 [arc] Add RCStateTransition.
An RCStateTransition is (you guessed it) a transition in the state
of an RCIdentity. It abstracts operations such as:

1. The introduction of a new incremented RCID by an argument (and in
the future
an @owned return value).
2. Strong increment of an RC.
3. Strong decrement of an RC.

I will use this to move pin_removal into the ARC optimizer and will
open up the ARC optimizer to being able to match up unowned values in the
future. It additionally allows me to deduplicate code from
{TopDown,BottomUp}RefCountState into RefCountState, RCStateTransition.

Swift SVN r26608
2015-03-26 22:31:39 +00:00
Michael Gottesman
7d8a24a4ee [arc] Rename RefCountState::{get,has,}Value => RefCountState::{get,has,}RCRoot().
This clarifies the purpose of these field, methods.

Swift SVN r26607
2015-03-26 22:31:39 +00:00
Michael Gottesman
876ad89f30 [arc] Move RefCountState's implementation into its own file. NFC.
ALso renamed the header ReferenceCountState.h => RefCountState.h since it
matches the name of the class now.

Swift SVN r26587
2015-03-26 09:17:50 +00:00