@@ -91,7 +91,7 @@ static void EmitMemZero(IRBuilder<> &B, Value *Dst, Value *Len,
9191
9292// namespace {
9393
94- Value* FunctionInfo::promote (LLCallBasePtr CB, IRBuilder<> &B, const G2StackAnalysis &A) {
94+ Value* FunctionInfo::promote (CallBase * CB, IRBuilder<> &B, const G2StackAnalysis &A) {
9595 NumGcToStack++;
9696
9797 auto &BB = CB->getCaller ()->getEntryBlock ();
@@ -128,7 +128,7 @@ static bool isKnownLessThan(Value *Val, uint64_t Limit, const G2StackAnalysis &A
128128 return true ;
129129}
130130
131- bool TypeInfoFI::analyze (LLCallBasePtr CB, const G2StackAnalysis &A) {
131+ bool TypeInfoFI::analyze (CallBase * CB, const G2StackAnalysis &A) {
132132 Value *TypeInfo = CB->getArgOperand (TypeInfoArgNr);
133133 Ty = A.getTypeFor (TypeInfo, 0 );
134134 if (!Ty) {
@@ -137,7 +137,7 @@ bool TypeInfoFI::analyze(LLCallBasePtr CB, const G2StackAnalysis &A) {
137137 return A.DL .getTypeAllocSize (Ty) < SizeLimit;
138138}
139139
140- bool ArrayFI::analyze (LLCallBasePtr CB, const G2StackAnalysis &A) {
140+ bool ArrayFI::analyze (CallBase * CB, const G2StackAnalysis &A) {
141141 if (!TypeInfoFI::analyze (CB, A)) {
142142 return false ;
143143 }
@@ -160,7 +160,7 @@ bool ArrayFI::analyze(LLCallBasePtr CB, const G2StackAnalysis &A) {
160160 return true ;
161161}
162162
163- Value* ArrayFI::promote (LLCallBasePtr CB, IRBuilder<> &B, const G2StackAnalysis &A) {
163+ Value* ArrayFI::promote (CallBase * CB, IRBuilder<> &B, const G2StackAnalysis &A) {
164164 // If the allocation is of constant size it's best to put it in the
165165 // entry block, so do so if we're not already there.
166166 // For dynamically-sized allocations it's best to avoid the overhead
@@ -203,7 +203,7 @@ Value* ArrayFI::promote(LLCallBasePtr CB, IRBuilder<> &B, const G2StackAnalysis
203203
204204 return alloca;
205205}
206- bool AllocClassFI::analyze (LLCallBasePtr CB, const G2StackAnalysis &A) {
206+ bool AllocClassFI::analyze (CallBase * CB, const G2StackAnalysis &A) {
207207 if (CB->arg_size () != 1 ) {
208208 return false ;
209209 }
@@ -238,7 +238,7 @@ bool AllocClassFI::analyze(LLCallBasePtr CB, const G2StackAnalysis &A) {
238238 ->getType ();
239239 return A.DL .getTypeAllocSize (Ty) < SizeLimit;
240240}
241- bool UntypedMemoryFI::analyze (LLCallBasePtr CB, const G2StackAnalysis &A) {
241+ bool UntypedMemoryFI::analyze (CallBase * CB, const G2StackAnalysis &A) {
242242 if (CB->arg_size () < SizeArgNr + 1 ) {
243243 return false ;
244244 }
@@ -260,7 +260,7 @@ bool UntypedMemoryFI::analyze(LLCallBasePtr CB, const G2StackAnalysis &A) {
260260 Ty = llvm::Type::getInt8Ty (CB->getContext ());
261261 return true ;
262262}
263- Value* UntypedMemoryFI::promote (LLCallBasePtr CB, IRBuilder<> &B, const G2StackAnalysis &A) {
263+ Value* UntypedMemoryFI::promote (CallBase * CB, IRBuilder<> &B, const G2StackAnalysis &A) {
264264 // If the allocation is of constant size it's best to put it in the
265265 // entry block, so do so if we're not already there.
266266 // For dynamically-sized allocations it's best to avoid the overhead
@@ -341,7 +341,7 @@ GarbageCollect2Stack::GarbageCollect2Stack()
341341 NewArrayT(ReturnType::Array, 0 , 1 , true ), AllocMemory(0 ) {
342342}
343343
344- static void RemoveCall (LLCallBasePtr CB, const G2StackAnalysis &A) {
344+ static void RemoveCall (CallBase * CB, const G2StackAnalysis &A) {
345345 // For an invoke instruction, we insert a branch to the normal target BB
346346 // immediately before it. Ideally, we would find a way to not invalidate
347347 // the dominator tree here.
0 commit comments