ARC optimizer does a top-down and a bottom-up traversal of the whole function to pair up retain and release instructions and remove them. This can be expensive if the number of instructions in the function and pointer states it tracks are large since it has to look at each pointer state and determine whether the instruction being visited can potentially use the pointer (see the loop in ObjCARCOpt::VisitInstructionBottomUp that calls HandlePotentialUse).
This patch adds a command line option that sets a limit to the number of pointers it tracks.
rdar://problem/49477063