@@ -54,6 +54,10 @@ class ValueLifetimeAnalysis {
5454 // / end the value's lifetime.
5555 using Frontier = SmallVector<SILInstruction *, 4 >;
5656
57+ // / A type erased version of frontier so callers can customize the inline
58+ // / size.
59+ using FrontierImpl = SmallVectorImpl<SILInstruction *>;
60+
5761 // / Constructor for the value \p def with a specific range of users.
5862 // /
5963 // / We templatize over the RangeTy so that we can initialize
@@ -106,7 +110,7 @@ class ValueLifetimeAnalysis {
106110 // /
107111 // / If \p deBlocks is provided, all dead-end blocks are ignored. This
108112 // / prevents unreachable-blocks to be included in the frontier.
109- bool computeFrontier (Frontier &frontier, Mode mode,
113+ bool computeFrontier (FrontierImpl &frontier, Mode mode,
110114 DeadEndBlocks *deBlocks = nullptr );
111115
112116 ArrayRef<std::pair<TermInst *, unsigned >> getCriticalEdges () {
@@ -125,7 +129,7 @@ class ValueLifetimeAnalysis {
125129 }
126130
127131 // / Checks if there is a dealloc_ref inside the value's live range.
128- bool containsDeallocRef (const Frontier &frontier);
132+ bool containsDeallocRef (const FrontierImpl &frontier);
129133
130134 // / For debug dumping.
131135 void dump () const ;
@@ -159,7 +163,7 @@ class ValueLifetimeAnalysis {
159163// / Otherwise \p valueOrStackLoc must be a value type and in this case, inserts
160164// / destroy_value at each instruction of the \p frontier.
161165void endLifetimeAtFrontier (SILValue valueOrStackLoc,
162- const ValueLifetimeAnalysis::Frontier &frontier,
166+ const ValueLifetimeAnalysis::FrontierImpl &frontier,
163167 SILBuilderContext &builderCtxt,
164168 InstModCallbacks callbacks);
165169
0 commit comments