Skip to content

Commit 59948c0

Browse files
authored
Amd/dev/rlieberm/fix ocl generic addr space (llvm#927)
2 parents 07ba9a2 + 56b6bb6 commit 59948c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+833
-203
lines changed

clang/include/clang/CodeGen/CGFunctionInfo.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,16 @@ class ABIArgInfo {
206206
static ABIArgInfo getIgnore() {
207207
return ABIArgInfo(Ignore);
208208
}
209-
static ABIArgInfo getIndirect(CharUnits Alignment, bool ByVal = true,
210-
bool Realign = false,
209+
static ABIArgInfo getIndirect(CharUnits Alignment, unsigned AddrSpace,
210+
bool ByVal = true, bool Realign = false,
211211
llvm::Type *Padding = nullptr) {
212212
auto AI = ABIArgInfo(Indirect);
213213
AI.setIndirectAlign(Alignment);
214214
AI.setIndirectByVal(ByVal);
215215
AI.setIndirectRealign(Realign);
216216
AI.setSRetAfterThis(false);
217217
AI.setPaddingType(Padding);
218+
AI.setIndirectAddrSpace(AddrSpace);
218219
return AI;
219220
}
220221

@@ -232,7 +233,7 @@ class ABIArgInfo {
232233

233234
static ABIArgInfo getIndirectInReg(CharUnits Alignment, bool ByVal = true,
234235
bool Realign = false) {
235-
auto AI = getIndirect(Alignment, ByVal, Realign);
236+
auto AI = getIndirect(Alignment, 0, ByVal, Realign);
236237
AI.setInReg(true);
237238
return AI;
238239
}
@@ -422,12 +423,12 @@ class ABIArgInfo {
422423
}
423424

424425
unsigned getIndirectAddrSpace() const {
425-
assert(isIndirectAliased() && "Invalid kind!");
426+
assert((isIndirect() || isIndirectAliased()) && "Invalid kind!");
426427
return IndirectAttr.AddrSpace;
427428
}
428429

429430
void setIndirectAddrSpace(unsigned AddrSpace) {
430-
assert(isIndirectAliased() && "Invalid kind!");
431+
assert((isIndirect() || isIndirectAliased()) && "Invalid kind!");
431432
IndirectAttr.AddrSpace = AddrSpace;
432433
}
433434

clang/lib/Basic/Targets/AMDGPU.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ AMDGPUTargetInfo::AMDGPUTargetInfo(const llvm::Triple &Triple,
269269
void AMDGPUTargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts) {
270270
TargetInfo::adjust(Diags, Opts);
271271
// ToDo: There are still a few places using default address space as private
272-
// address space in OpenCL, which needs to be cleaned up, then Opts.OpenCL
273-
// can be removed from the following line.
274-
setAddressSpaceMap(/*DefaultIsPrivate=*/Opts.OpenCL ||
272+
// address space in OpenCL, which needs to be cleaned up, then the references
273+
// to OpenCL can be removed from the following line.
274+
setAddressSpaceMap((Opts.OpenCL && !Opts.OpenCLGenericAddressSpace) ||
275275
!isAMDGCN(getTriple()));
276276
}
277277

clang/lib/CodeGen/ABIInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ bool ABIInfo::isPromotableIntegerTypeForABI(QualType Ty) const {
171171
return false;
172172
}
173173

174-
ABIArgInfo ABIInfo::getNaturalAlignIndirect(QualType Ty, bool ByVal,
175-
bool Realign,
174+
ABIArgInfo ABIInfo::getNaturalAlignIndirect(QualType Ty, unsigned AddrSpace,
175+
bool ByVal, bool Realign,
176176
llvm::Type *Padding) const {
177-
return ABIArgInfo::getIndirect(getContext().getTypeAlignInChars(Ty), ByVal,
178-
Realign, Padding);
177+
return ABIArgInfo::getIndirect(getContext().getTypeAlignInChars(Ty),
178+
AddrSpace, ByVal, Realign, Padding);
179179
}
180180

181181
ABIArgInfo ABIInfo::getNaturalAlignIndirectInReg(QualType Ty,

clang/lib/CodeGen/ABIInfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ class ABIInfo {
110110
/// A convenience method to return an indirect ABIArgInfo with an
111111
/// expected alignment equal to the ABI alignment of the given type.
112112
CodeGen::ABIArgInfo
113-
getNaturalAlignIndirect(QualType Ty, bool ByVal = true, bool Realign = false,
113+
getNaturalAlignIndirect(QualType Ty, unsigned AddrSpace, bool ByVal = true,
114+
bool Realign = false,
114115
llvm::Type *Padding = nullptr) const;
115116

116117
CodeGen::ABIArgInfo getNaturalAlignIndirectInReg(QualType Ty,

clang/lib/CodeGen/ABIInfoImpl.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ ABIArgInfo DefaultABIInfo::classifyArgumentType(QualType Ty) const {
2121
// Records with non-trivial destructors/copy-constructors should not be
2222
// passed by value.
2323
if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI()))
24-
return getNaturalAlignIndirect(Ty, RAA == CGCXXABI::RAA_DirectInMemory);
24+
return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
25+
RAA == CGCXXABI::RAA_DirectInMemory);
2526

26-
return getNaturalAlignIndirect(Ty);
27+
return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace());
2728
}
2829

2930
// Treat an enum type as its underlying type.
@@ -36,7 +37,7 @@ ABIArgInfo DefaultABIInfo::classifyArgumentType(QualType Ty) const {
3637
Context.getTypeSize(Context.getTargetInfo().hasInt128Type()
3738
? Context.Int128Ty
3839
: Context.LongLongTy))
39-
return getNaturalAlignIndirect(Ty);
40+
return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace());
4041

4142
return (isPromotableIntegerTypeForABI(Ty)
4243
? ABIArgInfo::getExtend(Ty, CGT.ConvertType(Ty))
@@ -48,7 +49,7 @@ ABIArgInfo DefaultABIInfo::classifyReturnType(QualType RetTy) const {
4849
return ABIArgInfo::getIgnore();
4950

5051
if (isAggregateTypeForABI(RetTy))
51-
return getNaturalAlignIndirect(RetTy);
52+
return getNaturalAlignIndirect(RetTy, getDataLayout().getAllocaAddrSpace());
5253

5354
// Treat an enum type as its underlying type.
5455
if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
@@ -59,7 +60,8 @@ ABIArgInfo DefaultABIInfo::classifyReturnType(QualType RetTy) const {
5960
getContext().getTypeSize(getContext().getTargetInfo().hasInt128Type()
6061
? getContext().Int128Ty
6162
: getContext().LongLongTy))
62-
return getNaturalAlignIndirect(RetTy);
63+
return getNaturalAlignIndirect(RetTy,
64+
getDataLayout().getAllocaAddrSpace());
6365

6466
return (isPromotableIntegerTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
6567
: ABIArgInfo::getDirect());
@@ -126,7 +128,8 @@ bool CodeGen::classifyReturnType(const CGCXXABI &CXXABI, CGFunctionInfo &FI,
126128
if (const auto *RT = Ty->getAs<RecordType>())
127129
if (!isa<CXXRecordDecl>(RT->getDecl()) &&
128130
!RT->getDecl()->canPassInRegisters()) {
129-
FI.getReturnInfo() = Info.getNaturalAlignIndirect(Ty);
131+
FI.getReturnInfo() = Info.getNaturalAlignIndirect(
132+
Ty, Info.getDataLayout().getAllocaAddrSpace());
130133
return true;
131134
}
132135

clang/lib/CodeGen/CGBlocks.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,8 @@ void CodeGenFunction::setBlockContextParameter(const ImplicitParamDecl *D,
13751375
DI->setLocation(D->getLocation());
13761376
DI->EmitDeclareOfBlockLiteralArgVariable(
13771377
*BlockInfo, D->getName(), argNum,
1378-
cast<llvm::AllocaInst>(alloc.getPointer()), Builder);
1378+
cast<llvm::AllocaInst>(alloc.getPointer()->stripPointerCasts()),
1379+
Builder);
13791380
}
13801381
}
13811382

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6240,8 +6240,13 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
62406240
/*IndexTypeQuals=*/0);
62416241
auto Tmp = CreateMemTemp(SizeArrayTy, "block_sizes");
62426242
llvm::Value *TmpPtr = Tmp.getPointer();
6243+
// The EmitLifetime* pair expect a naked Alloca as their last argument,
6244+
// however for cases where the default AS is not the Alloca AS, Tmp is
6245+
// actually the Alloca ascasted to the default AS, hence the
6246+
// stripPointerCasts()
6247+
llvm::Value *Alloca = TmpPtr->stripPointerCasts();
62436248
llvm::Value *TmpSize = EmitLifetimeStart(
6244-
CGM.getDataLayout().getTypeAllocSize(Tmp.getElementType()), TmpPtr);
6249+
CGM.getDataLayout().getTypeAllocSize(Tmp.getElementType()), Alloca);
62456250
llvm::Value *ElemPtr;
62466251
// Each of the following arguments specifies the size of the corresponding
62476252
// argument passed to the enqueued block.
@@ -6257,7 +6262,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
62576262
Builder.CreateAlignedStore(
62586263
V, GEP, CGM.getDataLayout().getPrefTypeAlign(SizeTy));
62596264
}
6260-
return std::tie(ElemPtr, TmpSize, TmpPtr);
6265+
// Return the Alloca itself rather than a potential ascast as this is only
6266+
// used by the paired EmitLifetimeEnd.
6267+
return std::tie(ElemPtr, TmpSize, Alloca);
62616268
};
62626269

62636270
// Could have events and/or varargs.

clang/lib/CodeGen/CGCall.cpp

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,10 +1672,8 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI) {
16721672

16731673
// Add type for sret argument.
16741674
if (IRFunctionArgs.hasSRetArg()) {
1675-
QualType Ret = FI.getReturnType();
1676-
unsigned AddressSpace = CGM.getTypes().getTargetAddressSpace(Ret);
1677-
ArgTypes[IRFunctionArgs.getSRetArgNo()] =
1678-
llvm::PointerType::get(getLLVMContext(), AddressSpace);
1675+
ArgTypes[IRFunctionArgs.getSRetArgNo()] = llvm::PointerType::get(
1676+
getLLVMContext(), FI.getReturnInfo().getIndirectAddrSpace());
16791677
}
16801678

16811679
// Add type for inalloca argument.
@@ -5159,7 +5157,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
51595157
// If the call returns a temporary with struct return, create a temporary
51605158
// alloca to hold the result, unless one is given to us.
51615159
Address SRetPtr = Address::invalid();
5162-
RawAddress SRetAlloca = RawAddress::invalid();
51635160
llvm::Value *UnusedReturnSizePtr = nullptr;
51645161
if (RetAI.isIndirect() || RetAI.isInAlloca() || RetAI.isCoerceAndExpand()) {
51655162
// For virtual function pointer thunks and musttail calls, we must always
@@ -5173,14 +5170,29 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
51735170
} else if (!ReturnValue.isNull()) {
51745171
SRetPtr = ReturnValue.getAddress();
51755172
} else {
5176-
SRetPtr = CreateMemTemp(RetTy, "tmp", &SRetAlloca);
5173+
SRetPtr = CreateMemTempWithoutCast(RetTy, "tmp");
51775174
if (HaveInsertPoint() && ReturnValue.isUnused()) {
51785175
llvm::TypeSize size =
51795176
CGM.getDataLayout().getTypeAllocSize(ConvertTypeForMem(RetTy));
5180-
UnusedReturnSizePtr = EmitLifetimeStart(size, SRetAlloca.getPointer());
5177+
UnusedReturnSizePtr = EmitLifetimeStart(size, SRetPtr.getBasePointer());
51815178
}
51825179
}
51835180
if (IRFunctionArgs.hasSRetArg()) {
5181+
// A mismatch between the allocated return value's AS and the target's
5182+
// chosen IndirectAS can happen e.g. when passing the this pointer through
5183+
// a chain involving stores to / loads from the DefaultAS; we address this
5184+
// here, symmetrically with the handling we have for normal pointer args.
5185+
if (SRetPtr.getAddressSpace() != RetAI.getIndirectAddrSpace()) {
5186+
llvm::Value *V = SRetPtr.getBasePointer();
5187+
LangAS SAS = getLangASFromTargetAS(SRetPtr.getAddressSpace());
5188+
LangAS DAS = getLangASFromTargetAS(RetAI.getIndirectAddrSpace());
5189+
llvm::Type *Ty = llvm::PointerType::get(getLLVMContext(),
5190+
RetAI.getIndirectAddrSpace());
5191+
5192+
SRetPtr = SRetPtr.withPointer(
5193+
getTargetHooks().performAddrSpaceCast(*this, V, SAS, DAS, Ty, true),
5194+
SRetPtr.isKnownNonNull());
5195+
}
51845196
IRCallArgs[IRFunctionArgs.getSRetArgNo()] =
51855197
getAsNaturalPointerTo(SRetPtr, RetTy);
51865198
} else if (RetAI.isInAlloca()) {
@@ -5412,11 +5424,20 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
54125424
V->getType()->isIntegerTy())
54135425
V = Builder.CreateZExt(V, ArgInfo.getCoerceToType());
54145426

5415-
// If the argument doesn't match, perform a bitcast to coerce it. This
5416-
// can happen due to trivial type mismatches.
5427+
// The only plausible mismatch here would be for pointer address spaces.
5428+
// We assume that the target has a reasonable mapping for the DefaultAS
5429+
// (it can be casted to from incoming specific ASes), and insert an AS
5430+
// cast to address the mismatch.
54175431
if (FirstIRArg < IRFuncTy->getNumParams() &&
5418-
V->getType() != IRFuncTy->getParamType(FirstIRArg))
5419-
V = Builder.CreateBitCast(V, IRFuncTy->getParamType(FirstIRArg));
5432+
V->getType() != IRFuncTy->getParamType(FirstIRArg)) {
5433+
assert(V->getType()->isPointerTy() && "Only pointers can mismatch!");
5434+
auto FormalAS = CallInfo.arguments()[ArgNo]
5435+
.type.getQualifiers()
5436+
.getAddressSpace();
5437+
auto ActualAS = I->Ty.getAddressSpace();
5438+
V = getTargetHooks().performAddrSpaceCast(
5439+
*this, V, ActualAS, FormalAS, IRFuncTy->getParamType(FirstIRArg));
5440+
}
54205441

54215442
if (ArgHasMaybeUndefAttr)
54225443
V = Builder.CreateFreeze(V);
@@ -5736,7 +5757,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
57365757
// pop this cleanup later on. Being eager about this is OK, since this
57375758
// temporary is 'invisible' outside of the callee.
57385759
if (UnusedReturnSizePtr)
5739-
pushFullExprCleanup<CallLifetimeEnd>(NormalEHLifetimeMarker, SRetAlloca,
5760+
pushFullExprCleanup<CallLifetimeEnd>(NormalEHLifetimeMarker, SRetPtr,
57405761
UnusedReturnSizePtr);
57415762

57425763
llvm::BasicBlock *InvokeDest = CannotThrow ? nullptr : getInvokeDest();

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,15 @@ RawAddress CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, CharUnits Align,
103103
if (AllocaAddr)
104104
*AllocaAddr = Alloca;
105105
llvm::Value *V = Alloca.getPointer();
106+
assert((!getLangOpts().OpenCL ||
107+
CGM.getTarget().getTargetAddressSpace(getASTAllocaAddressSpace()) ==
108+
CGM.getTarget().getTargetAddressSpace(LangAS::opencl_private)) &&
109+
"For OpenCL allocas must allocate in the private address space!");
106110
// Alloca always returns a pointer in alloca address space, which may
107111
// be different from the type defined by the language. For example,
108112
// in C++ the auto variables are in the default address space. Therefore
109113
// cast alloca to the default address space when necessary.
110-
if (getASTAllocaAddressSpace() != LangAS::Default) {
114+
if (!getLangOpts().OpenCL && getASTAllocaAddressSpace() != LangAS::Default) {
111115
auto DestAddrSpace = getContext().getTargetAddressSpace(LangAS::Default);
112116
llvm::IRBuilderBase::InsertPointGuard IPG(Builder);
113117
// When ArraySize is nullptr, alloca is inserted at AllocaInsertPt,

clang/lib/CodeGen/CGExprAgg.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,18 +297,17 @@ void AggExprEmitter::withReturnValueSlot(
297297
(RequiresDestruction && Dest.isIgnored());
298298

299299
Address RetAddr = Address::invalid();
300-
RawAddress RetAllocaAddr = RawAddress::invalid();
301300

302301
EHScopeStack::stable_iterator LifetimeEndBlock;
303302
llvm::Value *LifetimeSizePtr = nullptr;
304303
llvm::IntrinsicInst *LifetimeStartInst = nullptr;
305304
if (!UseTemp) {
306305
RetAddr = Dest.getAddress();
307306
} else {
308-
RetAddr = CGF.CreateMemTemp(RetTy, "tmp", &RetAllocaAddr);
307+
RetAddr = CGF.CreateMemTempWithoutCast(RetTy, "tmp");
309308
llvm::TypeSize Size =
310309
CGF.CGM.getDataLayout().getTypeAllocSize(CGF.ConvertTypeForMem(RetTy));
311-
LifetimeSizePtr = CGF.EmitLifetimeStart(Size, RetAllocaAddr.getPointer());
310+
LifetimeSizePtr = CGF.EmitLifetimeStart(Size, RetAddr.getBasePointer());
312311
if (LifetimeSizePtr) {
313312
LifetimeStartInst =
314313
cast<llvm::IntrinsicInst>(std::prev(Builder.GetInsertPoint()));
@@ -317,7 +316,7 @@ void AggExprEmitter::withReturnValueSlot(
317316
"Last insertion wasn't a lifetime.start?");
318317

319318
CGF.pushFullExprCleanup<CodeGenFunction::CallLifetimeEnd>(
320-
NormalEHLifetimeMarker, RetAllocaAddr, LifetimeSizePtr);
319+
NormalEHLifetimeMarker, RetAddr, LifetimeSizePtr);
321320
LifetimeEndBlock = CGF.EHStack.stable_begin();
322321
}
323322
}
@@ -338,7 +337,7 @@ void AggExprEmitter::withReturnValueSlot(
338337
// Since we're not guaranteed to be in an ExprWithCleanups, clean up
339338
// eagerly.
340339
CGF.DeactivateCleanupBlock(LifetimeEndBlock, LifetimeStartInst);
341-
CGF.EmitLifetimeEnd(LifetimeSizePtr, RetAllocaAddr.getPointer());
340+
CGF.EmitLifetimeEnd(LifetimeSizePtr, RetAddr.getBasePointer());
342341
}
343342
}
344343

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "clang/Basic/CodeGenOptions.h"
3131
#include "clang/Basic/TargetInfo.h"
3232
#include "llvm/ADT/APFixedPoint.h"
33+
#include "llvm/IR/Argument.h"
3334
#include "llvm/IR/CFG.h"
3435
#include "llvm/IR/Constants.h"
3536
#include "llvm/IR/DataLayout.h"
@@ -2352,6 +2353,21 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
23522353
Value *Src = Visit(const_cast<Expr*>(E));
23532354
llvm::Type *SrcTy = Src->getType();
23542355
llvm::Type *DstTy = ConvertType(DestTy);
2356+
2357+
// FIXME: this is a gross but seemingly necessary workaround for an issue
2358+
// manifesting when a target uses a non-default AS for indirect sret args,
2359+
// but the source HLL is generic, wherein a valid C-cast or reinterpret_cast
2360+
// on the address of a local struct that gets returned by value yields an
2361+
// invalid bitcast from the a pointer to the IndirectAS to a pointer to the
2362+
// DefaultAS. We can only do this subversive thing because sret args are
2363+
// manufactured and them residing in the IndirectAS is a target specific
2364+
// detail, and doing an AS cast here still retains the semantics the user
2365+
// expects. It is desirable to remove this iff a better solution is found.
2366+
if (auto A = dyn_cast<llvm::Argument>(Src); A && A->hasStructRetAttr())
2367+
return CGF.CGM.getTargetCodeGenInfo().performAddrSpaceCast(
2368+
CGF, Src, E->getType().getAddressSpace(), DestTy.getAddressSpace(),
2369+
DstTy);
2370+
23552371
assert(
23562372
(!SrcTy->isPtrOrPtrVectorTy() || !DstTy->isPtrOrPtrVectorTy() ||
23572373
SrcTy->getPointerAddressSpace() == DstTy->getPointerAddressSpace()) &&

clang/lib/CodeGen/ItaniumCXXABI.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,9 @@ bool ItaniumCXXABI::classifyReturnType(CGFunctionInfo &FI) const {
13501350
// If C++ prohibits us from making a copy, return by address.
13511351
if (!RD->canPassInRegisters()) {
13521352
auto Align = CGM.getContext().getTypeAlignInChars(FI.getReturnType());
1353-
FI.getReturnInfo() = ABIArgInfo::getIndirect(Align, /*ByVal=*/false);
1353+
FI.getReturnInfo() = ABIArgInfo::getIndirect(
1354+
Align, /*AddrSpace=*/CGM.getDataLayout().getAllocaAddrSpace(),
1355+
/*ByVal=*/false);
13541356
return true;
13551357
}
13561358
return false;

clang/lib/CodeGen/MicrosoftCXXABI.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,9 @@ bool MicrosoftCXXABI::classifyReturnType(CGFunctionInfo &FI) const {
11721172

11731173
if (isIndirectReturn) {
11741174
CharUnits Align = CGM.getContext().getTypeAlignInChars(FI.getReturnType());
1175-
FI.getReturnInfo() = ABIArgInfo::getIndirect(Align, /*ByVal=*/false);
1175+
FI.getReturnInfo() = ABIArgInfo::getIndirect(
1176+
Align, /*AddrSpace=*/CGM.getDataLayout().getAllocaAddrSpace(),
1177+
/*ByVal=*/false);
11761178

11771179
// MSVC always passes `this` before the `sret` parameter.
11781180
FI.getReturnInfo().setSRetAfterThis(FI.isInstanceMethod());

0 commit comments

Comments
 (0)