Commit Graph

17 Commits

Author SHA1 Message Date
Manman Ren
dd974edb3e Update mismatching debug message.
Swift SVN r19095
2014-06-23 18:58:49 +00:00
Michael Gottesman
a0027162a6 Fix typo.
Swift SVN r19080
2014-06-22 19:19:44 +00:00
Michael Gottesman
067fee495b [g-arc-opts] Teach the global ARC optimizer to strip off unchecked_ref_bitcast_inst when determining pointer identity.
Swift SVN r19072
2014-06-22 02:43:26 +00:00
Michael Gottesman
2bf652fcb9 [g-arc-opts] Allow removing of increment, decrement pairs after seeing partial merges, ensuring that we still will not move them.
This enables us to handle significantly crazier control flow without
needing to worry about control dependency issues relating to different
groups of insertion points potentially not being control dependent which
can cause incorrect behavior in the optimizer.

Swift SVN r18861
2014-06-13 06:37:40 +00:00
Michael Gottesman
4b8a8efbef [g-arc-opts] Move all global arc optimizations under the same debug flag.
I wish we had the ability to specify a log grouping, so I could log all
of ARC opts or just a specific part of it. Sadly we don't have that now
so I am going to centralize them under the same flag.

Swift SVN r18820
2014-06-12 01:33:18 +00:00
Michael Gottesman
509bbe53be [g-arc-opts] Ignore trap BB during Sequence Dataflow.
These trap BBs are pattern matched very strictly, i.e. only BBs of the
following form are matched:

bbN:
  %_ = builtin_function_ref "int_trap"
  apply %_
  unreachable

Such BBs can be ignored safely for ARC purposes. This allows us to
handle -O3 code in the ARC optimizer significantly more effectively by
enabling us to handle many more types of check failures.

For instance we can now remove retains, releases in the following code:

bb0:
  strong_retain %0
  cond_br _, bb1, bb2

bb1:
  strong_release %0
  ...

bb2:
  %_ = builtin_function_ref "int_trap"
  apply %_
  unreachable

rdar://17212610

Swift SVN r18817
2014-06-12 00:43:11 +00:00
Michael Gottesman
59c89e56ce [g-arc-opts] Change Global ARC Sequence Dataflow to use PreallocatedMap.
This will speed up the optimizer by reducing the amount of allocations
we perform while running the optimizer.

Swift SVN r18762
2014-06-09 23:09:04 +00:00
Michael Gottesman
bf47d48831 [g-arc-opts] Hoist out F.size() and enable BB numbering only if asserts (i.e. logging) is enabled.
<rdar://problem/17181185>

Swift SVN r18725
2014-06-06 03:45:35 +00:00
Michael Gottesman
e9061373f7 [g-arc-opts] Remove old entry point to the sequence dataflow. Now this is run via the evaluator class.
Swift SVN r18723
2014-06-06 03:45:32 +00:00
Michael Gottesman
c2b2e52260 [g-arc-opts] Implement the merge functions to complete Stage 2 of global arc opts.
Also fixed a small bug related to how we handle arguments. We were not
clearing the state of the argument when we saw a potential decrement of
the argument.

<rdar://problem/17013194>

Swift SVN r18706
2014-06-05 04:35:14 +00:00
Michael Gottesman
44734294d6 [g-arc-opts] Add support for printing out LatticeState enum class elts.
Swift SVN r18699
2014-06-04 04:44:40 +00:00
Michael Gottesman
5b3e77e622 [g-arc-opts] Implement the traversal of the RPOT, POT, forgetting all tracked instructions at loop boundaries.
<rdar://problem/17013194>

Swift SVN r18692
2014-06-01 23:03:52 +00:00
Michael Gottesman
25803adbb4 [g-arc-opts] Refactor ARCBBState from GlobalARCSequenceDataflow.cpp -> *.h.
Swift SVN r18690
2014-06-01 22:22:24 +00:00
Michael Gottesman
483ba706be [g-arc-opts] Change ReferenceCountState to work on sets of instructions
instead of just individual instructions.

Swift SVN r18689
2014-06-01 22:22:23 +00:00
Michael Gottesman
ee0d677ce4 [g-arc-opts] Remove isInterestingInstruction. Its not useful or interesting.
Swift SVN r18583
2014-05-23 02:31:49 +00:00
Michael Gottesman
445c474ed0 [g-arc-opts] Wired up the Release->RetainState (TDMap), Retain->ReleaseState (BUMap) dataflow into the pair matcher analysis which matches up sets of retains, releases.
This completes the implementation of the bottom up decrement data flow
data analysis.

<rdar://problem/16965332>

Swift SVN r18580
2014-05-23 01:34:13 +00:00
Michael Gottesman
80f8b1a4ea [g-arc-opts] Extract out the dataflow from GlobalARCPairingAnalysis =>
GlobalARCSequenceDataflow. Add in the code to implement the bottom up
dataflow, but don't wire it up. Pass in the refactored top down dataflow
to the old pairing pass so we still give correct results.

The next step is to change the pairing analysis to use both the bottom
up and top down dataflow passes.

rdar://16965332

Swift SVN r18551
2014-05-22 02:17:28 +00:00