Commit Graph

8 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
0edf7ef177 Fix indentation of various DEBUG(...) messages.
Swift SVN r26762
2015-03-31 16:44:38 +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