mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "swift/SIL/SILValue.h"
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SetVector.h"
|
||||
|
||||
namespace swift {
|
||||
|
||||
@@ -39,10 +40,10 @@ bool canUseValue(SILInstruction *User, SILValue Ptr, AliasAnalysis *AA);
|
||||
/// insertion pts, and decrement insertion pts.
|
||||
struct ARCMatchingSet {
|
||||
SILValue Ptr;
|
||||
llvm::SmallPtrSet<SILInstruction *, 8> Increments;
|
||||
llvm::SmallPtrSet<SILInstruction *, 8> IncrementInsertPts;
|
||||
llvm::SmallPtrSet<SILInstruction *, 8> Decrements;
|
||||
llvm::SmallPtrSet<SILInstruction *, 8> DecrementInsertPts;
|
||||
llvm::SetVector<SILInstruction *> Increments;
|
||||
llvm::SetVector<SILInstruction *> IncrementInsertPts;
|
||||
llvm::SetVector<SILInstruction *> Decrements;
|
||||
llvm::SetVector<SILInstruction *> DecrementInsertPts;
|
||||
|
||||
void clear() {
|
||||
Ptr = SILValue();
|
||||
|
||||
Reference in New Issue
Block a user